Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
AWS permit users read/list access to a prefix in a bucket
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:ListBucket"
],
"Resource": [
"arn:aws:s3:::fancy-bucket"
],
"Condition": {
"StringLike": {
"s3:prefix": [
"fancy-prefix/*"
]
}
}
},
{
"Effect": "Allow",
"Action": [
"s3:Get*"
],
"Resource": "arn:aws:s3:::fancy-bucket/fancy-prefix/*"
}
]
}
@rwalk

This comment has been minimized.

Copy link
Owner Author

@rwalk rwalk commented Jun 8, 2020

I often need to provide a user access to a single prefix path in S3. And I always forget how to do it. Here is a policy that does this. Attach it to the IAM user who needs this access.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment