I created a Cloudfront distribution with a CNAME images.domain.com with SSL, and I have 2 S3 buckets: one for user uploads, one for product pictures
The default bucket is the uploads bucket
I would like to use the same CloudFront for both buckets
So I added the 2 buckets as origins and created a "Behavior", with the path /products/* using my product bucket as origin
My "Behaviors" are :
- /products/* to: products bucket (precedence = 0)
- Default (*) to: uploads bucket (precedence = 1)
When I go to images.domain.com/products/78/34.jpg I get an AccessDenied
The file "78/34.jpg" is present in my products bucket
Files from the other bucket are working fine (ie images.domain.com/upload67.jpg with upload67.jpg in the uploads bucket)