Look like there's no connection with servers. Can you reach them with a
Another thing you can try is to add the Google DNS to your list of nameservers:
echo nameserver 220.127.116.11 | sudo tee /etc/resolv.conf
And try the commands as well.
If the problem persists, I recommend you to contact Amazon to see why you are not able to connect to those domains.