Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
{
"Sid": "AllowList",
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::009826608486:user/vhx"
},
"Action": "s3:ListBucket",
"Resource": "arn:aws:s3:::YOUR_BUCKET_NAME"
},
{
"Sid": "AllowGetObject",
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::009826608486:user/vhx"
},
"Action": "s3:GetObject*",
"Resource": [
"arn:aws:s3:::YOUR_BUCKET_NAME/YOUR_FOLDER_ALL_FILES/*"
]
}

This doesn't seem to work anymore. This does:

{ "Version": "2012-10-17", "Statement": [ { "Sid": "VisualEditor0", "Effect": "Allow", "Action": "s3:ListBucket", "Resource": "arn:aws:s3:::<MY BUCKET NAME>", "Condition": { "ForAllValues:StringEquals": { "aws:userid": "009826608486" } } }, { "Sid": "VisualEditor1", "Effect": "Allow", "Action": "s3:GetObject*", "Resource": "arn:aws:s3:::<MY BUCKET NAME>/*", "Condition": { "ForAllValues:StringEquals": { "aws:userid": "009826608486" } } } ] }

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