Retrieving Instance Metadata#

Because your instance metadata is available from your running instance, you do not need to use the EC2 console or API tools. This can be helpful when you’re writing scripts to run from your instance. For example, you can access the local IP address of your instance from instance metadata to manage a connection to an external application. To view all categories of instance metadata from within a running instance, use the following command: