Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create an "alias target" A DNS record in Route53 for an elasticache replication group

I'm creating an ElastiCache replication group for Redis with Cloudformation, which does not allow to specify the group name or clusters name (they are randomly generated gibberish).

So my idea is to create a DNS record to alias it, but I don't know how to get the hosted zone id for the alias target.

I could go for a CNAME, but if the A record alias option is possible I would rather do that.

like image 336
fortran Avatar asked Aug 31 '15 14:08

fortran


1 Answers

It's not currently possible to create an Alias Target to an ElastiCache Replication Group.

According to the documentation section "Choosing Between Alias and Non-Alias Resource Record Sets" (emphasis/formatting mine):

Instead of an IP address or a domain name, an alias resource record set contains a pointer to

  • a CloudFront distribution,
  • an Elastic Beanstalk environment,
  • an ELB classic or application load balancer,
  • an Amazon S3 bucket that is configured as a static website, or
  • another Amazon Route 53 resource record set in the same hosted zone.

ElastiCache is not in this list, so using a CNAME pointing to the replication group's endpoint (e.g., !GetAtt ReplicationGroup.PrimaryEndPoint.Address in your CloudFormation template) is your only option.

like image 52
wjordan Avatar answered Oct 04 '22 21:10

wjordan