Reputation: 458
I have few public ips for which I want my resources (ec2, lambda etc) under vpc access via some DNS.
On VM we usually edit hostfile but wanted to know how I can achieve this on AWS.
Say if external IP I want to access is 1.2.3.4, I want it to be resolved when I ping to some.example.com(non existing dns)
Thanks
Upvotes: 0
Views: 748
Reputation: 126
It sounds like you're trying to redirect public services or endpoints. For example, it sounds like you want to redirect google.com to another IP, maybe to something already inside your VPC, or another place on the internet all together via DNS response.
You should be able to use AWS private hosted zones to accomplish this. Create a new zone, say, google.com, and set an A record to your desired endpoint.
That said, checkout this or this for more information.
Upvotes: 1