Skip to content

Instantly share code, notes, and snippets.

@sandeepmanchi
Last active September 3, 2021 03:37
Show Gist options
  • Save sandeepmanchi/a506d3c88086ee9362853a8647cedd5f to your computer and use it in GitHub Desktop.
Save sandeepmanchi/a506d3c88086ee9362853a8647cedd5f to your computer and use it in GitHub Desktop.
source-account-role-list-replicated-buckets
{
2 "Version": "2012-10-17",
3 "Statement": [
4 {
5 "Sid": "GetSourceBucketConfiguration",
6 "Effect": "Allow",
7 "Action": [
8 "s3:ListBucket",
9 "s3:GetBucketLocation",
10 "s3:GetBucketAcl",
11 "s3:GetReplicationConfiguration",
12 "s3:GetObjectVersionForReplication",
13 "s3:GetObjectVersionAcl",
14 "s3:GetObjectVersionTagging"
15 ],
16 "Resource": [
17 "arn:aws:s3:::original-bucket-may",
18 "arn:aws:s3:::original-bucket-may/*"
19 ]
20 },
21 {
22 "Sid": "ReplicateToDestinationBuckets",
23 "Effect": "Allow",
24 "Action": [
25 "s3:List*",
26 "s3:*Object",
27 "s3:ReplicateObject",
28 "s3:ReplicateDelete",
29 "s3:ReplicateTags"
30 ],
31 "Resource": [
32 "arn:aws:s3:::original-bucket-may-replica-dev/*",
33 "arn:aws:s3:::original-bucket-may-replica-prod/*"
34 ]
35 },
36 {
37 "Sid": "PermissionToOverrideBucketOwner",
38 "Effect": "Allow",
39 "Action": [
40 "s3:ObjectOwnerOverrideToBucketOwner"
41 ],
42 "Resource": [
43 "arn:aws:s3:::original-bucket-may-replica-dev/*",
44 "arn:aws:s3:::original-bucket-may-replica-prod/*"
45 ]
46 }
47 ]
48}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment