Rebecca
Rebecca

Reputation: 351

assign a domain name to ec2 instance w/o elastic IP

I registered a domain name with AWS Route 53 as mydomain.com. Is there anyway that I can assign e.g. ns1.mydomain.com as a public hostname to an EC2 which does NOT have a Elasti IP?

Thanks

Upvotes: 2

Views: 1326

Answers (2)

Hamin Mousavi
Hamin Mousavi

Reputation: 11

  • Utilize a load balancer in front of the instance and assign the public hostname to the load balancer.

  • Use S3 webpage redirect and assign the hostname to the S3 URI.

If the problems is that you don't have any elastic IP's left, you can request for more. This should be resolved within about 15 minutes.

Upvotes: 1

Chris Williams
Chris Williams

Reputation: 35188

You can assign the domain name to any IP address of an instance. However be aware of the following limitations:

  • If a domain name is assigned to a private IP, it will not be connectable without network access to that IP
  • If the domain is assigned to a non-elastic public IP if the instance stops and starts you would lose the public IP so would need to update the DNS resolution.

If you have a public facing application, but want to keep network traffic that directly connects to the instance private you should look at using an ELB in front of the application to provide a security boundary between the internet and your application.

Upvotes: 2

Related Questions