-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
s3: replication only allows a single source bucket #33355
Comments
Thank you for your report and I've seen @badmintoncryer WIP on #33360. We'll review the PR when it's ready and hopefully address this issue. |
If its of value, the workaround I had to use was to create the bucket using the normal CDK construct, then flip it to a Cfn Construct as shown below.
Once you have the CfnBucket, you can then create and append a replicationConfiguration (link) which allows you to define the IAM role and append the replication settings. Not ideal, and your suggestion solution would be much better, but this might unstick you in the meantime. |
We are blocked by this too! Would be great to have this fix pushed through 🤞 . Thanks! |
…ture flag) (#33360) ### Issue # (if applicable) Closes #33355. ### Reason for this change We cannot deploy multiple source buckets for object replication due to the explicitly set replication role name. ### Description of changes Set replication role name by `PhysicalName.GENERATE_IF_NEEDED`. ### Describe any new or updated permissions being added None ### Description of how you validated changes Update both unit and integ test. ### 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*
Comments on closed issues and PRs are hard for our team to see. |
Describe the bug
v2.177.0 introduced the ability to set up S3 replication. This supports replicating from one source bucket to multiple destination buckets. But as soon as you configure a second source bucket, the stack fails to deploy (synth and diff work fine) with the error:
CDKReplicationRole already exists ...
This appears to be caused by the replication feature using a role with a hardcoded name without any checks if a role by that name already exists.
Regression Issue
Last Known Working CDK Version
No response
Expected Behavior
Deployment does not generate any errors and all source buckets are set up with functioning replication.
Current Behavior
During deployment an error occurs:
CDKReplicationRole already exists in stack arn:aws:cloudformation:eu-west-1:xxxxxxxxxxxx:stack/test-BucketsInfraStack/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Reproduction Steps
Possible Solution
The source bucket should accept an explicit replication role and add permissions to it instead of creating a role.
Additional Information/Context
No response
CDK CLI Version
2.178.1 (build ae342cb)
Framework Version
No response
Node.js Version
v22.13.0
OS
Linux
Language
TypeScript
Language Version
5.7.3
Other information
No response
The text was updated successfully, but these errors were encountered: