Skip to content

Instantly share code, notes, and snippets.

@alanzhaonys
Last active April 7, 2020 18:24
Show Gist options
  • Save alanzhaonys/fd24fb9f1104fe7ff1360c22bbab4fbb to your computer and use it in GitHub Desktop.
Save alanzhaonys/fd24fb9f1104fe7ff1360c22bbab4fbb to your computer and use it in GitHub Desktop.
Allow S3 Bucket Access IAM Policy
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AddPerm",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::www.damin.com/*"
}
]
}
{
"Version": "2012-10-17",
"Statement":[{
"Effect": "Allow",
"Action": "s3:*",
"Resource": ["arn:aws:s3:::my_bucket",
"arn:aws:s3:::my_bucket/*"]
}
]
}
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"AWS": ["arn:aws:iam::111122223333:user/Alice",
"arn:aws:iam::111122223333:root"]
},
"Action": "s3:*",
"Resource": ["arn:aws:s3:::my_bucket",
"arn:aws:s3:::my_bucket/*"]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment