Skip to content

Commit

Permalink
chore(s3): update annotation phrase of addReplicationPolicy() (#33459)
Browse files Browse the repository at this point in the history
### Issue # (if applicable)

None

### Reason for this change

As mentioned in [this comment](#33360 (comment)), the annotation phrase is incorrect and may confuse users.
The `addReplicationPolicy()` function works to add a resource policy for the destination bucket, but the annotation phrase says source bucket.

### Description of changes

```diff
- For Cross-account S3 replication, ensure to set up permissions on source bucket using method addReplicationPolicy() 
+ For Cross-account S3 replication, ensure to set up permissions on destination bucket using method addReplicationPolicy() 
```

### Describe any new or updated permissions being added

None


### Description of how you validated changes

None

### 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
badmintoncryer authored Feb 18, 2025
1 parent 8f3e793 commit 8eeb8e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/aws-cdk-lib/aws-s3/lib/bucket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2850,7 +2850,7 @@ export class Bucket extends BucketBase {
const isCrossAccount = sourceAccount !== destinationAccount;

if (isCrossAccount) {
Annotations.of(this).addInfo('For Cross-account S3 replication, ensure to set up permissions on source bucket using method addReplicationPolicy() ');
Annotations.of(this).addInfo('For Cross-account S3 replication, ensure to set up permissions on destination bucket using method addReplicationPolicy() ');
} else if (rule.accessControlTransition) {
throw new ValidationError('accessControlTranslation is only supported for cross-account replication', this);
}
Expand Down

0 comments on commit 8eeb8e4

Please sign in to comment.