- Newest
- Most votes
- Most comments
IF you just want to redirect the HTTP url to HTTPS url, then you could just configure it inside CloudFront. Under the Behaviours tab you can set the** Viewer Protocol Policy** to Redirect HTTP to HTTPS. More details available here.
Depending how you have done the 301 on S3 bucket, it might be returning the S3 bucket URL instead of the CloudFront URL. You can also prevent direct access to the S3 bucket by using the Origin Access Control. With this setup only your CloudFront can fetch files from S3 and Public access to S3 bucket is denied. You can read more about creating new origin access control here. (This setup still allows you to use AWS CLI and S3 API to manipulate objects inside the bucket)
If you have any concerns about the billing, please open customer support case. You are able to open Account and billing -cases even with basic support.
Relevant content
- asked 7 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 8 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a month ago
Hi, it's not a case of http>https, but a completely different url, which is however also a cf/s3 setup in the same aws org. This is how I did it: https://i.imgur.com/ClgOyFt.png
Thanks for clarification Ingmar. So you using the S3 to move all requests from one domain behind the S3+Cloudfront to completely new domain (CF/S3 combo)? Then that S3 bucket approach is right one to do. CloudFront should cache the 301 according to your settings. Can you see what exactly is been billed for you? Did it start same time as you made that change? You should be able to see this in Cost Explorer. I would suggest that you also check with the Account and billing if you are seeing unexpected costs.