Last active
April 1, 2016 13:23
-
-
Save atrauzzi/f5483d60875c47c60b1a to your computer and use it in GitHub Desktop.
Granting your app access to S3
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> | |
<CORSRule> | |
<AllowedOrigin>*</AllowedOrigin> | |
<AllowedMethod>GET</AllowedMethod> | |
<MaxAgeSeconds>3000</MaxAgeSeconds> | |
<AllowedHeader>*</AllowedHeader> | |
</CORSRule> | |
</CORSConfiguration> |
This file contains 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
{ | |
"Id": "GrantAppAccess", | |
"Statement": [ | |
{ | |
"Sid": "AppObjects", | |
"Effect": "Allow", | |
"Principal": { | |
"AWS": "[USER ARN]" | |
}, | |
"Action": [ | |
"s3:GetObjectAcl", | |
"s3:GetObject", | |
"s3:PutObject", | |
"s3:DeleteObject" | |
], | |
"Resource": "arn:aws:s3:::[BUCKET NAME]/*" | |
}, | |
{ | |
"Sid": "AppBucket", | |
"Effect": "Allow", | |
"Principal": { | |
"AWS": "[USER ARN]" | |
}, | |
"Action": [ | |
"s3:ListBucket" | |
], | |
"Resource": "arn:aws:s3:::[BUCKET NAME]" | |
}, | |
{ | |
"Sid": "AnonymousObjects", | |
"Effect": "Allow", | |
"Principal": "*", | |
"Action": "s3:GetObject", | |
"Resource": "arn:aws:s3:::[BUCKET NAME]/*" | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment