Last active
June 20, 2016 22:19
-
-
Save amitsaxena/ee24fac39e14da8f7eb1155f4fd017ef to your computer and use it in GitHub Desktop.
How to return a 404 response code for CloudFront requests (S3 origin) of a non-existent S3 object: http://aawaara.com/post/146226425447/how-to-return-a-404-response-code-for-cloudfront
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
{ | |
"Version": "2008-10-17", | |
"Id": "PolicyForCloudFrontPrivateContent", | |
"Statement": [ | |
{ | |
"Sid": "1", | |
"Effect": "Allow", | |
"Principal": { | |
"AWS": "Enter your CloudFront Origin Access Identity here" | |
}, | |
"Action": "s3:GetObject", | |
"Resource": "arn:aws:s3:::my_bucket_name/*" | |
}, | |
{ | |
"Sid": "2", | |
"Effect": "Allow", | |
"Principal": { | |
"AWS": "Enter your CloudFront Origin Access Identity here" | |
}, | |
"Action": "s3:ListBucket", | |
"Resource": "arn:aws:s3:::my_bucket_name/*" | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment