Skip to content

(cli): Hotswapping support for Lambda Versions and Aliases #17043

@comcalvi

Description

@comcalvi

General Issue

How should Lambda Versions and Aliases be hotswapped?

The Question

The expected behavior when hotswapping Lambda Functions that make use of Versions or Aliases is not clear. Please 👍 this issue and add comments explaining your desired behavior and use cases if you would like to see hotswapping be able to modify Lambda Versions and Aliases.

Versions:

  • What should happen when the currentVersion property of a particular Function is being used, and that Function is updated?
  • What should happen when a Version construct is present, and the Function it references is updated?

Aliases:

  • Provided that the Function in the currentVersion construct use case above is updated, should any Aliases that reference it be updated?
  • Provided that the Function in theVersion construct use case above is updated, should any Aliases that reference it be updated?

Implementation Challenges:

  • Because currentVersion deletes a resource and creates a new one with a different ID each deployment, hotswapping that change requires matching a deleted resource to a created resource with different IDs. This would require some detector functions to know the results of other detector functions before they finish executing, which is not ideal in the current framework.

CDK CLI Version

N/A

Framework Version

No response

Node.js Version

No response

OS

No response

Language

Typescript

Language Version

No response

Other information

No response

Metadata

Metadata

Assignees

Labels

effort/largeLarge work item – several weeks of effortin-progressThis issue is being actively worked on.management/trackingIssues that track a subject or multiple issuesp1package/toolsRelated to AWS CDK Tools or CLI

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions