Add lambda.DurableFunction blueprint (vs2026)#2445
Draft
GarrettBeatty wants to merge 1 commit into
Draft
Conversation
Adds a new 'dotnet new' template (shortName: lambda.DurableFunction) under Blueprints/BlueprintDefinitions/vs2026 that scaffolds a Lambda durable execution workflow using the Annotations class-library programming model on the managed dotnet10 runtime. The sample workflow demonstrates the core durable primitives: StepAsync, a step with an exponential RetryStrategy and AtMostOncePerRetry semantics, WaitAsync (suspend timer), and RunInChildContextAsync. The generated serverless.template includes DurableConfig and the AWSLambdaBasicDurableExecutionRolePolicy managed policy. A test project drives the workflow locally via Amazon.Lambda.DurableExecution.Testing. Also registers the template in Blueprints/README.md.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new
dotnet newtemplate —lambda.DurableFunction— underBlueprints/BlueprintDefinitions/vs2026that scaffolds a Lambda durable execution workflow.[LambdaFunction]+[DurableExecution]) on the managed dotnet10 runtime (durable execution requires dotnet10).ProcessOrderworkflow demonstrates the core durable primitives:StepAsync— checkpointed stepStepAsync+RetryStrategy.ExponentialwithStepSemantics.AtMostOncePerRetryWaitAsync— suspend timer (no compute charge while suspended)RunInChildContextAsync— grouping related stepsserverless.templateincludesDurableConfigand theAWSLambdaBasicDurableExecutionRolePolicymanaged policy (kept in sync by the source generator).Amazon.Lambda.DurableExecution.Testing(no AWS resources needed).Blueprints/README.md.vs2026 only for now (matches the existing vs2026 layout convention).
Testing
Validated locally (durable preview packages packed into a local NuGet feed):
dotnet buildof the function project succeeds on net10.0; source generator emitsFunction_ProcessOrder_Generated::ProcessOrder, matching the handler inserverless.template.dotnet test— both unit tests pass, no warnings.dotnet new lambda.DurableFunction --name <X>instantiates correctly and the shortName resolves.Notes
Amazon.Lambda.DurableExecution.Testingis not yet published to NuGet; the template references0.0.1-preview. The test project will restore once that package is published (or via a local feed in the meantime)..autoverchange file needed (autover tracksLibraries/srcprojects only).