I have routing rule set up for my static site in S3; however, it seems that cloudfront doesn't abide by these same rules. It at the very least doesn't obey the index file rule.
Is there anyway to set up routing similar to s3 in cloudfront? Is there a more powerful routing solution?
I had the same problem. I was pointing cloudfront to the S3 bucket as opposed to the static domain name. If you point directly to the S3 bucket, the routing rules are bypassed (which makes sense since your routing rules are set only on the static hosting). Create a custom origin to the static public S3 bucket website and you're good.
I direct you to this answer on ServerFault: Why S3 website redirect location is not followed by CloudFront?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With