In this step, we will create a CloudFront distribution to serve our website globally with HTTPS, then attach our custom domain and SSL certificate.
Open Amazon CloudFront console. On the Distributions page, click Create distribution.

At Step 1 — Choose a plan, select the Free plan ($0/month). This is sufficient for learning and development purposes.

Scroll down to view other plan options (Pro, Business, Premium). Keep Free selected and click Next.

At Step 2 — Get started:
FCAJ Book Shop Distribution).
At Step 3 — Specify origin:

In the Select S3 location popup:
fcaj-book-shop-by-tranvix).
After selecting the bucket, a warning will appear: “This S3 bucket has static web hosting enabled.” Click Use website endpoint to use the S3 website endpoint instead of the bucket endpoint.

The S3 origin field is now updated with the S3 website endpoint URL (e.g., fcaj-book-shop-by-tranvix.s3-website-ap-southeast-1.amazonaws.com).

Scroll down to the Settings section:

At Step 4 — Enable security:

At Step 5 — Review and create, review all your settings:

The distribution is created successfully! A green banner confirms “Successfully created new distribution.” The status will show Deploying — wait for it to finish.

Once the distribution is deployed, navigate to the General tab in the distribution details. In the Settings section, click Add domain under Alternate domain names.

At Step 1 — Configure domains:
tranvix.click).www subdomain (e.g., www.tranvix.click).
At Step 2 — Get TLS certificate:
*.tranvix.click).
At Step 3 — Review changes, verify:
tranvix.click and www.tranvix.click.
The distribution is updated successfully! A green banner confirms “Distribution updated successfully.” You can now see both alternate domain names and the Custom SSL certificate in the Settings section.

In the Settings section of the distribution, click Route domains to CloudFront to automatically create Route 53 DNS records.

In the Set up DNS routing popup, you will see 4 DNS records to be created (A and AAAA for both tranvix.click and www.tranvix.click), all pointing to the CloudFront distribution domain. Click Set up routing automatically.

A green banner confirms “DNS records successfully updated.”

Verify in Route 53: Navigate to your hosted zone and confirm that 4 new A/AAAA alias records have been created, pointing tranvix.click and www.tranvix.click to the CloudFront distribution.

Open a new browser tab and navigate to your domain (e.g., https://tranvix.click). The FCJ Book Store website should load successfully with HTTPS enabled.

DNS propagation may take a few minutes. If the domain does not resolve immediately, wait 5–10 minutes and try again. You can also test with https://www.tranvix.click.
Congratulations! Your website is now served globally through CloudFront with HTTPS enabled via your custom domain. In the next step, we will learn how to clean up all resources.