I have booted up an instance in side a private VPC. I assigned an ElasticIp address to it and I can ssh into the instance with no issues. However, DNS is not resolving :(
in my /etc/resolv.conf I have
nameserver 172.16.0.23
domain eu-west-1.compute.internal
search eu-west-1.compute.internal
but when I try and ping 172.16.0.23 I get
icmp_seq=156 Destination Net Unreachable
Which makes sense as I have no route to that private subnet. I can ping any external ip address i.e
ping 173.194.69.139
but I cannot
ping google.com
I created the VPC using the wizard I assume that the VPC is assigning the /etc/resolv.conf settings.
and the documentation says I should have external dns access, but I don't.
Can anyone help?
In the VPC Service control panel you can create DHCP Options Sets. Create one of those with the nameservers you want to use.
Then, under "Your VPCs", change the DHCP Options Set in use by your VPC to be the new one you just created.
If you are going to have more than a few servers in your VPC, you might want to consider running your own internal caching DNS resolver.
So it turns out it was something to do with AMI I was using. For some reason I could not get it to update the DNS servers.
I tried 3 other public AMI's and it worked fine on boot with no issues. It picked up the settings I defined in the DHCP settings.
So the answer here is just not to use that AMI in VPC.