Skip to content

Conversation

hstern
Copy link

@hstern hstern commented Apr 10, 2025

Reason for this change

#30966 introduced a new feature that allows the developer to configure replication on S3 Buckets. It created the replication role in the source bucket which causes a circular dependency where the destination bucket must exist prior to creating the source bucket, but the source bucket creates the role to which the destination bucket will grant permissions.

Description of changes

This adds a new property, replicationRole, to the aws-s3.Bucket constructor which allows the developer to specify a role to be used for replication. This is required to support the cross-stack scenario for cross-region and cross-account use cases.

Describe any new or updated permissions being added

No new permissions are required.

Description of how you validated changes

Modified an existing unit test where this fit and created a new integration test.

Checklist


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

This adds a new property, `replicationRole`, to the `aws-s3.Bucket`
constructor which allows the developer to specify a role to be used for
replication. This is required to support the cross-stack scenario for
cross-region and cross-account use cases.

Tested with included unit and integration tests.
@github-actions github-actions bot added the beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK label Apr 10, 2025
@aws-cdk-automation aws-cdk-automation requested a review from a team April 10, 2025 16:38
@github-actions github-actions bot added the p2 label Apr 10, 2025
Copy link
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(This review is outdated)

@hstern hstern changed the title feat: Add replicationRole property to s3.Bucket add replicationRole property to s3.Bucket Apr 10, 2025
@hstern hstern changed the title add replicationRole property to s3.Bucket feat: add replicationRole property to s3.Bucket Apr 10, 2025
@aws-cdk-automation aws-cdk-automation dismissed their stale review April 10, 2025 16:41

✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: b5cf6ff
  • Result: FAILED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@badmintoncryer
Copy link
Contributor

It looks like a PR with the same content (#33978 ) has already been submitted and has received maintainer approval.

@hstern hstern changed the title feat: add replicationRole property to s3.Bucket feat(s3): add replicationRole property to s3.Bucket Apr 14, 2025
@hstern
Copy link
Author

hstern commented Apr 14, 2025

Thanks. I'll offer a commit to that PR that tests the cross-stack use case.

@aws-cdk-automation
Copy link
Collaborator

This PR cannot be merged because it has conflicts. Please resolve them. The PR will be considered stale and closed if it remains in an unmergeable state.

@hstern hstern closed this Apr 15, 2025
Copy link
Contributor

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 15, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK p2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants