How to set route53 Alias Target for a domain to a ec2 instance IP instead of load balancer

Viewed 156

I am trying to configure route53 A record for a domain in its hosted zone using the Alias Target drop down i can see the following options like

  • S3 website endpoints
  • ELB Application load balancers,
  • ELB Classic load balancers,ELB
  • Network load balancers,
  • CloudFront distributions,
  • Elastic Beanstalk environments,
  • VPC Endpoints,
  • API Gateway APIs,
  • Record sets in this hosted zone

My application doesn't need a load balancer and is running in a single EC2 instance i wanted to provide the Alias target to the instance public IP instead of hard coding the instance public ip in the A record set. Because the public IP is ephemeral and gets changed after every restart.

one way to do this is to reserve a elastic IP and associate with a ENI and attach it to the ec2 instance and put the reserved elastic IP as A record in the record set.

Is there any other way to put the reserved elastic IP or instance ip as Alias Target in route53 record set.

0 Answers
Related