I want to host a HTTPS-only static website using Amazon S3 and CloudFront. Here's what I've done so far:
- Set up an S3 bucket for static website hosting and put my website files in it
- Created a CloudFront distribution and pointed it to the S3 bucket
- Added a CNAME record in my domain's nameservers for the
www
subdomain pointing to the CloudFront bucket.
So far, so good - I can access my website using the www.example.com
address. However, I want the site to be available via HTTPS only, for which I bought an SSL certificate from GoDaddy.
Now, the question is:
- Is there a way to install this third-party SSL certificate on my S3-hosted website?
- Is there a way to have an automatic http to https redirect with this setup?