NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #4006 most downloaded on PyPI
An easy interface to query the EC2 metadata API, with caching.
Last release 7 months ago
11 Feb 2026
Release timing varies
gaps range from 2 weeks to 1.3 years
Nearly every release is documented
notes for 32 of 32 stable releases
Nothing withdrawn
no release was ever pulled
9 years old
32 releases · first in 2017
Migrate from requests __ to urllib3 __ for HTTP requests.
Migrate from requests to urllib3 for HTTP requests.
This change reduces the number of dependencies and per-request overhead.
As a consequence, the EC2Metadata class no longer accepts a requests.Session object, but a urllib3.PoolManager.
Add a CLI for command line access to metadata values. For example, to output the current instance ID:
$ imds get instance-id
i-123456
Read more in the documentation.
Drop Python 3.9 support.
Add NetworkInterface.ipv6_prefix attribute.
One column per quarter.
Add NetworkInterface.ipv6_prefix attribute.
Thanks to Matthew Beaumont in PR #572.
* Support Python 3.14.
Support Python 3.14.
Add public_keys attribute and PublicKey class.
Add public_keys attribute and PublicKey class.
Thanks to Adam Novak in PR #562.
Add instance_life_cycle attribute.
Add instance_life_cycle attribute.
Thanks to Zeev Rotshtein for the feature request in Issue #440.
Drop Python 3.8 support.
Support Python 3.13.
* Drop Python 3.7 support.
Drop Python 3.7 support.
* Support Python 3.12.
Support Python 3.12.
Improve type hints for the iam_info, iam_security_credentials, and instance_identity_document attributes, with TypedDict\s on Python 3.8+.
Improve type hints for the iam_info, iam_security_credentials, and instance_identity_document attributes, with TypedDicts on Python 3.8+.
* Support Python 3.11.
Support Python 3.11.
Return None for availability_zone_id when the underlying endpoint returns HTTP 404.
Return None for availability_zone_id when the underlying endpoint returns HTTP 404.
Thanks to Amir Rossert in PR #350.
Add autoscaling_target_lifecycle_state attribute, as per AWS announcement __.
Add autoscaling_target_lifecycle_state attribute, as per AWS announcement.
Add tags attribute, a mapping of the instance tags. This requires the corresponding EC2 feature to be enabled on the instance.
Add tags attribute, a mapping of the instance tags. This requires the corresponding EC2 feature to be enabled on the instance.
Thanks to Renan Rodrigues in PR #344.
Add spot_instance_action attribute.
Thanks to Quimey Vivas in PR #346.
Add domain and partition attributes.
Thanks to Terry Griffin in PR #339.
Add instance_profile_name and iam_security_credentials attributes.
Thanks to Jean-Sebastien Jeannotte in PR #313.
* Drop Python 3.6 support.
Drop Python 3.6 support.
* Support Python 3.10.
Support Python 3.10.
Add availability_zone_id attribute.
Add availability_zone_id attribute.
Add type hints.
Use functools.cached_property on Python 3.8+, removing the dependency on the cached-property package.
Use functools.cached_property on Python 3.8+, removing the dependency on the cached-property package.
Stop distributing tests to reduce package size. Tests are not intended to be run outside of the tox setup in the repository. Repackagers can use GitHub's tarballs per tag.
Move license from ISC to MIT License.
Drop Python 3.5 support.
Support Python 3.9.
Move license from ISC to MIT License.
Move to use Instance Metadata Service version 2. See the README for a note on its increased security and porting to lock down the less secure version
Move to use Instance Metadata Service version 2. See the README for a note on its increased security and porting to lock down the less secure version 1. Thanks ThrawnCA and antuarc for the initial PR. (Issue #150)
Update Python support to 3.5-3.8, as 3.4 has reached its end of life.
Drop Python 2 support, only Python 3.4+ is supported now.
Drop Python 2 support, only Python 3.4+ is supported now.
Use timeout of 1 second for requests to the metadata API.
Use timeout of 1 second for requests to the metadata API.
Fix documentation rendering on PyPI.
Fix documentation rendering on PyPI.
Add interface_id to NetworkInterface.
Add interface_id to NetworkInterface.
Add ipv6s, subnet_ipv6_cidr_blocks, and vpc_ipv6_cidr_blocks attributes to NetworkInterface.
Add ipv6s, subnet_ipv6_cidr_blocks, and vpc_ipv6_cidr_blocks attributes to NetworkInterface.
Add instance_action and kernel_id attributes.
Add instance_action and kernel_id attributes.
Add iam_info, instance_profile_arn and instance_profile_id attributes.
Add iam_info, instance_profile_arn and instance_profile_id attributes.
Refactor handling non-200 responses to be more strict for attributes where 404's are allowed.
* Fix rendering of docs on PyPI.
Fix rendering of docs on PyPI.
All methods can now raise requests.exceptions.HTTPError if the metadata API returns a bad response, rather than failing during parsing or silently ret
All methods can now raise requests.exceptions.HTTPError if the metadata API returns a bad response, rather than failing during parsing or silently returning data from non-200 responses.
EC2Metadata can now be passed a requests.Session object for customization of the way requests are made.
Make public_* properties return None for instances that aren't public.
Make public_* properties return None for instances that aren't public.
Add network_interfaces attribute which is a list of NetworkInterface instances, which have many attributes themselves.
Add network_interfaces attribute which is a list of NetworkInterface instances, which have many attributes themselves.
Add security_groups and user_data attributes.
Add security_groups and user_data attributes.
First release on PyPI, featuring ec2_metadata object.
First release on PyPI, featuring ec2_metadata object.
Your coding agent can read these notes before it upgrades. Set up the MCP server →