Check ID: autoscaling_group_launch_configuration_requires_imdsv2
Provider: AWS
Service: autoscaling
Severity: HIGH
Categories: secrets
Resource type: AwsAutoScalingAutoScalingGroup

What this check verifies

Amazon EC2 Auto Scaling launch configurations are evaluated for Instance Metadata Service settings. Instances should have the metadata endpoint enabled with http_tokens=required (enforcing IMDSv2), or have the metadata service disabled. Allowing http_tokens=optional or omitting the version leaves legacy access enabled.

Risk

Without enforced IMDSv2, SSRF and local escape paths can access IAM role credentials, enabling unauthorized API calls. Attackers could:
  • Exfiltrate data with stolen tokens
  • Move laterally and modify resources, degrading confidentiality and integrity

Recommendation

Require IMDSv2 for Auto Scaling-launched instances by setting http_tokens=required when metadata is enabled. If metadata is not needed, disable it. Apply least privilege to instance roles, set IMDSv2 as an account default, and use defense in depth (egress filtering, SSRF protections) to limit exposure.

Remediation

aws autoscaling create-launch-configuration --launch-configuration-name <new-launch-config> --image-id <AMI_ID> --instance-type <INSTANCE_TYPE> --metadata-options 'HttpTokens=required,HttpEndpoint=enabled'

References

Where this check fires

This check runs on every scheduled scan against your AWS account. Findings appear at Cloud Security → Findings filterable by Check ID = autoscaling_group_launch_configuration_requires_imdsv2. To re-evaluate after a fix, hit Run now on the account’s schedule under Cloud Security → Schedules — the next scan re-checks this control and marks the finding fixed or keeps it persistent.
← Back to AWS checks