Get an AWS Website with SSL Certificate
- An AWS account - will not walk through creating one
- An index.html - see Html In 60 Seconds
What is an SSL Certificate for?
SSL, Secure Sockets Layer, is a protocol that creates a secure connection between your visitor and the
server. With this in place, any information, sensitive or not, sent to or from your website is unreadable by any
of the massive number of intermediary computers forwarding this, now encrypted, information.
Using Route 53, register a domain name.
- Using S3 create a bucket with the same name as the registered domain.
- Create a second bucket using the registered domain leading with "www.".
- Upload files to the bucket named after the registered domain name
- Configure buckets domain name bucket should have a policy allowing GET requests. www. domain
name bucket should be configured to forward to the other bucket.
- Special note: While the www. prefix on websites might be considered a matter of style, it is my
opinion that most Internet users would rather not have to type www. to get to a website. It is
just preference. If you wish to have users see www.yourdomainname.com, simply reverse which
bucket holds the files and has a bucket policy and which bucket forwards requests.
- Using Certificate Manager, request a certificate (this is the SSL certificate)
- From Certificate Manager, expand your request and click the Create record in Route 53 button
Now, you must wait for your domain name to validate the request. It could take 30 minutes or longer.
Using CloudFront, create a new distribution.
- Select the origin domain name from the dropdown.
- Viewer Protocol Policy should Redirect HTTP to HTTPS
- In Distribution Settings, you need to enter the domain name that you registered, a comma,and
then www. version of the domain.
- You also need to select your custom SSL certificate.
- Click Create Distribution.
Again, it will take some time for your Distribution to complete its setup process.
Create A records
- Using Route 53, create the A records required to make your website available to the world with
- You will need one record for your domain name,
- Using the alias for the CloudFront distribution
- and a second record for www.yourdomainname.com also using the alias for the CloudFront distribution
Congratulations. Your website should soon be accessible via https.