0

I have created an S3 bucket. All objects are publicly accessible.

I can access the image file via S3 url: https://S3_BUCKET_NAME.s3.eu-west-1.amazonaws.com/xyz.jpg

I can access the image file via CloudFront root url: https://CLOUDFRONT_ID.cloudfront.net/xyz.jpg

However, I can't access the image file via CloudFront URL's sub path: https://CLOUDFRONT_ID.cloudfront.net/images/xyz.jpg

I'm getting HTTP 403. I read lots of Stackoverflow pages to resolve this issue. However, I got stuck.

error page config

origin settings

list of behaviours

s3 bucket policy

1
  • It's a bit confusing, but yeah, the "Behaviors > Path pattern" field doesn't do what you think it does. I ran into the same thing a few months back. It does not add that path to the origin, not even with a separate custom origin for that pattern.
    – ceejayoz
    Mar 21 at 14:56

1 Answer 1

0

Solution: i had to create a folder in s3 called "images" and I moved the picture into the images folder. it works

i also replaced path pattern from "/images/" to "images/"

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .