Allows querying EC2 instance metadata
Project description
EC2 Instance Metadata
This allows querying EC2 instance metadata.
It uses IMDSv2. Session credentials are NOT available using this.
Command line tools
ec2-metadata
Usage: ec2-metadata KEY
This returns an attribute from the instance metadata.
The KEY can be any of the data values from https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instancedata-data-categories.html
instance-identity
Usage: instance-identity KEY
This returns an attribute from the instance identity document.
The key can be any of the data values from https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-identity-documents.html
Python module
instance_identity_document() -> Dict[str, str]:
This returns the identity document for the instance.
instance_identity(key: str) -> str:
This returns an attribute from the instance identity document.
The key can be any of the data values from https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-identity-documents.html
ec2_metadata(key: str) -> str:
This returns an attribute from the instance metadata.
The key can be any of the data values from https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instancedata-data-categories.html
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for query_ec2_metadata-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b9ec889e1672d96f15e4148431c035da2d67614e89c8ef79e438edb2fe3a4b15 |
|
MD5 | 5b0b345e0d23a6af7a214fb33081640b |
|
BLAKE2b-256 | faa202230afcfadf1a19f897bd011da867625569f4539e5745d8cd527a05917d |