(s3): (CustomCDKBucketDeployment custom resource Lambda function fails when updating Bucket id
)
#27660
Labels
@aws-cdk/aws-s3
Related to Amazon S3
bug
This issue is a bug.
effort/small
Small work item – less than a day of effort
p2
Describe the bug
I have a stack using a
BucketDeployment
resource configured withretainOnDelete: false
using an S3 Bucket configured withautoDeleteObjects: true
.When updating the
s3.Bucket
resourceid
and redeploying, the stack fails with the following error:Expected Behavior
No errors are thrown
Current Behavior
The following error is thrown:
The logs for the CDKBucketDeployment Lambda functions are as follow:
Reproduction Steps
Create a new CDK app, and copy the following stack code:
Compile and deploy.
Next, change the
Bucket
resourceid
and redeploy.The error is thrown and the stack goes into a failed rollback state from which one can only recover by destroying the stack.
Possible Solution
Additional Information/Context
No response
CDK CLI Version
2.99.1 (build b2a895e)
Framework Version
2.99.1
Node.js Version
v20.2.0
OS
MacOS
Language
TypeScript
Language Version
5.1.3
Other information
No response
The text was updated successfully, but these errors were encountered: