Skip to content

Set AutoPublishAlias on serverless.DurableFunction blueprint#2462

Open
GarrettBeatty wants to merge 1 commit into
devfrom
feature/durable-serverless-autopublishalias
Open

Set AutoPublishAlias on serverless.DurableFunction blueprint#2462
GarrettBeatty wants to merge 1 commit into
devfrom
feature/durable-serverless-autopublishalias

Conversation

@GarrettBeatty

Copy link
Copy Markdown
Contributor

Description

Adds AutoPublishAlias: live to the function resource in the serverless.DurableFunction blueprint (vs2026).

Motivation

When deploying the durable serverless blueprint as-is and then invoking the function, the invocation fails with a no version published error. Durable execution runs against a specific published function version, but the template published none.

With AutoPublishAlias: live, SAM publishes a new function version and points the live alias at it on every deploy, so the function is immediately invokable after dotnet lambda deploy-serverless.

Changes

  • serverless.template: add "AutoPublishAlias": "live" to the function Properties. This is a user-authored property that the Annotations source generator preserves across re-sync (it only manages DurableConfig / durable policy tokens).
  • Readme.md: document the alias behavior in the Deploy section.
  • Added AutoVer changefile (Amazon.Lambda.Templates, Patch).

Notes

  • Targets dev.
  • Only the serverless blueprint is affected; the class-library lambda.DurableFunction blueprint has no serverless.template (deploys via deploy-function).

Add AutoPublishAlias: live to the function in the serverless.DurableFunction
blueprint (vs2026) so SAM publishes a function version and points the 'live'
alias at it on every deploy. Without a published version, invoking a freshly
deployed durable function fails with a no-published-version error.
@GarrettBeatty

Copy link
Copy Markdown
Contributor Author

"live" is what most of the AWS docs use in examples for the version which is why I chose it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants