> For the complete documentation index, see [llms.txt](https://docs.duplocloud.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.duplocloud.com/docs/automation-platform/overview/use-cases/hosts-vms/auto-scaling/ecs-auto-scaling.md).

# ECS Autoscaling

ECS Autoscaling has the ability to scale the desired count of tasks for the ECS Service configured in your infrastructure. Average CPU/Memory metrics of your tasks are used to increase/decrease the desired count value.

## Step 1: Add Auto-Scaling for Targets

Navigate to **Cloud Services** -> **ECS**. Select the **ECS Task Definition** where Autoscaling needs to be enabled > **Add Scaling Target**

Set the **MinCapacity** (minimum value 2) and **MaxCapacity** to complete the configuration.<br>

<div align="left"><img src="https://2471407984-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F68cb0s9ce5UIUKWPuYs8%2Fuploads%2F0lQHTuatFpi4pFsKR0xF%2Fimage.png?alt=media&amp;token=a605c757-a242-4071-859c-3f13fdf86f6e" alt=""></div>

## Step 2: Add Scaling Policy

Once Autoscaling for Targets is configured, Next we have to add Scaling Policy

Provide details below:

* **Policy Name** - The name of the scaling policy.
* **Policy Dimension** - The metric type tracked by the target tracking scaling policy.. Select from the dropdown
* **Target Value** - The target value for the metric.
* **Scalein Cooldown** - The amount of time, in seconds, after a scale in activity completes before another scale in activity can start.
* **ScaleOut Cooldown** -The amount of time, in seconds, after a scale out activity completes before another scale out activity can start.
* **Disable ScaleIn** - Disabling scale-in makes sure this target tracking scaling policy will never be used to scale in the Autoscaling group

This step creates the target tracking scaling policy and attaches it to the Autoscaling group

<div align="left"><img src="https://2471407984-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F68cb0s9ce5UIUKWPuYs8%2Fuploads%2FEYb7YQ1Tkys36VuBf3oU%2Fimage.png?alt=media&amp;token=d5fe5991-6656-4dcd-8d6b-65fe183e63f2" alt=""></div>

## Step 3: View Scaling Target and Policy

View the Scaling Target and Policy Details from the DuploCloud Portal. Update and Delete Operations are also supported from this view

![](https://2471407984-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F68cb0s9ce5UIUKWPuYs8%2Fuploads%2FoOd2x5RGEphYMVrldFHF%2Fimage.png?alt=media\&token=7dbe2f61-f689-4b34-8634-fcde67b52ef6)


---

# 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://docs.duplocloud.com/docs/automation-platform/overview/use-cases/hosts-vms/auto-scaling/ecs-auto-scaling.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.
