-
Notifications
You must be signed in to change notification settings - Fork 4k
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
aws_lambda: regular deploys fail after hotswap #28237
Comments
Hey @khushail I've added a repo to reproduce |
Yes I think this is expected and should be documented. What's happening with hotswap with lambda version is that it essentially bump the lambda version with SDK call and this causes the drift. When you |
This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled. |
Yeah cool, it makes sense. It's quite difficult to work with this from a CI POV. Ideally, my master build should never just suddenly break. So I think the dynamic description would be the best workaround for using hotswap. |
Describe the bug
After deploying a lambda version with
--hotswap
, when you attempt to run a regularcdk deploy
with the same changes it fails with the following error message:Expected Behavior
Regular
cdk deploy
succeeds after a hotswap deployCurrent Behavior
cdk deploy
fails.Reproduction Steps
https://github.com/samchungy/cdk-lambda-hotswap-bug
run
ENVIRONMENT=dev yarn deploy
Run
--hotswap
followed by deploy withoutPossible Solution
I assume this is failing because the function configuration hasn't changed between a hotswap deploy and a regular deploy. So when CF goes to sync up and the version configuration is the same it fails
My workaround at the moment is adding a dynamic description which means that the Lambda has to be deployed fresh with every deploy.
This may just have to be an accepted quirk, but perhaps some documentation around this would be great
Additional Information/Context
No response
CDK CLI Version
2.110.0
Framework Version
No response
Node.js Version
20
OS
Mac OSX
Language
TypeScript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: