Lab Goal
So far, your application is running on Amazon ECS behind an Application Load Balancer.
Right now your application URL probably looks like this:
http://restaurant-alb-123456789.us-east-1.elb.amazonaws.com
This URL works, but it doesn't look professional.
Real companies use custom domains such as:
By the end of this lab you will:
- Connect your domain to your ALB.
- Learn how DNS works.
- Create a Route 53 Hosted Zone.
- Point your domain to your ALB.
- Secure your website with HTTPS.
- Request a free SSL certificate using AWS Certificate Manager (ACM).
- Redirect HTTP traffic to HTTPS.
Production Architecture
Before this lab
Users
↓
ALB DNS Name
↓
Application Load Balancer
↓
Amazon ECS
↓
Containers
After this lab
Users
↓
www.myrestaurant.com
↓
Route 53
↓
Application Load Balancer (HTTPS)
↓
Amazon ECS
↓
Containers
Why Do Companies Use Route 53?
Imagine opening Amazon.
You type
www.amazon.com
You never type
amazon-alb-8723467.us-east-1.elb.amazonaws.com
That long address belongs to AWS.
Customers don't want to remember long AWS addresses.
Instead,
companies buy a domain.
Route 53 tells the Internet:
"When someone types this domain, send them to my Load Balancer."
What is DNS?
DNS stands for
Domain Name System
Think of DNS as the Internet's phone book.
People remember
www.google.com
Computers understand
142.250.72.206
DNS translates names into addresses.
Without DNS,
people would need to remember IP addresses.
What is Route 53?
Amazon Route 53 is AWS's DNS service.
It allows you to:
- Register domains
- Manage DNS records
- Connect domains to AWS services
- Route users to your application
Part 1 – Buy a Domain
If you already own a domain,
you can use it.
Examples:
myrestaurant.com
jumptotech.com
studentproject.net
If you do not own one,
purchase one from:
- Route 53
- Namecheap
- GoDaddy
- Squarespace Domains
For this lab we assume you already have one.
Part 2 – Create a Hosted Zone
Open
AWS Console
Search
Route 53
Click
Hosted Zones
Click
Create Hosted Zone
Fill in
Domain Name
myrestaurant.com
Type
Public Hosted Zone
Click
Create Hosted Zone
Why Public Hosted Zone?
A Public Hosted Zone allows anyone on the Internet to reach your website.
Private Hosted Zones are used only inside AWS VPCs.
For websites,
always choose
Public Hosted Zone
Part 3 – Understand the Records
AWS automatically creates:
NS
SOA
Do not delete them.
These records are required for DNS to work.
Part 4 – Create an Alias Record
Click
Create Record
Choose
Record Type
A
Turn ON
Alias
Alias Target
Choose
Application Load Balancer
Select your ALB.
Example
restaurant-alb
Click
Create Record
Done.
Now
myrestaurant.com
points to your Load Balancer.
Why Do We Use an Alias Record?
Normally,
an A record points to an IP address.
Example
192.168.1.20
But an AWS Load Balancer does not have one fixed IP address.
Its IP addresses can change.
Instead,
AWS provides an Alias Record.
The Alias automatically follows your Load Balancer even if its IP addresses change.
This is why AWS recommends using Alias records with ALBs.
Part 5 – Test the Website
Wait a few minutes.
Open your browser.
Visit
http://myrestaurant.com
Your website should load.
If it does,
Route 53 is working correctly.
Why is the Website Still Not Secure?
Look at your browser.
You will probably see
Not Secure
Why?
Because your website is still using
HTTP
instead of
HTTPS
What is HTTPS?
HTTP sends information without encryption.
Anyone between the user and your website could potentially read the traffic.
HTTPS encrypts all communication.
Examples:
- Login information
- Credit card numbers
- Passwords
- Personal information
Modern websites always use HTTPS.
What is AWS Certificate Manager (ACM)?
AWS Certificate Manager creates SSL certificates.
Certificates prove that your website really belongs to you.
Good news:
AWS ACM public certificates are free to use with supported AWS services like an ALB.
Part 6 – Request a Certificate
Open
AWS Console
Search
Certificate Manager
Click
Request Certificate
Choose
Request a Public Certificate
Click
Next
Domain Name
Example
myrestaurant.com
Also add
www.myrestaurant.com
Click
Next
Validation Method
Choose
DNS Validation
Click
Request
Why DNS Validation?
AWS must verify that you own the domain.
Instead of sending an email,
AWS asks you to create a DNS record.
This is easier and renews automatically while the DNS validation record remains in place.
Part 7 – Validate the Certificate
Open the certificate.
Click
Create Records in Route 53
AWS automatically creates the required DNS validation record.
Wait a few minutes.
Certificate status changes from
Pending Validation
to
Issued
Only after the status becomes Issued can the certificate be attached to your Load Balancer.
Part 8 – Add HTTPS to the ALB
Open
EC2
↓
Load Balancers
Select your ALB.
Open
Listeners and Rules
Click
Add Listener
Choose
HTTPS
Port
443
Certificate
Select
myrestaurant.com
Default Action
Forward to your existing Target Group.
Click
Create
Done.
Your website now supports HTTPS.
Why Port 443?
Port
80
is used for HTTP.
Port
443
is used for HTTPS.
Most websites today use HTTPS on port 443.
Part 9 – Redirect HTTP to HTTPS
Many users will still type
http://myrestaurant.com
We want AWS to automatically redirect them.
Select
HTTP Listener
Port 80
Click
Edit Rules
Default Action
Choose
Redirect
Configure:
Protocol
HTTPS
Port
443
Status Code
HTTP 301
Save.
Now every HTTP request automatically becomes HTTPS.
What is HTTP 301?
301 means
Permanent Redirect
Browsers remember this redirect.
Users automatically use HTTPS in future visits.
Verify Everything Works
Open
https://myrestaurant.com
Check:
✅ Website loads
✅ Browser shows a lock icon
✅ URL begins with
https://
If you still see "Not Secure," verify that:
- The ACM certificate status is Issued.
- The HTTPS listener is using the correct certificate.
- Your Route 53 Alias record points to the correct ALB.
- DNS changes have had time to propagate.
Common Problems
Problem 1
Certificate stuck in
Pending Validation
Possible cause:
DNS validation record was not created correctly or DNS changes have not propagated yet.
Problem 2
Website still opens with HTTP
Possible cause:
No redirect rule on port 80.
Problem 3
Browser says
Certificate Error
Possible causes:
- Wrong certificate attached.
- Certificate does not include the domain you are visiting.
- Certificate is not in the same AWS Region as the ALB.
Problem 4
Website cannot be reached
Possible causes:
- Alias record points to the wrong ALB.
- Load Balancer is unhealthy.
- Security Groups are blocking traffic.
Production Best Practices
Always:
- Use HTTPS for public websites.
- Redirect HTTP to HTTPS.
- Keep DNS records organized.
- Use Alias records for ALBs.
- Monitor certificate expiration (ACM-managed public certificates renew automatically when validation remains in place and the certificate is still in use).
Lab Checklist
Complete the following:
✅ Create a Public Hosted Zone
✅ Create an Alias Record
✅ Point your domain to the ALB
✅ Request an ACM Public Certificate
✅ Validate the certificate using DNS
✅ Wait for the certificate status to become Issued
✅ Add an HTTPS Listener (443)
✅ Attach the ACM Certificate
✅ Redirect HTTP (80) to HTTPS (443)
✅ Open the website using HTTPS
Interview Questions
1. What is Route 53?
AWS's DNS service that maps domain names to AWS resources and other destinations.
2. What is DNS?
The Domain Name System translates human-readable domain names into network addresses.
3. Why do companies use custom domains?
To provide a professional, memorable address for customers instead of AWS-generated hostnames.
4. What is AWS Certificate Manager?
A service that issues and manages SSL/TLS certificates for supported AWS services.
5. Why do we use HTTPS?
To encrypt communication between users and the application, protecting sensitive data in transit.
6. What is the difference between HTTP and HTTPS?
HTTP sends traffic without encryption. HTTPS uses TLS to encrypt the connection.
7. Why do we use an Alias Record instead of a normal A Record?
Because an Application Load Balancer does not have a fixed IP address. Alias records automatically track the AWS resource.
8. Why do we redirect HTTP to HTTPS?
To ensure all users access the secure version of the website, even if they initially enter an HTTP URL.
Homework
- Purchase or use an existing domain.
- Create a Public Hosted Zone in Route 53.
- Create an Alias A record pointing to your ALB.
- Request an ACM public certificate for your domain.
- Validate the certificate using DNS.
- Add an HTTPS listener (443) to your ALB.
- Configure HTTP (80) to redirect to HTTPS.
- Verify that your website loads with a valid HTTPS connection.
- Take screenshots of:
- Hosted Zone
- Alias Record
- ACM Certificate (Issued)
- ALB Listeners
- Website showing the HTTPS lock icon
After completing this lab, students will have a professional deployment with a custom domain and encrypted HTTPS traffic, similar to what is commonly used for public-facing applications in AWS.
Top comments (0)