Skip to content

Instantly share code, notes, and snippets.

Last active Nov 15, 2016
What would you like to do?
CORS policy on S3/CloudFront
Here is how you can test
Create bucket, add this policy.
"Version": "2012-10-17",
"Statement": [
"Sid": "PublicReadGetObject",
"Effect": "Allow",
"Principal": {
"AWS": "*"
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::YOUR_BUCKET_NAME_HERE/*"
The go to static website hosting and enable that. Then click on the CORS policy and use the default one.
curl -sI -H "Origin:" -H "Access-Control-Request-Method: GET"
Here is a good arcticle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment