Technical Showcase: How to Host HTTPS on S3

I am presenting my technical showcase as an HTML and Basic CSS practice, aiming to learn how to host HTTPS on S3. I created this page as the comprehensive guide for hosting a secure static website with a custom domain in AWS, incorporating a public hosted zone for DNS management within the AWS cloud.

Step-by-Step Guide

  1. Step 1: Purchase and register a domain name with a third-party registrar (e.g., GoDaddy)
    - Sub-step: Choose and purchase a domain name for your website from a third-party registrar like GoDaddy or Route 53.
    - * Note: This step is handled outside of the AWS environment.
  2. Step 2: Create an S3 bucket with the exact name as the domain name:
    - Sub-step: In the AWS Management Console, navigate to the S3 service.
    - Sub-step: Create an S3 bucket with the exact name as the domain name (e.g., "example.com").
    - Sub-step: Configure the S3 bucket to host a static website and upload the website files, such as index.html.
    - Sub-step: Ensure the S3 bucket permissions allow public read access for the web content.
  3. Step 3: Set up a public hosted zone in Route 53 for DNS management :
    - Sub-step: In the AWS Management Console, navigate to the Route 53 service.
    - Sub-step: Create a new public hosted zone for your domain name (e.g., "example.com").
    - Sub-step: In the hosted zone, create the necessary DNS records for your website, such as an "A" record to point to the S3 bucket endpoint for your domain and any subdomains.
  4. Step 4: Update nameservers with the domain registrar to point to those provided by AWS Route 53:
    - Sub-step: Retrieve the nameserver values provided by AWS Route 53 for your hosted zone.
    - Sub-step: Log in to your domain registrar account (e.g., GoDaddy) and update the nameservers for your domain to point to the nameservers provided by AWS Route 53.
  5. Step 5: Request an SSL certificate from AWS Certificate Manager (ACM):
    - Sub-step: In the AWS Management Console, navigate to the ACM service.
    - Sub-step: Request a new SSL/TLS certificate in ACM for your custom domain and any subdomains you want to secure. Ensure that you select the option to validate the certificate using DNS validation. This will require adding specific DNS records in your public hosted zone for validation.
  6. Step 6: Configure HTTPS for your website using CloudFront and the ACM certificate:
    - Sub-step: In the AWS Management Console, navigate to the CloudFront service.
    - Sub-step: Create a CloudFront distribution to serve your static website content from the S3 bucket. During the CloudFront distribution setup, choose to "Add a custom SSL certificate" and select the SSL certificate issued by ACM for your custom domain and subdomains.
    - Sub-step: Ensure that the CloudFront distribution is configured to use the ACM certificate for HTTPS connections.
  7. Step 7: Test your website
    - Sub-step: After setting up the CloudFront distribution with the ACM certificate, access your website using HTTPS. Verify that your static website is accessible over HTTPS and that the SSL certificate is issued by ACM and valid for your custom domain and subdomains.
  8. Step 8: Create a record set in the existing hosted zone as an Alias type and point it to the CloudFront distribution:
    - Sub-step: In your Route 53 hosted zone, create a record set as an Alias type (A or AAAA) and point it to the CloudFront distribution domain name.
  9. Remember:
    - By following this comprehensive guide, you will be able to host a secure static website with a custom domain in AWS, incorporate a public hosted zone for DNS management within the AWS cloud, and enable HTTPS using an SSL certificate issued by AWS Certificate Manager (ACM), integrated with AWS services like S3, CloudFront, and Route 53. Do remember that some steps involve interactions with third-party registrars or providers for domain registration and DNS management.
  10. Final Step:
    - It's challenging to stand out among more impressive showcases, so here's a picture of an AI-generated adorable cat to refocus your attention!
Praised IT Cat