How to flush Amazon Linux AMI DNS cache?

Solution 1:

There is no DNS cache unless you have installed and configured nscd or a caching name server.

Solution 2:

This is because your EC2 instance uses amazon's dns server, which you can't refresh (e.g. 172.xxx.xxx.xxx). you just have to wait it out.