Last active
January 30, 2017 19:28
-
-
Save codeprimate/f91e83adaec6ff7e3cbc to your computer and use it in GitHub Desktop.
AWS IAM Policy for S3 Access
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Public read bucket policy: Edit the bucket policy directly and input this (replace BUCKET) | |
| { | |
| "Version":"2012-10-17", | |
| "Statement":[{ | |
| "Sid":"AllowPublicRead", | |
| "Effect":"Allow", | |
| "Principal": { | |
| "AWS": "*" | |
| }, | |
| "Action":["s3:GetObject"], | |
| "Resource":["arn:aws:s3:::BUCKET/*" | |
| ] | |
| } | |
| ] | |
| } | |
| # User policy: Create and name this policy, then assign it to user accounts (replace BUCKET) | |
| { | |
| "Version": "2012-10-17", | |
| "Statement": [ | |
| { | |
| "Effect": "Allow", | |
| "Action": [ | |
| "s3:ListBucket", | |
| "s3:GetBucketLocation", | |
| "s3:ListBucketMultipartUploads" | |
| ], | |
| "Resource": "arn:aws:s3:::BUCKET", | |
| "Condition": {} | |
| }, | |
| { | |
| "Effect": "Allow", | |
| "Action": [ | |
| "s3:AbortMultipartUpload", | |
| "s3:DeleteObject", | |
| "s3:DeleteObjectVersion", | |
| "s3:GetObject", | |
| "s3:GetObjectAcl", | |
| "s3:GetObjectVersion", | |
| "s3:GetObjectVersionAcl", | |
| "s3:PutObject", | |
| "s3:PutObjectAcl", | |
| "s3:PutObjectAclVersion" | |
| ], | |
| "Resource": "arn:aws:s3:::BUCKET/*", | |
| "Condition": {} | |
| }, | |
| { | |
| "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