When running ec2-metadata with an http_proxy environment variable set, it will use the proxy defined there, effectively retrieving the metadata from of the proxy server.
This can confuse users, which consider that ec2-metadata returns the metadata from the current instance
This can be worked around by setting environment variable NO_PROXY=169.254.169.254, but this has to be known by the caller to appropiately set before invoking ec2-metadata. IMHO ec2-metadata should return the metadata of the instance it runs on regardless of the proxy settings in environment variables.
When running ec2-metadata with an
http_proxyenvironment variable set, it will use the proxy defined there, effectively retrieving the metadata from of the proxy server.This can confuse users, which consider that
ec2-metadatareturns the metadata from the current instanceThis can be worked around by setting environment variable
NO_PROXY=169.254.169.254, but this has to be known by the caller to appropiately set before invokingec2-metadata. IMHO ec2-metadata should return the metadata of the instance it runs on regardless of the proxy settings in environment variables.