> For the complete documentation index, see [llms.txt](https://karansingh.gitbook.io/aws-saa-c02/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://karansingh.gitbook.io/aws-saa-c02/auto-scaling-groups-asg/launch-configurations-and-launch-templates.md).

# Launch Configurations & Launch Templates

## Launch Configurations

* **Instance configuration template** that an **Auto Scaling group uses to launch EC2 instances**.<br>
* Includes:
  * Amazon Machine Image (AMI) ID.
  * Instance type.
  * Key pair.
  * Security groups.
  * And all the other parameters that you use to launch EC2 instances.<br>
* Can **specify your launch configuration with multiple Auto Scaling groups**.<br>
* **Can only specify one launch configuration for an Auto Scaling group at a time**.<br>
* **Can't change a launch configuration after you've created it**.
  * To change the launch configuration for an Auto Scaling group, you must create a launch configuration and then update your Auto Scaling group with it.

## Launch Templates

* **Similar to a launch configuration but better.**<br>

* Includes:
  * Amazon Machine Image (AMI) ID.
  * Instance type.
  * Key pair.
  * Security groups.
  * And all the other parameters that you use to launch EC2 instances.<br>

* However, defining a launch template instead of a launch configuration **allows you to have multiple versions of a template**.

  * With versioning, you can create a subset of the full set of parameters and then reuse it to create other templates or template versions.<br>
  * For example, you can create a default template that defines common configuration parameters and allow the other parameters to be specified as part of another version of the same template.

* **Launch templates ensure you have access to the latest features and improvements**.<br>

* **Can also use Launch Templates to launch EC2 Instances, whereas with Launch Configurations, you can't**.


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://karansingh.gitbook.io/aws-saa-c02/auto-scaling-groups-asg/launch-configurations-and-launch-templates.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
