Hi User,
You should be able to use CloudFront to serve a website hosted on an S3 bucket with Block Public Access settings enabled. You might want to refer to this link for more details on how you can configure it.
Hope this helps!
Public Access to your bucket must be off, otherwise this will not work. If you read the link that @turtle provided it says:
Add a bucket policy that allows public read access to the bucket that you created. Note: For this configuration, the S3 bucket's block public access settings must be turned off. If your use case requires the block public access settings to be turned on, use the REST API endpoint as the origin. Then, restrict access by an origin access control (OAC) or origin access identity (OAI).
@rePost-User-9152533 - if you think my answer is to your satisfaction, can you please accept it ? :) if not, happy to assist you more.
Thank you! I will have to read up on the REST API.
When I go to certificate manager (certificate is issued) and click “create records in route 53” and I clear the filters, “Validation status: Pending validation”, “Validation status: Failed”, my domains appear with “validation status = success”, “Is domain in Route 53? = yes”. The create record button is not available to be clicked to create the CNAME TYPE records in route 53. The DNS records are validated, and the domain is in Route 53.
Why can’t I “create records in route 53?
For you to be able to have an active "Create records in Route 53" button, you would have to satisfy these 3 requirements as per this link:
- You are using Route53 as your DNS provider
- You have permission to write to the zone hosted by Route 53
- Your fully qualified domain name (FQDN) has not already been validated
In this case, it seems like your domain name has already been validated and hence the button is not available.
I used this link above to set up my s3 bucket to be accessed as a static website. I have used the REST API endpoint as the origin. I restricted access with an origin access control (OAC) I used an incognito window to access the website and it still doesn't find it.
No mention of route 53. Does it need a CNAME type record?
Relevant content
- asked 3 years ago
- Accepted Answerasked a year ago
- AWS OFFICIALUpdated 4 months ago
- AWS OFFICIALUpdated 5 months ago
- AWS OFFICIALUpdated 6 months ago
- AWS OFFICIALUpdated 2 years ago
Thank you! I will check the link out.