Open ykethan opened 3 months ago
@ykethan , thanks for reporting this issue.
I was able to repro this, Sharing snapshots of the repro and analysis -
cdk diff
output as below -Hey @khushail, thanks for looking into this. just a additive to the reproduction, try adding a 3rd layer referencing the same layer which will cause a rollback failure. While this is on CFN that causes this but wanted to mention this behavior, as you will not be able to rollback from the failed state.
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