Skip to content

New pattern submission - cdk-dotnet-durablefunction-batchprocessing #3241

Description

@dougperkes

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:

#3240

Author

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions