An Alias record in Route 53 is fundamentally a DNS lookup optimization that lets you point a domain name directly to an AWS resource, bypassing a traditional DNS resolution step.
Let’s see this in action. Imagine you have a website hosted on an S3 bucket configured for static website hosting. You want to serve it from www.example.com.
Normally, you’d create a CNAME record for www.example.com pointing to the S3 website endpoint, like s3-website-us-east-1.amazonaws.com.
# Example DNS lookup for a CNAME
dig www.example.com CNAME
; <<>> DiG 9.16.1-Ubuntu <<>> www.example.com CNAME
;; global options: +cmd
;; ANSWER SECTION:
www.example.com. 300 IN CNAME s3-website-us-east-1.amazonaws.com.
Then, a resolver would have to perform another lookup for s3-website-us-east-1.amazonaws.com to get the actual IP addresses.
With an Alias record, you bypass this second lookup. You create an Alias record for www.example.com and select "S3 website endpoint" as the target, then choose your specific S3 bucket from the dropdown. Route 53 handles the underlying IP resolution internally.
# Example DNS lookup for an Alias record (shows A records directly)
dig www.example.com A
; <<>> DiG 9.16.1-Ubuntu <<>> www.example.com A
;; global options: +cmd
;; ANSWER SECTION:
www.example.com. 60 IN A 52.217.32.100
www.example.com. 60 IN A 52.217.32.12
www.example.com. 60 IN A 52.217.32.10
www.example.com. 60 IN A 52.217.32.11
Notice how dig www.example.com A directly returns A records, not a CNAME. This is Route 53 resolving the Alias to the IP addresses of the S3 endpoint.
The core problem Alias records solve is the inability to create a CNAME record at the apex (root) of your domain (e.g., example.com without www). DNS standards dictate that an apex record must be an A or AAAA record, not a CNAME. Alias records circumvent this by acting like a CNAME at the apex but resolving to A/AAAA records behind the scenes.
Internally, when you create an Alias record, Route 53 doesn’t just store a simple pointer. It associates your record with a specific AWS resource type (like an Application Load Balancer, CloudFront distribution, or S3 bucket). When a DNS query comes in for an Alias record, Route 53 performs a special, internal lookup for that AWS resource to get its current IP addresses or endpoint information, and then returns those as A or AAAA records to the client. This means Route 53 is actively monitoring the target resource’s IP address.
You control Alias records through the AWS Management Console, the AWS CLI, or infrastructure-as-code tools like CloudFormation or Terraform. When creating or updating a record set in Route 53, you select "Alias" as the record type, and then choose the target AWS resource from a list that dynamically populates based on your AWS account and region. You can point to:
- CloudFront distributions: For content delivery.
- API Gateway APIs: For RESTful services.
- Elastic Beanstalk environments: For web applications.
- Elastic Load Balancers (ALB, NLB, CLB): For distributing traffic to EC2 instances.
- S3 buckets configured as static website endpoints: For hosting static websites.
- VPC endpoint services: For private connectivity.
- Another Route 53 record in the same hosted zone: Useful for creating internal DNS names that resolve to other records.
The primary differentiator is the apex domain. If you need example.com (without www) to point to an AWS resource, you must use an Alias record. CNAMEs are strictly forbidden at the apex. For subdomains like www.example.com, you can use a CNAME, but an Alias record offers advantages. It’s generally preferred for pointing to AWS resources because it’s more efficient (fewer DNS lookups) and Route 53 automatically updates the IP addresses if the underlying AWS resource changes.
Route 53 Alias records are a Route 53-specific extension to DNS functionality. They are not a standard DNS record type that other DNS providers implement. When you use an Alias record, you are essentially delegating the IP address resolution for that name to Route 53’s knowledge of your AWS resources, rather than relying on a standard DNS resolution chain. This also means that the TTL (Time To Live) for Alias records is managed by Route 53 and often reflects the TTL of the underlying resource, and you cannot manually set it as you would for a CNAME.
The next logical step is understanding how Alias records interact with different AWS services, particularly how they enable seamless failover and routing policies.