Skip to content

Instantly share code, notes, and snippets.

@tforster
Last active February 12, 2021 18:05
Show Gist options
  • Save tforster/6b6b4063e9da9ec34dd6c558303e38eb to your computer and use it in GitHub Desktop.
Save tforster/6b6b4063e9da9ec34dd6c558303e38eb to your computer and use it in GitHub Desktop.
Useful AWS IAM policies
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:GetObject",
"s3:PutObject",
"s3:GetObjectAcl",
"s3:PutObjectAcl",
"s3:ListBucket",
"s3:GetBucketAcl",
"s3:PutBucketAcl",
"s3:GetBucketLocation"
],
"Resource": [
"arn:aws:s3:::{bucket-name}",
"arn:aws:s3:::{bucket-name}/*"
],
"Condition": {}
},
{
"Effect": "Allow",
"Action": "s3:ListAllMyBuckets",
"Resource": "*",
"Condition": {}
}
]
}

Useful AWS IAM Policies

  • Limit bucket access for a specific user: Limit the buckets a specific IAM user can access. Useful when creating a dedicated user to constrain uploads for. Note that the user will still be able to list all buckets, just not access them. This is an AWS permissions limitation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment