Skip to content

Instantly share code, notes, and snippets.

@afquinterog
Last active June 15, 2018 23:40
Show Gist options
  • Save afquinterog/57c3e71df33e48a08ce2220c4e1bb9b3 to your computer and use it in GitHub Desktop.
Save afquinterog/57c3e71df33e48a08ce2220c4e1bb9b3 to your computer and use it in GitHub Desktop.
S3 copy between accounts
{
"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"
]
}
]
}
{
"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