-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Closed
Labels
@aws-cdk/aws-s3Related to Amazon S3Related to Amazon S3bugThis issue is a bug.This issue is a bug.effort/smallSmall work item – less than a day of effortSmall work item – less than a day of effortp1
Description
If a stack is created that has an S3 bucket with auto_delete_objects=True (and RetentionPolicy.DESTROY), and then the S3 bucket is deleted outside CloudFormation, then deleting the stack will fail with an error.
Reproduction Steps
- Create a stack with an S3 bucket with
auto_delete_objects=True. - Manually delete the S3 bucket via the console.
- Delete the stack.
What did you expect to happen?
I expected the stack deletion to vacuously succeed. If the bucket in question had been deployed with auto_delete_objects=False, this would have been the observed behavior.
What actually happened?
Deleting the custom resource failed, and thus so did deleting the stack.
Environment
- CDK CLI Version : 1.118.0
- Framework Version:
- Node.js Version: 14.17.5
- OS : debian bullseye (running inside a container)
- Language (Version): Python 3.9.6
Other
The custom resource lambda should handle the "not found" exception from S3 and treat it as a vacuous success.
This is 🐛 Bug Report
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
@aws-cdk/aws-s3Related to Amazon S3Related to Amazon S3bugThis issue is a bug.This issue is a bug.effort/smallSmall work item – less than a day of effortSmall work item – less than a day of effortp1