Skip to content

Instantly share code, notes, and snippets.

@HammoTime
Last active May 24, 2018 14:01
Show Gist options
  • Save HammoTime/7f40897c696de5e84beaa07a0a8eec88 to your computer and use it in GitHub Desktop.
Save HammoTime/7f40897c696de5e84beaa07a0a8eec88 to your computer and use it in GitHub Desktop.
An IAM policy that allows access from an EC2 instance to an S3 bucket on another account
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "EC2AccessToS3BucketOnSeparateAccount",
"Effect": "Allow",
"Action": [
"s3:GetObject",
"s3:ListBucketByTags",
"s3:GetBucketTagging",
"s3:GetObjectTagging",
"s3:ListBucket",
"s3:GetBucketLocation"
],
"Resource": [
"arn:aws:s3:::<bucket name>",
"arn:aws:s3:::<bucket name>/*"
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment