1

I'm trying to automate my dns in my ec2 VPC. What I want is:

  1. VPC boots up
  2. VPC gets instance info from http://169.254.169.254/latest/meta-data/
  3. VPC looks up Name tag for instance
  4. VPC sets hostname to this tag value, and puts that hostname into Route53 for dns resolution

My problem is with #3 on private instances. ec2-describe-tags hits ec2.amazonaws.com, and this fails when my machine is private.

Is there any way for a private ec2 instance (as in, has no public ip address) to get the name value so I can have this configure things?

1

Why does ec2-describe-tags fail when you're in a private subnet?

It should route the request out of the NAT instance, assuming you've set one up in a public subnet, and added it as the 0.0.0.0/0 route in the private subnet route table.

See the VPC NAT documentation for more information: http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_NAT_Instance.html

  • Right, I guess I need to set this up anyways for machine updates and such. Thanks for the links. – Steve Armstrong Dec 3 '13 at 17:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.