R53_ALIAS
R53_ALIAS
is a Route53 specific virtual record type that points a record at either another record or an AWS entity (like a Cloudfront distribution, an ELB, etc...). It is analogous to a CNAME
, but is usually resolved at request-time and served as an A
record. Unlike CNAME
records, ALIAS
records can be used at the zone apex (@
)
Unlike the regular ALIAS
directive, R53_ALIAS
is only supported on Route53. Attempting to use R53_ALIAS
on another provider than Route53 will result in an error.
The name should be the relative label for the domain.
Target should be a string representing the target. If it is a single label we will assume it is a relative name on the current domain. If it contains any dots, it should be a fully qualified domain name, ending with a .
.
The Target can be any of:
CloudFront distribution: in this case specify the domain name that CloudFront assigned when you created your distribution (note that your CloudFront distribution must include an alternate domain name that matches the record you're adding)
Elastic Beanstalk environment: specify the
CNAME
attribute for the environment. The environment must have a regionalized domain name. To get theCNAME
, you can use either the AWS Console, AWS Elastic Beanstalk API, or the AWS CLI.ELB load balancer: specify the DNS name that is associated with the load balancer. To get the DNS name you can use either the AWS Console (on the EC2 page, choose Load Balancers, select the right one, choose the description tab), ELB API, the AWS ELB CLI, or the AWS ELBv2 CLI.
S3 bucket (configured as website): specify the domain name of the Amazon S3 website endpoint in which you configured the bucket (for instance s3-website-us-east-2.amazonaws.com). For the available values refer to the Amazon S3 Website Endpoints.
Another Route53 record: specify the value of the name of another record in the same hosted zone.
For all the target type, excluding 'another record', you have to specify the Zone ID
of the target. This is done by using the R53_ZONE
record modifier.
The zone id can be found depending on the target type:
CloudFront distribution: specify
Z2FDTNDATAQYW2
Elastic Beanstalk environment: specify the hosted zone ID for the region in which the environment has been created. Refer to the List of regions and hosted Zone IDs.
ELB load balancer: specify the value of the hosted zone ID for the load balancer. You can find it in the List of regions and hosted Zone IDs
S3 bucket (configured as website): specify the hosted zone ID for the region that you created the bucket in. You can find it in the List of regions and hosted Zone IDs
Another Route 53 record: you can either specify the correct zone id or do not specify anything and DNSControl will figure out the right zone id. (Note: Route53 alias can't reference a record in a different zone).
Target health evaluation can be enabled with the R53_EVALUATE_TARGET_HEALTH
record modifier.
Last updated