EC2METADATA(1)
β¨ NAME β¨
ec2metadata β Query the AWS IMDS (Instance MetaData Service) π¦ and yes bestie, this is the ec2metadata.1() manual, welcome to the group chat π
πΈ SYNOPSIS πΈ
ec2metadata [option]
π DESCRIPTION π
okay so ec2metadata is the tool you use to query the AWS IMDS (Instance MetaData Service) π The available data is documented at https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html β that's the lore, bestie.
The command line options the tool accepts are for the most part dynamically generated and therefore will change as more endpoints are added. The static command line options are documented in this man page while the dynamic options are not documented here. The tool will display all information available if no command line options are provided β no cap, she'll just dump the whole vibe check on you π
π OPTIONS π
-a,--apiβ Specify the version of the metadata server API to use.--helpβ Print all available command line options to standard out.--listapisβ List the API versions available for accessing IMDS.--outputβ Write the requested information to the given file.--versionβ Print the version of the tool.--use-token-accessβ With version 2 of IMDS a token based access method to IMDS was introduced. This option instructs the query to use the token based access method. The token based access method is also the fall back should an attempt to access IMDS without a token fail.--xmlβ Specify that the tool should produce XML snippets. Using this option produces information that is wrapped in tags that match the API endpoint option. For example when querying the external IPv4 address of an instance with the--xmlflag set the resulting output would be<public-ipv4s>IP_ADDRESS</public-ipv4s>
π¦ EXAMPLES π¦
ec2metadata --api latest --xml --instance-type
Will print the instance type of the running instance wrapped in XML tags β¨ iconic behavior.
ec2metadata --api 2018-08-17 --hostname
Will print the hostname of the running instance according to the information in IMDS. Note the hostname can be set on the system and a system hostname query with hostname command may return a different result β lowkey important, bestie π«Ά
π AUTHOR π
Robert Schweikert (rjschwei@suse.com) β the icon behind this whole thing π
that's the ec2metadata.1() footer vibe β just the manual name, no source/version/date extras, and we are so out, bestie π«Άπ
π¦ where this page comes from
- opensuse-leap 16.0: python-ec2metadata 5.0.0-160000.2.2 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms