- Newest
- Most votes
- Most comments
i got everything done but i cant create the A record for my subdomain pointing to my bucket the only thing i can do is put one in for my distribution the transfer to s3 cloud thing isnt showing up
To set up your S3 bucket as a CDN for assets.website.com with HTTPS, here's what you need to configure:
S3 Bucket Configuration:
- Your bucket name must exactly match your subdomain: "assets.website.com"
- Enable static website hosting on the bucket
- Configure appropriate bucket permissions to allow public read access for your assets
Route 53 DNS Setup:
- Create an alias record in Route 53 for "assets.website.com" that points to your S3 bucket
- Ensure the hosted zone record name matches your bucket name exactly
CloudFront Distribution (Required for HTTPS): You mentioned deleting your distribution, but you actually need CloudFront to serve S3 content over HTTPS. S3 static website endpoints don't support HTTPS directly. Here's what to do:
- Create a CloudFront distribution with your S3 bucket as the origin
- Set the alternate domain name (CNAME) to "assets.website.com"
- Attach your SSL/ACM certificate to the CloudFront distribution
- Update your Route 53 alias record to point to the CloudFront distribution (not directly to S3)
Common Issues:
- If images aren't showing, check your bucket's CORS configuration to allow requests from your main domain
- Verify your EC2 application is referencing the correct URLs (https://assets.website.com/image.jpg)
- The redirect you're experiencing suggests either incorrect DNS configuration or missing CloudFront setup
The security warning you saw was likely because you were trying to access S3 over HTTPS without CloudFront, which isn't supported for static website hosting endpoints.
Sources
Point Route 53 to an S3 static website | AWS re:Post
Hello.
As stated in the AI automated response from re:Post Agent, S3's static website hosting feature does not allow delivery via HTTPS with a custom domain.
Therefore, CloudFront is required.
When using CloudFront as a CDN, delivery can be achieved by configuring the bucket policy to allow OAC (Open Access Control) instead of using S3's static website hosting.
https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-restricting-access-to-s3.html
The following blog is very helpful for configuring CloudFront and OAC.
https://awstut.com/en/2022/11/27/deliver-s3-content-via-cloudfront-using-oac-en/
Please refer to the following documentation for instructions on configuring a custom domain for CloudFront.
https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/CNAMEs.html
Relevant content
- asked 2 years ago
- asked 7 years ago

Have you tried setting a cname instead?