liveBook · Manning

EC2 metadata service

The EC2 Instance Metadata Service is an instance-local HTTP service that provides metadata, configuration information, and temporary credentials to an Amazon EC2 instance.

How 2 Manning books explain it

Amazon Web Services in Action, Third Edition: An in-depth guide to AWS

The EC2 Instance Metadata Service is an instance-local HTTP service that provides metadata and planned-action information to an EC2 instance.

How it is used
Uses instance-local HTTP queries to detect planned Spot Instance interruptions and exposes an EC2 authentication security boundary.
How deep it goes
Explains the service’s local access, interruption check, response meanings, and security significance without detailing broader metadata categories.
Examples
Demonstrates curl against the spot instance-action endpoint, a 404 response, and a JSON stop action.
What you can do after
Diagnose impending Spot Instance termination by querying and interpreting the planned-action response.

Read how Amazon Web Services in Action, Third Edition: An in-depth guide to AWS explains EC2 metadata service →

Secure APIs

The EC2 metadata service is a locally accessible service that provides metadata and credential-related information for an Amazon EC2 instance.

How it is used
Uses the service as a concrete SSRF target that can expose instance IAM credentials.
How deep it goes
Explains the endpoint, credential impact, historical breach, and IMDSv2 mitigation without detailing service internals.
Examples
Uses the metadata endpoint, the Capital One breach, and a figure showing retrieval of AWS access keys.
What you can do after
Operate/configure EC2 instances with IMDSv2 rather than relying on unauthenticated metadata requests.

Read how Secure APIs explains EC2 metadata service →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.