1. What is the main benefit of AWS IMDSv2 compared to IMDSv1?
IMDSv2 adds a hop-count aware session token. This reduces basic SSRF and open-proxy abuse. Pair it with egress controls and least-privilege roles.
aws ec2 modify-instance-metadata-options --http-endpoint enabled --http-tokens required --instance-id i-123456