Skip to content

Instantly share code, notes, and snippets.

@jbianquetti
Forked from philfreo/bucket_policy.js
Last active December 24, 2015 13:59
Show Gist options
  • Select an option

  • Save jbianquetti/6809738 to your computer and use it in GitHub Desktop.

Select an option

Save jbianquetti/6809738 to your computer and use it in GitHub Desktop.
How to make a public bucket.
{
"Version": "2008-10-17",
"Id": "Policy1380798333679",
"Statement": [
{
"Sid": "Stmt1380798047704",
"Effect": "Allow",
"Principal": {
"AWS": "*"
},
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::welvi-maintenance/*"
}
]
}
<CORSConfiguration>
<CORSRule>
<AllowedOrigin>*</AllowedOrigin>
<AllowedMethod>GET</AllowedMethod>
<MaxAgeSeconds>3000</MaxAgeSeconds>
<AllowedHeader>Authorization</AllowedHeader>
</CORSRule>
</CORSConfiguration>
All routes under welvi/ redirects to 503.html
<RoutingRules>
<RoutingRule>
<Condition>
<KeyPrefixEquals>welvi/</KeyPrefixEquals>
</Condition>
<Redirect>
<ReplaceKeyWith>503.html</ReplaceKeyWith>
</Redirect>
</RoutingRule>
</RoutingRules>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment