aws / aws/aws-cdk-cli

(hotswap): CDK v2 Hotswapping support for SAM.CfnFunction

Open
#878 2 comments 3 reactions 0 assignees View on GitHub
effort/medium feature-request p2
Dominant language
TypeScript
Stars
105
Forks
122
Avg merge
1d 17h
Merged PRs (30d)
71

Description

### Describe the feature

Currently it looks like the only way hotswap will support a lambda is if it is of resource type `AWS::Lambda::Function` - https://github.com/aws/aws-cdk/blob/5024021bec9952ca7b1e3d82e2c257f124c6300c/packages/aws-cdk/lib/api/hotswap/lambda-functions.ts#L92

### Use Case

We currently use [SAM.CfnFunction](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sam.CfnFunction.html) since it gets us gradual deployments of our lambdas.

We don't want to lose our ability to do gradual deployments with lambda,. As such we're stuck choosing between hot swapping or gradual deployments in the current state of CDK v2.

### Proposed Solution

Add support for `AWS::Serverless::Function` for hot swapping.

### Other Information

_No response_

### Acknowledgements

- [ ] I may be able to implement this feature request
- [ ] This feature might incur a breaking change

### CDK version used

2.20.0

### Environment details (OS name and version, etc.)

MacOS 12.3.1

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.