| « PreviousNext » | |
![]() ![]() ![]() | Did this page help you? Yes | No | Tell us about it... |
You can create alias resource record sets using the Route 53 console or the Route 53 API. See the applicable topic:
For information about creating latency resource record sets that route queries to Elastic Load Balancing load balancers based on the latency between an end user and your load balancers in multiple Amazon EC2 regions, see Creating Latency Resource Record Sets.
To create alias resource record sets using the Route 53 console
If you created your Route 53 hosted zone and your Elastic Load Balancing load balancer using the same AWS account, skip to Step 2.
If you created the hosted zone and the load balancer using different accounts, perform the following steps to get the DNS name for the load balancer:
Sign in to the AWS Management Console using the AWS account that was used to create the load balancer for which you want to create an alias resource record set.
Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.
In the Navigation pane, click Load Balancers.
In the Load Balancers pane, select the load balancer for which you want to create a Route 53 alias resource record set.
In the bottom pane, on the Description tab, get the A record value for DNS Name. When you create the resource record set in Route 53 and specify the A record value, Route 53 responds to A and AAAA queries with the IPv4 or IPv6 address, as applicable.
Important
Do not use the value for the AAAA record or the dualstack (A or AAAA record) record.

Sign out of the AWS Management Console.
Sign in to the AWS Management Console again using the AWS account that was used to create the Route 53 hosted zone.
Open the Amazon Route 53 console at https://console.aws.amazon.com/route53/.
In the Route 53 console, do one of the following to display the record sets for the hosted zone in which you want to create alias resource record sets:
Click the row for the hosted zone, and click Go to Record Sets.
Double-click the row for the hosted zone.

Click Create Record Set.
Enter the applicable values. For information about a field, see the tool tip for the field. Note the following:
For Type, select the applicable value:
If you're creating an alias resource record set for an Elastic Load Balancing load balancer or an Amazon S3 bucket, select A - Ipv4 address.
If you're creating an alias resource record set for another resource record set in this hosted zone, select the type of the resource record set for which you're creating the alias.
For Alias, click Yes.
For Alias Target, do one of the following:
Click the Alias Target field, and choose a load balancer or bucket from the list. If you have a lot of load balancers or buckets, you can type the first few characters of the DNS name to filter the list.
If you choose an Amazon S3 bucket, the value of Alias Target changes to the Amazon S3 website endpoint for your bucket.
Enter the value that you got in Step 1 for the DNS name of the load balancer.
Enter the domain name of the Amazon S3 website endpoint in the following format:
s3-website-region.amazonaws.com
where region is the Amazon S3 region in which the bucket is hosted;
for example, us-east-1.
The value of Alias Hosted Zone ID appears automatically based on the value that you selected or entered for Alias Target.
For Routing Policy, choose the applicable value:
Simple: Route 53 responds to queries based only on the values in this resource record set.
Weighted: Route 53 responds to queries based on weighting that you specify in this and other record sets that have the same name and type. For more information about creating weighted alias resource record sets, see How to Create Weighted Alias Resource Record Sets.
Latency: Route 53 responds to queries based on regions that you specify in this and other record sets that have the same name and type. For more information about latency resource record sets, see Creating Latency Resource Record Sets.
Failover: Route 53 responds to queries using the resources that are associated with the primary resource record set, if any are healthy, or using the resources that are associated with the secondary resource record set otherwise. For more information about failover resource record sets, see Configuring Active-Passive Failover Using Route 53 Failover and Failover Alias Resource Record Sets.
For Evaluate Target Health, select Yes if you want Route 53 to determine whether to respond to DNS queries using this resource record set by checking the health of the resource record set specified by Alias Target. Note the following:
You must configure a health check for the resource record set that you specify in the Alias Target field.
You cannot set Evaluate Target Health to Yes and also assign a health check to an alias resource record set.
You cannot set Evaluate Target Health to Yes when the alias target is an Elastic Load Balancing load balancer.
We recommend that you set Evaluate Target Health to Yes only when you have enough idle capacity to handle the failure of one or more endpoints.

Click Create Record Set.
To create an alias resource record set, you use the ChangeResourceRecordSets action to create one or more
resource record sets that define the alias.
In the following example:
Z222222222 is the ID of the Route 53 hosted zone in which you're creating the alias resource record set.
example.com is the zone apex for which you want to create an alias.
www.example.com is a subdomain for which you also want to create an alias.
Z1111111111111 is an example of a hosted zone ID for the load balancer.
You can get the value of the load balancer's hosted zone ID, CanonicalHostedZoneNameID,
in the following ways:
Use the AWS Management Console. On the EC2 page, click Load Balancers in the Navigation pane.
Use the DescribeLoadBalancers
action. For more information, see "Actions" in the Elastic Load Balancing API Reference.
Use the Elastic Load Balancing elb-describe-lbs CLI command. For more information
about this CLI command, see the Elastic Load Balancing Quick Reference Card or the Elastic Load Balancing CLI help.
example-load-balancer-1111111111.us-east-1.elb.amazonaws.com is an example of a load balancer domain name with which Route 53 responds to queries for example.com and www.example.com.
You can get the domain name for a load balancer by using the same methods that you used to get the hosted zone ID for the load balancer.
Note
You can also create an alias resource record set by using the
elb-associate-route53-hosted-zone CLI command. For more information about the CLI command, see the
Elastic
Load Balancing Quick Reference Card or the Elastic Load Balancing CLI help.
POST /2012-12-12/hostedzone/Z222222222/rrset HTTP/1.1 <?xml version="1.0" encoding="UTF-8"?> <ChangeResourceRecordSetsRequest xmlns="https://route53.amazonaws.com/ doc/2012-12-12/"> <ChangeBatch> <Comment>This change batch creates two alias resource record sets, one for the zone apex, example.com, and one for www.example.com, that both point to example-load-balancer-1111111111.us-east-1.elb.amazonaws.com.</Comment> <Changes> <Change> <Action>CREATE</Action> <ResourceRecordSet> <Name>example.com.</Name> <Type>A</Type> <AliasTarget> <HostedZoneId>Z1111111111111</HostedZoneId> <DNSName>example-load-balancer-1111111111.us-east-1.elb.amazonaws.com.</DNSName> </AliasTarget> </ResourceRecordSet> </Change> <Change> <Action>CREATE</Action> <ResourceRecordSet> <Name>www.example.com.</Name> <Type>A</Type> <AliasTarget> <HostedZoneId>Z1111111111111</HostedZoneId> <DNSName>example-load-balancer-1111111111.us-east-1.elb.amazonaws.com.</DNSName> </AliasTarget> </ResourceRecordSet> </Change> </Changes> </ChangeBatch> </ChangeResourceRecordSetsRequest>
For more information about changing resource record sets, see Creating, Changing, and Deleting Resource Record Sets. For information about listing resource record sets, see GET ListResourceRecordSets in the Amazon Route 53 API Reference.
After you send your change request, check to ensure that your change was applied to all Route 53 DNS servers by polling
for the status of the change. When the change is complete, its status becomes INSYNC. For more information about
polling for the status of a change request, see Checking the Status of Your Change.