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
File details
Details for the file query_ec2_metadata-0.1.2.tar.gz
.
File metadata
- Download URL: query_ec2_metadata-0.1.2.tar.gz
- Upload date:
- Size: 6.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.6 CPython/3.6.9 Linux/5.4.0-1047-aws
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 53db54d81500ac03d6aa8f9700fd956dc90f48e22d62898ce28b9692974f20b7 |
|
MD5 | 606b0175725e8582040811a05773cecd |
|
BLAKE2b-256 | 6cc7e2ff4b676d3e8fc781879834696669a8581fe3a212a6c92761665c35acf0 |
File details
Details for the file query_ec2_metadata-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: query_ec2_metadata-0.1.2-py3-none-any.whl
- Upload date:
- Size: 6.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.6 CPython/3.6.9 Linux/5.4.0-1047-aws
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b9ec889e1672d96f15e4148431c035da2d67614e89c8ef79e438edb2fe3a4b15 |
|
MD5 | 5b0b345e0d23a6af7a214fb33081640b |
|
BLAKE2b-256 | faa202230afcfadf1a19f897bd011da867625569f4539e5745d8cd527a05917d |