Created
December 2, 2019 18:14
-
-
Save jbboynton/7a0dae2c8eef48e9444938f9cb4b0f51 to your computer and use it in GitHub Desktop.
AWS S3 and IAM policies for S3-Uploads
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
| { | |
| "Version": "2012-10-17", | |
| "Statement": [ | |
| { | |
| "Effect": "Allow", | |
| "Principal": { | |
| "AWS": [ | |
| "arn:aws:iam::<AWS account ID>:root", | |
| "arn:aws:iam::<AWS account ID>:user/<bucket-specific user's ID>" | |
| ] | |
| }, | |
| "Action": "s3:*", | |
| "Resource": [ | |
| "arn:aws:s3:::<bucket name>", | |
| "arn:aws:s3:::<bucket name>/*" | |
| ] | |
| } | |
| ] | |
| } |
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
| { | |
| "Version": "2012-10-17", | |
| "Statement": [ | |
| { | |
| "Sid": "AllowRootAndHomeListingOf<bucket name>", | |
| "Effect": "Allow", | |
| "Action": [ | |
| "s3:AbortMultipartUpload", | |
| "s3:DeleteObject", | |
| "s3:GetBucketAcl", | |
| "s3:GetBucketLocation", | |
| "s3:GetBucketPolicy", | |
| "s3:GetObject", | |
| "s3:GetObjectAcl", | |
| "s3:ListBucket", | |
| "s3:ListBucketMultipartUploads", | |
| "s3:ListMultipartUploadParts", | |
| "s3:PutObject", | |
| "s3:PutObjectAcl" | |
| ], | |
| "Resource": [ | |
| "arn:aws:s3:::<bucket name>", | |
| "arn:aws:s3:::<bucket name>/*" | |
| ] | |
| } | |
| ] | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment