Create a gist now

Instantly share code, notes, and snippets.

A sample AWS IAM json policy file with read-only access to certain S3 buckets
{
"Statement":[{
"Effect":"Allow",
"Action":["s3:ListBucket","s3:GetObject","s3:GetObjectVersion"],
"Resource":["arn:aws:s3:::my_bucket/*","arn:aws:s3:::my_bucket"]
}
],
"Statement":[{
"Effect":"Allow",
"Action":["s3:ListBucket","s3:GetObject","s3:GetObjectVersion"],
"Resource":["arn:aws:s3:::my_other_bucket/*","arn:aws:s3:::my_other_bucket"]
}
],
"Statement":[{
"Effect":"Allow",
"Action":["s3:ListAllMyBuckets"],
"Resource":"*",
"Condition": {}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment