Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(cli): hot-swap Lambda Layers attached to functions #19172

Open
2 tasks
misterjoshua opened this issue Feb 26, 2022 · 4 comments
Open
2 tasks

(cli): hot-swap Lambda Layers attached to functions #19172

misterjoshua opened this issue Feb 26, 2022 · 4 comments
Labels
effort/medium Medium work item – several days of effort feature/enhancement A new API to make things easier or more intuitive. A catch-all for general feature requests. feature-request A feature should be added or improved. hotswap p2 package/tools Related to AWS CDK Tools or CLI

Comments

@misterjoshua
Copy link
Contributor

misterjoshua commented Feb 26, 2022

Description

I'd like the CDK CLI to support hot-swapping Lambda layers and associated lambda functions.

Use Case

I'm developing a Lambda Extension in a Lambda Layer while the Layer is attached to a Lambda function. Whenever I hit save in CDK watch mode, the CDK CLI uses CloudFormation to deploy the changes and takes 90-100 seconds every time.

Proposed Solution

I'm not familiar with the hot-swap code, but I think you could create a new layer version with the uploaded asset and update the functions it's attached to.

Other information

No response

Acknowledge

  • I may be able to implement this feature request
  • This feature might incur a breaking change
@misterjoshua misterjoshua added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Feb 26, 2022
@github-actions github-actions bot added the package/tools Related to AWS CDK Tools or CLI label Feb 26, 2022
@misterjoshua misterjoshua changed the title (cli): add hot-swap support for Lambda Layers (cli): hot-swap Lambda Layers attached to functions Feb 26, 2022
@github-actions github-actions bot added the @aws-cdk/aws-lambda Related to AWS Lambda label Feb 26, 2022
@rix0rrr
Copy link
Contributor

rix0rrr commented Feb 26, 2022

@skinny85 @comcalvi did we add support for this already?

@skinny85
Copy link
Contributor

We did not, actually 🙂.

@skinny85 skinny85 added effort/medium Medium work item – several days of effort feature/enhancement A new API to make things easier or more intuitive. A catch-all for general feature requests. p2 and removed @aws-cdk/aws-lambda Related to AWS Lambda needs-triage This issue or PR still needs to be triaged. labels Feb 28, 2022
@twixr
Copy link

twixr commented Jul 25, 2022

Would love to see this as well.
My codebase consist of a lot of Lambda functions with shared code in layers.
If I change a simple line of code in a layer, it will take almost 200 seconds, since it performs a full deployment.
While only updating a Lambda will take several seconds.

@kjones
Copy link

kjones commented Mar 22, 2023

My codebase consist of a lot of Lambda functions with shared code in layers.

My exact use case also. Multiple Lambda Functions handling API requests or EventBridge events. Tiny entry points into a shared layer DDD core.

It does look like SAM CLI (sam sync) supports this. 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort/medium Medium work item – several days of effort feature/enhancement A new API to make things easier or more intuitive. A catch-all for general feature requests. feature-request A feature should be added or improved. hotswap p2 package/tools Related to AWS CDK Tools or CLI
Projects
None yet
Development

No branches or pull requests

8 participants