do I need route53 to bind domain to ec2?

2019-05-07 13:16发布

问题:

Hi I am new to AWS world.

1) I have domain name bought and registred by some third party (not amazon), where I set DNS values

2) I have EC2 micro instance and in panel I can find Public DNS, and Public IP

3) I have also route53 service with A record binding to IP from 2).

I copied dns values from Delegation Set in route53 to 1)

QUESTIONS:

But will it be enough to bind 1) with public DNS from 2), what are the limitations?

In micro plan are DNS, and IP dynamic?

回答1:

You need to assign an Elastic IP to your instance and use that IP to configure the DNS A-record. An Elastic IP is the EC2 equivalent of a static IP. I don't think there is any additional cost to it as long as you don't leave an Elastic IP unassigned.

Once you have your Elastic IP, you can use the DNS tool of your domain registrar (I use GoDaddy) to bind the domain to your IP. You don't need Route53 to do that, but you can configure Route53 to replace your registrar's DNS servers if you prefer. For a simple setup with only one or two servers, I don't see much benefit in using Route53.



回答2:

You don't really need an EIP and Route53 does have an advantage (if your other DNS provider doesn't allow changes via an API).

You can automatically update the A record / CNAME in Route53 via a script, for example every time your EC2 instance starts, see Is there an aws provided feature to automatically add private dns to route53 for example

Even though the IP of EC2 instances is dynamic (changing if you stop the instance, but not if you simple restart it), using the Route53 API you don't need an EIP.