Last active
June 15, 2018 23:40
-
-
Save afquinterog/57c3e71df33e48a08ce2220c4e1bb9b3 to your computer and use it in GitHub Desktop.
S3 copy between accounts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"s3:ListAllMyBuckets", | |
"s3:GetBucketLocation" | |
], | |
"Resource": "arn:aws:s3:::*" | |
}, | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"s3:*" | |
], | |
"Resource": [ | |
"arn:aws:s3:::source-bucket/*", | |
"arn:aws:s3:::source-bucket" | |
] | |
}, | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"s3:ListBucket", | |
"s3:GetObject", | |
"s3:GetBucketLocation", | |
"s3:PutObject", | |
"s3:DeleteObject" | |
], | |
"Resource": [ | |
"arn:aws:s3:::destination-bucket/*", | |
"arn:aws:s3:::destination-bucket" | |
] | |
} | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "AllowAll", | |
"Effect": "Allow", | |
"Principal": { | |
"AWS": [ | |
"arn:aws:iam::223439567731:role/s3_copy_role" | |
] | |
}, | |
"Action": [ | |
"s3:ListBucket", | |
"s3:GetObject", | |
"s3:GetBucketLocation" | |
], | |
"Resource": [ | |
"arn:aws:s3:::source-bucket", | |
"arn:aws:s3:::source-bucket/*" | |
] | |
} | |
] | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment