Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add replicationRole property to s3.Bucket #34104

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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