EC2 IMDSv2 Enforcement

IMDSv1 is vulnerable to SSRF; IMDSv2 closes the gap. The enforcement and the migration.

Why

The EC2 Instance Metadata Service is the endpoint instances use to discover information about themselves: instance ID, region, attached IAM role credentials. The original protocol (IMDSv1) was vulnerable to a specific attack class: server-side request forgery (SSRF) in application code could return IAM credentials to attackers. IMDSv2 closes that vulnerability by requiring a session token; enforcing IMDSv2 across the fleet is one of the highest-leverage security improvements available.

What the vulnerability looks like:

The why is straightforward: IMDSv2 closes a specific, well-understood, exploited-in-the-wild attack class. Enforcing it is one of the easiest security wins in any AWS environment.

Enforce

Enforcement is a configuration change. The mechanics are simple; the discipline is in applying them across the entire fleet and preventing regressions.

Enforcement is the discipline that turns IMDSv2 from a feature into the actual operational reality.

Test

The transition to IMDSv2 is mostly painless because modern AWS SDKs handle the protocol transparently. Some legacy code paths need updates; the testing phase catches them before they cause production issues.

Instance metadata v2 enforcement is one of the highest-leverage AWS security improvements available. Nova AI Ops integrates with EC2 inventory and CloudTrail data, surfaces instances still allowing IMDSv1, and produces the migration-tracking report that the security team uses to drive remediation.