Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .autover/changes/durable-serverless-autopublishalias.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"Projects": [
{
"Name": "Amazon.Lambda.Templates",
"Type": "Patch",
"ChangelogMessages": [
"Set AutoPublishAlias to 'live' on the function in the serverless.DurableFunction blueprint (vs2026). SAM now publishes a new function version and points the 'live' alias at it on every deploy, so the durable function can be invoked immediately after deployment instead of failing with a no-published-version error. Preview."
]
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ The `[DurableExecution]` attribute drives the source generator, which keeps the
dotnet lambda deploy-serverless
```

The template sets `AutoPublishAlias: live` on the function. On every deploy, SAM publishes a new
function version and points the `live` alias at it, so the function can be invoked immediately after
deployment. Without a published version, invoking a freshly deployed durable function fails because
durable execution requires a specific function version to run against.

## Invoke

CloudFormation generates the deployed function name, so it won't be `BlueprintBaseName.1`. Find it by
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
],
"PackageType": "Zip",
"Handler": "BlueprintBaseName.1::BlueprintBaseName._1.Function_ProcessOrder_Generated::ProcessOrder",
"AutoPublishAlias": "live",
"DurableConfig": {
"ExecutionTimeout": 86400
}
Expand Down
Loading