Skip to content

Instantly share code, notes, and snippets.

@alanwill
Created January 12, 2014 17:34
Show Gist options
  • Save alanwill/8387818 to your computer and use it in GitHub Desktop.
Save alanwill/8387818 to your computer and use it in GitHub Desktop.
AWS IAM policy limiting access to named S3 bucket (programmatic and console)
{
"Statement": [
{
"Effect": "Allow",
"Action": ["s3:GetBucketLocation", "s3:ListAllMyBuckets"],
"Resource": "arn:aws:s3:::*"
},
{
"Effect": "Allow",
"Action": ["s3:ListBucket" ],
"Resource": [ "arn:aws:s3:::test"]
},
{
"Effect": "Allow",
"Action": [ "s3:PutObject", "s3:GetObject", "s3:DeleteObject"],
"Resource": [ "arn:aws:s3:::test/*"]
}
]
}
{
"Statement": [
{
"Effect": "Allow",
"Action": ["s3:ListBucket" ],
"Resource": [ "arn:aws:s3:::test"]
},
{
"Effect": "Allow",
"Action": [ "s3:PutObject", "s3:GetObject", "s3:DeleteObject"],
"Resource": [ "arn:aws:s3:::test/*"]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment