Thursday, July 14, 2016

Proxy server instance id instance of ec2-instance

If you are using the awscli to write your scripts than while checking the ec2 instance id from the instance you might be using the following command

 wget -q -O -  

The problem is if you are having your server on private subnet and using a proxy to connect to internet and if you use the above command it would give you the proxy server id instead of your instance-id. To overcome this issue use the following while writing your script.

 export NO_PROXY=;  

The resolves the ip from the instance and does not forward it to the proxy and you would get the instance id of the instance rather than the proxy server.


Post a Comment