Created
November 20, 2019 17:26
-
-
Save kunanit/13af373f5f045c063f805fd8cd3b1b7e to your computer and use it in GitHub Desktop.
S3 bucket policy example for cross-account access
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": "2008-10-17", | |
"Id": "CrossAccountAccessExample", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Principal": { | |
"AWS": "arn:aws:iam::123456789123:user/admin" | |
}, | |
"Action": [ | |
"s3:GetBucketLocation", | |
"s3:ListBucket" | |
], | |
"Resource": "arn:aws:s3:::my-bucket" | |
}, | |
{ | |
"Effect": "Allow", | |
"Principal": { | |
"AWS": "arn:aws:iam::123456789123:user/myuser" | |
}, | |
"Action": [ | |
"s3:GetObject", | |
"s3:PutObject", | |
"s3:PutObjectAcl" | |
], | |
"Resource": "arn:aws:s3:::my-bucket/*" | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment