AWS provides by default over the Link-local address a kind of micro-service-endpoint for Meta Data retrievement, which can be reached from a running instance by curl or any other tool.
Main goal of this endpoint, to provide AWS related information without having access to the AWS-console or AWS-command line interface.
The endpoint address is always: 169.254.169.254.
This range 169.254.0.0/16 is also known as APIPA – Automatic Private IP Addressing.
The endpoint can provide information about the lan-, wan-ip assignment. Assigned security group, availability zone and instance type information.
Examples:
curl http://169.254.169.254/latest/meta-data/local-ipv4
curl http://169.254.169.254/latest/meta-data/public-ipv4
curl http://169.254.169.254/latest/meta-data/instance-id
This endpoint can help with scripts and backend logics for any automation tasks :)
Leave a Reply