> For the complete documentation index, see [llms.txt](https://cortex-docs.paloaltonetworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cortex-docs.paloaltonetworks.com/posture-rules/cloud-saas-active-directory-posture-rules/cortex-posture-query-based-rules/detection-rules-by-name/aws-auto-scaling-group-launch-configuration-not-configured-with-instance-metadata-service-v2.md). Agents can also search and read this documentation through its [MCP server](https://cortex-docs.paloaltonetworks.com/~gitbook/mcp).

# AWS Auto Scaling group launch configuration not configured with Instance Metadata Service v2...

### Synopsis

| Field               | Value                                                                                                 |
| ------------------- | ----------------------------------------------------------------------------------------------------- |
| Rule Name           | AWS Auto Scaling group launch configuration not configured with Instance Metadata Service v2 (IMDSv2) |
| Rule Type           | Detection                                                                                             |
| Finding Type        | AWS Auto Scaling group launch configuration not configured with Instance Metadata Service v2 (IMDSv2) |
| Finding ID          | 60000815                                                                                              |
| Generates a Finding | This detection rule also generates a finding                                                          |
| Severity            | Medium                                                                                                |
| Category            | CONFIGURATION                                                                                         |
| Cloud Providers     | AWS                                                                                                   |
| Platform Module     | CSPM                                                                                                  |
| Asset Types         | AWS\_AUTO\_SCALING\_LAUNCH\_CONFIGURATION                                                             |

### Description

Auto Scaling groups launched with optional Instance Metadata Service version 2 (IMDSv2) have a misconfiguration that increases the risk of unauthorized access to EC2 instance metadata.

The AWS EC2 Instance Metadata Service provides instance-specific information. IMDSv2 enhances security by requiring secure session authentication for all requests. Using IMDSv2 is crucial because enabling it provides strong authentication, preventing unauthorized access to sensitive metadata. Without IMDSv2, attackers could potentially exploit weaknesses in IMDSv1, compromising sensitive information like access keys and credentials stored in instance metadata, leading to lateral movement and data breaches.

Failure to enforce IMDSv2 exposes instances to credential theft and unauthorized access, potentially resulting in data breaches, account compromises, and increased attack surface. Using IMDSv2 significantly reduces the risk of unauthorized access and improves the overall security posture of EC2 instances within Auto Scaling groups.

To remediate this, ensure all Auto Scaling group launch configurations explicitly enable IMDSv2. This should be enforced during the creation of new launch configurations and retroactively applied to existing ones. Regularly review and audit Auto Scaling group configurations to detect and address any deviations from this best practice.

### Remediation

You cannot modify a launch configuration after you create it. To change the launch configuration for an Auto Scaling group, use an existing launch configuration as the basis for a new launch configuration with IMDSv2 enabled.

To update the Auto Scaling group to use the new launch configuration follow the steps below:

1. Open the Amazon EC2 console.
2. On the left navigation pane, under 'Auto Scaling', choose 'Auto Scaling Groups' and Choose 'Launch configurations' near the top of the page.
3. Select the reported launch configuration and choose Actions, then click 'Copy launch configuration'. This sets up a new launch configuration with the same options as the original, but with 'Copy' added to the name.
4. On the 'Create launch configuration' page, expand 'Advanced details' under 'Additional Configuration - optional'.
5. Under the 'Advanced details', go to the 'Metadata version' section.
6. Select 'V2 only (token required)' option.
7. When you have finished, click on the 'Create launch configuration' button at the bottom of the page.
8. On the navigation pane, under Auto Scaling, choose Auto Scaling Groups.
9. Select the check box next to the Auto Scaling group.
10. A split pane opens up at the bottom part of the page, showing information about the group that's selected.
11. On the Details tab, click on the 'Edit' button adjacent to the 'Launch template' option.
12. On top right, click 'Switch to launch configuration'
13. Under the 'Launch configuration' dropdown, select the newly created launch configuration.
14. When you have finished changing your launch configuration, click on the 'Update' button at the bottom of the page.

After you change the launch configuration for an Auto Scaling group, any new instances are launched with the new configuration options. Existing instances are not affected. To update existing instances,

1. Log in to the AWS Console
2. In the console, select the specific region from the region drop-down in the top right corner, for which the alert is generated.
3. Refer the following URL:

<https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-IMDS-existing-instances.html>

To delete the reported Auto Scaling group launch configuration follow the steps below:

1. Open the Amazon EC2 console.
2. On the left navigation pane, under 'Auto Scaling', choose 'Auto Scaling Groups' and Choose 'Launch configurations' near the top of the page.
3. Select the reported launch configuration and choose Actions, then click 'Delete launch configuration'.
4. Click on the 'Delete' button to delete the autoscaling group launch configuration.

NOTE: Ensure adequate precautions before you enforce the use of IMDSv2, as applications or agents that use IMDSv1 for instance metadata access will break.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://cortex-docs.paloaltonetworks.com/posture-rules/cloud-saas-active-directory-posture-rules/cortex-posture-query-based-rules/detection-rules-by-name/aws-auto-scaling-group-launch-configuration-not-configured-with-instance-metadata-service-v2.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
