capabilities.work

Release a Version Behind an Alias

A 4-step recipe with AWS Lambda. We can help you get access.

Recipe · 4 steps

Release a Version Behind an Alias

Publish a version and point a named alias at it, creating the alias when absent.

  1. Cut an immutable version from the function's current code and configuration. Lambda declines to publish a new version if neither the code nor the configuration has changed since the last one.
  2. Probe for the alias to decide whether this is a move or a first release. A 200 means an incumbent version exists and its RevisionId can be used as a concurrency guard; a 404 means the alias has never existed.
  3. Point the existing alias at the newly published version. RevisionId is passed as a guard so Lambda rejects the update if another release moved the alias after it was read.
  4. Create the alias pointing at the new version. This is the first release for this alias, so there is no incumbent version and no RevisionId to guard against.
What you'll need to have ready
  • functionName: The name or ARN of the function being released.
  • aliasName: The alias clients Invoke (e.g. prod).
  • versionDescription: Description recorded against the published version (e.g. a git SHA or release tag).
For your developer

Arazzo workflow aws-lambda:alias-release, 4 operations: PublishVersion → GetAlias → UpdateAlias → CreateAlias. Specs on APIs.io.