Skip to content

Commit

Permalink
chore(s3): add more details to prune and destinationKeyPrefix property (
Browse files Browse the repository at this point in the history
aws#32011)

### Reason for this change
`prune` and `destinationKeyPrefix` properties documentation is not super clear for users. Adding more details to behaviors when setting/unsetting the property.

### Description of changes



### Description of how you validated changes



### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
xazhao authored Nov 5, 2024
1 parent 090c7be commit ae29bb5
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions packages/aws-cdk-lib/aws-s3-deployment/lib/bucket-deployment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,12 @@ export interface BucketDeploymentProps {
readonly destinationBucket: s3.IBucket;

/**
* Key prefix in the destination bucket.
* Key prefix in the destination bucket. Must be <=104 characters
*
* Must be <=104 characters
* If it's set with prune: true, it will only prune files with the prefix.
*
* We recommend to always configure the `destinationKeyPrefix` property. This will prevent the deployment
* from accidentally deleting data that wasn't uploaded by it.
*
* @default "/" (unzip to root of the destination bucket)
*/
Expand Down Expand Up @@ -71,6 +74,9 @@ export interface BucketDeploymentProps {
readonly include?: string[];

/**
* 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.
*
* If this is set to false, files in the destination bucket that
* do not exist in the asset, will NOT be deleted during deployment (create/update).
*
Expand Down

0 comments on commit ae29bb5

Please sign in to comment.