-
Notifications
You must be signed in to change notification settings - Fork 4k
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(s3): replicating objects #30966
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.
A comment requesting an exemption should contain the text Exemption Request
. Additionally, if clarification is needed add Clarification Request
to a comment.
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
Hi @badmintoncryer , Thank you for submitting this PR, as this feature is adding some additional pemissions for s3, we'll need to have an internal security review while we go through this PR. Will keep you posted !! |
I considered bidirectional replication. First, I added an public addReplicationRules(rules: ReplicationRule[]): void {
this.replicationRules.push(...rules);
} However, it seems that the circular reference between the source and destination buckets cannot be resolved. Do you have any suggestions on the implementation? |
Thanks @badmintoncryer , working on adding cross-account integ test will give it a try at my end for bi-directional. |
Thank you very much @shikha372 |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #30966 +/- ##
==========================================
- Coverage 66.96% 66.79% -0.17%
==========================================
Files 329 329
Lines 18663 18719 +56
Branches 3258 3273 +15
==========================================
+ Hits 12497 12504 +7
- Misses 5839 5887 +48
- Partials 327 328 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
|
a25da4c
to
2981df7
Compare
7e78701
to
d7b8dbb
Compare
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
@Mergifyio update |
✅ Branch has been successfully updated |
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
@mergify update |
✅ Branch has been successfully updated |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Hi @badmintoncryer , tried to merge it yesterday but I think there is unit test coverage missing for new addReplication method, I can get back to it next week |
Thank you very much @shikha372 . Looking forward to the updates! |
Issue # (if applicable)
Closes #1680.
Reason for this change
AWS S3 supports configuring object replication , but the
s3.Bucket
construct does not support it.Description of changes
Added
replicationRules
toBucketProps
.Replication configuration version
There are two versions of replication configuration. This PR uses only the V2 replication configuration to enable the specification of the Filter element and S3 Replication Time Control (S3 RTC).
To use V2 replication configuration, this PR explicitly specifies Filter.Prefix property.
V2 replication configuration has some restriction:
These restriction is not documented but there are some posts about these points.
To resolve these problems,I made the
priority
required and explicitly set thedeleteMarkerReplication
.IAM permission
There is a documentation to setup IAM permissions for service role.
However, there are discrepancies between the automatically generated IAM policies in the management console and the IAM policies in the documentation.
Generated Policy:
I adopted the policy from the document. I look forward to hearing your thoughts on this matter.
Description of how you validated changes
Added both unit and integ tests.
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license