aws-samples / aws-samples/serverless-patterns

New pattern submission - cdk-dotnet-durablefunction-batchprocessing

Open
#3,241 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
1.8k
Forks
1.1k
Avg merge
7d 14h
Merged PRs (30d)
6

Description

# New Pattern Submission — cdk-dotnet-durablefunction-batchprocessing

## Pattern Details

- **Title:** Lambda Durable Function — Dynamic Batch Processing with Fan-Out/Fan-In (.NET)
- **Description:** A durable function that discovers files in S3 at runtime, dynamically fans out a parallel task per file, then aggregates results into a summary report.
- **Language:** .NET (C#)
- **Framework:** CDK
- **Level:** 300
- **Services:** AWS Lambda, Amazon S3

## How It Works

This pattern deploys a Lambda durable function that implements dynamic fan-out/fan-in. Given an S3 prefix, it lists all files at runtime and creates a parallel processing task for each one — the parallelism is not hardcoded at design time.

Each file is processed independently (parsed, transformed, written to an output prefix), and all branches are awaited with ParallelAsync. Once all files complete, the function aggregates results and writes a summary report to S3.

This demonstrates dynamic parallelism with durable functions: the number of branches is determined at runtime, each branch is independently checkpointed, and the orchestration is resilient to interruptions.

## GitHub PR for template:

https://github.com/aws-samples/serverless-patterns/pull/3240

## Author

- **Name:** Doug Perkes
- **Bio:** Senior Solutions Architect at AWS, focused on .NET and serverless.
- **LinkedIn:** dougperkes

Contributor guide

Open the contributing guide

Research direction

Start with the linked pull request #3240, which contains the submitted template. Compare it with the issue's stated behavior: runtime S3 file discovery, dynamic fan-out/fan-in processing, and a summary report written to S3. Done means the pattern demonstrates those behaviors using .NET, CDK, AWS Lambda, and Amazon S3.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, csharp
Domain
backend, cloud
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.