> 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/ec2/launch-types.md).

# Launch Types

## **On-demand Instances:**

* **For when you can't predict how long/short the job is** going to be and for **jobs which can't tolerate failure.**<br>
* **Pay-as-you-go**.<br>
* **Billing**:
  * **For Linux = billed every second, after the first minute.**
  * **All other operating systems = billed per hour.**

## **Reserved Instances:**

* **For steady usage apps** (like databases).
* **Long-term** (a **minimum of 1 year**).
* Has up to a **75% discount compared to on-demand**.<br>
* Can buy it for 1 year to 3 years
  * 3 years RI has a much higher discount than 1 year RI.<br>
* Can **pay all upfront, partially upfront and no upfront**.
  * All upfront has a much higher discount than no upfront.<br>
* There are also **2 other types of RIs:**
  * **Convertible RIs**
    * Can **change the type of instance type**, e.g. t2.micro to c5.large.
    * These have up to a **54% discount**.
  * **Scheduled RIs**
    * Can **launch within the time window you need them** but you still need to reserve it.

## **Spot Instances:**

* **If you can be flexible about when your applications run and if your applications can be interrupted.**
  * For example: image processing, batch jobs and any distributed workloads.<br>
* Have a **90% discount compared to on-demand**.
  * But that's because they **can be lost at any point of time** if someone else pays higher for it.

## **Dedicated Hosts:**

* **For companies with strict compliance requirements.**<br>
* It's a whole physical server dedicated to you.
  * **Very expensive.**<br>
* **Allocated for 3 years** so they need to be committed to.<br>
* **Access to the underlying hardware.**

## **Dedicated Instances:**

* They are **just dedicated hosts but you don't have access to the underlying hardware.**<br>
* **Pay by the hour.**


---

# 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, and the optional `goal` query parameter:

```
GET https://karansingh.gitbook.io/aws-saa-c02/ec2/launch-types.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
