Skip to content

(aws-s3-deployment): Make the 'prune' property of bucket deployment required, not optional. #34835

@Koketjo001

Description

@Koketjo001

Describe the feature

By default, files in the destination bucket that don't exist in the source will be deleted when the BucketDeployment resource is created or updated. This behaviour can be disabled by setting the property prune to false and the files will not be deleted.

Use Case

Many users might miss the prune property when setting up bucket deployment in CDK. This will cause the files in the destination bucket that they do not want deleted to be deleted by default when updating or creating the bucket deployment. Making this property required will ensure that users provide a value and understand what to expect when updating or creating the bucket deployment.

Proposed Solution

Make the prune property to be a required property instead of optional.

Other Information

https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_s3_deployment.BucketDeployment.html#prune

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

AWS CDK Library version (aws-cdk-lib)

2.201.0

AWS CDK CLI version

2.1010.0

Environment details (OS name and version, etc.)

macOS Sequoia Version 15.5

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions