Select Language:
If you’re having trouble making your S3 website secure and accessible, here’s a simple guide to help you fix the common issues related to recent changes in AWS that affect public access and HTTPS setup.
First, check your S3 bucket’s static website hosting settings. Go to your bucket, click on Properties, and make sure that static website hosting is turned on. Also, ensure that an index.html file is specified as the main page.
Next, review your bucket’s public access settings. AWS now blocks public access by default for added security. To allow your site to be publicly available, go to Permissions, then Public Access Block, and turn off the restrictions that prevent public access.
Then, look at your bucket policy. Your site will only be accessible to everyone if the policy allows public reading. The policy should include permissions similar to this:
json
{
“Effect”: “Allow”,
“Principal”: “*”,
“Action”: “s3:GetObject”,
“Resource”: “arn:aws:s3:::YOUR-BUCKET-NAME/*”
}
Make sure to replace “YOUR-BUCKET-NAME” with your actual bucket name.
For HTTPS to work, remember that S3 alone doesn’t serve HTTPS requests. You need to set up CloudFront, which is AWS’s content delivery network. Here’s what you need to do:
– Request an SSL certificate in the us-east-1 region.
– Create a CloudFront distribution that points to your S3 website endpoint.
– In Route 53, create an A or ALIAS record for your domain (like jhaysonnscure.com) that points to the CloudFront distribution.
Finally, ensure your DNS settings are correct. Your domain should be directing traffic to your CloudFront distribution, not directly to your S3 bucket. This setup ensures your website loads securely with HTTPS and is accessible to visitors.
Following these steps should help you resolve the access and security issues, making your website both functional and secure.




