aws-lambda: inconsistent behavior in fromLayerVersionArn during deploys #31006
Labels
@aws-cdk/aws-lambda
Related to AWS Lambda
bug
This issue is a bug.
effort/small
Small work item – less than a day of effort
p2
Describe the bug
when modifying an existing fromLayerVersionArn value with a arn that is already attached the deploy nor synth fails
Expected Behavior
Throw an error as follows
Two different versions of the same layer are not allowed to be referenced in the same function.
Current Behavior
deploys successfully but does not change anything on the service
Reproduction Steps
Possible Solution
No response
Additional Information/Context
Side note: observed after deploying two fromLayerVersionArn with same layer then if we add another fromLayerVersionArn with same layer, the cfn will fail with
Two different versions of the same layer are not allowed to be referenced in the same function.
which is great but the next deploy/cfn template is in a failed state rather than a rollback complete stateCDK CLI Version
2.150.0
Framework Version
No response
Node.js Version
v20.11.1
OS
MacOS
Language
TypeScript
Language Version
5.5.3
Other information
No response
The text was updated successfully, but these errors were encountered: