Skip to content

Feature Request: Option to clear and delete S3 bucket on delete #3297

@AlexCheema

Description

@AlexCheema

Note: for support questions, please first reference our documentation, then use Stackoverflow. This repository's issues are intended for feature requests and bug reports.

  • I'm submitting a ...

    • 🪲 bug report
    • 🚀 feature request
    • 📚 construct library gap
    • ☎️ security issue or vulnerability => Please see policy
    • ❓ support request => Please see note at the top of this template.
  • What is the current behavior?
    If the current behavior is a 🪲bug🪲: Please provide the steps to reproduce

S3 Buckets currently do not get deleted if they contain objects.

  • What is the expected behavior (or behavior of feature suggested)?

There should be an option to override this behaviour and force the S3 bucket to be cleared and deleted.

  • What is the motivation / use case for changing the behavior or adding this feature?

If you are doing frequent deploys with different stack names, you will eventually stack up many s3 buckets that have been left behind from previous deploys. Eventually, this hits the default limit of 100 S3 buckets per account and it is a nightmare to selectively delete the ones that you don't want.

Metadata

Metadata

Assignees

Labels

@aws-cdk/aws-s3Related to Amazon S3effort/mediumMedium work item – several days of effortfeature-requestA feature should be added or improved.in-progressThis issue is being actively worked on.p2

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions