EC2 Metadata Python Library

JSON →
library 3.0.0 ·python
verified May 20, 2026

ec2-metadata is a Python library that provides an easy, cached interface to query the EC2 Instance Metadata Service (IMDS). It supports IMDSv2 exclusively and is designed for use within EC2 instances to retrieve details like instance ID, AMI ID, region, and more. The current version is 3.0.0, and it is actively maintained.

total hits 14
actors 6 distinct systems
last hit 1d ago Googlebot
Script
4
GPTBot
2
Search engines
2
Humans
2

top countries 🇺🇸 United States · 🇫🇷 France · 🇩🇪 Germany · 🇸🇬 Singapore · 🇮🇳 India