(CLI): hotswap still does not wait for Lambda code to be fully updated #22666
Labels
bug
This issue is a bug.
closed-for-staleness
This issue was automatically closed because it hadn't received any attention in a while.
needs-triage
This issue or PR still needs to be triaged.
package/tools
Related to AWS CDK Tools or CLI
response-requested
Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Describe the bug
I own a Lambda within a VPC. When I run
cdk deploy --hotswap --method=direct --require-approval=never $stackName
, and run tests against the deployed Lambda, I see that the previous version of the lambda code is run. Waiting a minute and running the test again correctly runs against the updated code. This issue was supposedly fixed in #18386 , but I am still seeing the issue in CDK 2.45.0. According to that issue the delay is particularly large for Lambdas within VPCs, so this may not be noticeable on other Lambdas.Expected Behavior
After
cdk deploy --hotswap
exits, all future calls to the deployed Lambda should see the new code.Current Behavior
After
cdk deploy --hotswap
exits, immediately calling the deployed Lambda executes the previous code.Reproduction Steps
Make an observable change to a Lambda within a VPC, run
cdk deploy --hotswap --method=direct --require-approval=never $stackName
, immediately call the lambda, and observe that the code change is not in effect. Wait and call again to confirm that the code change is eventually present.Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.45.0
Framework Version
No response
Node.js Version
14.20.1
OS
Amazon Linux
Language
Typescript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: