aws/aws-cdk
GitHub で見る(cdk pipelines): cdk pipeline support stacks should delete and not orphan s3 buckets
Open
#35,654 opened on 2025年10月1日
@aws-cdk/pipelinesbugeffort/mediumgood first issuep2
説明
Describe the bug
When using CDK pipelines to deploy preview environments it is very important that a CDK destroy actually cleans up all of the resources.
Does not have a resource policy or autodeleteobjects set.
It would be nice if the CDK was better written to allow for stack destroys and recreates.
Regression Issue
- Select this option if this issue appears to be a regression.
Last Known Working CDK Library Version
No response
Expected Behavior
When running cdk destroy you are able to set resource policies so that if you are using the cdk to deploy preview environments you have clean teardowns.
Current Behavior
the mentioned bucket is orphaned and if you try to redeploy your app it fails
Reproduction Steps
create a cross region cdk pipeline
Possible Solution
allow us to define the resource policy
Additional Information/Context
No response
AWS CDK Library version (aws-cdk-lib)
latest
AWS CDK CLI version
latest
Node.js Version
24
OS
mac
Language
TypeScript
Language Version
No response
Other information
No response