<p>I don't think what you want to do is possible. </p>

<p>I suggest you to use a managed compute environment so you don't care about cluster resources. Set the min and max CPU for the compute environment (min 0 is recommended so you don't waste many when no jobs are running). Then only set the resources needed by your jobs and batch will add compute capacity to satisfy the demand. </p>

<p>Your costs will be the same because batch will create an ASG(autoscaling group) and ECS cluster but it only charges you for EC2 instances.  </p>

CC BY-SA 4.0
2019-11-18T17:33:16.667Z
Perhaps you could add more details and explain the abbreviation ASG
030
CC BY-SA 4.0
2019-11-18T18:03:21.213Z
Done, thanks. ASG is autoscaling group.
Bruno Gonzalez
CC BY-SA 4.0
2019-11-18T14:20:05.230Z
2019-11-18T18:02:53.290Z
2019-11-18T18:02:53.290Z
Bruno Gonzalez
<p>I would like AWS Batch to use one of my existing ECS clusters.</p>

<p>The problem is that when I create an unmanaged "compute environment" from the AWS Batch service, it doesn't allow me to specify an existing ECS cluster and it will automatically deploy a new ECS cluster (It doesn't let you choose). The reason why I want to associate my existing ECS cluster with the unmanaged "compute enviromnent" is because I don't want to pay for two ECS cluster when I already have one... </p>

<p>Any suggestions/alternatives?</p>

<amazon-web-services>
AWS Batch use existing ECS cluster
miticoluis
# AWS Batch use existing ECS cluster

(Asked by: username_0 on 2018-02-26)

I would like AWS Batch to use one of my existing ECS clusters.

The problem is that when I create an unmanaged "compute environment" from the AWS Batch service, it doesn't allow me to specify an existing ECS cluster and it will automatically deploy a new ECS cluster (It doesn't let you choose). The reason why I want to associate my existing ECS cluster with the unmanaged "compute enviromnent" is because I don't want to pay for two ECS cluster when I already have one...

Any suggestions/alternatives?

**Tags:** amazon-web-services


---

## 1 answers

### Answer by username_1 on 2019-11-18. Score: 1

I don't think what you want to do is possible.

I suggest you to use a managed compute environment so you don't care about cluster resources. Set the min and max CPU for the compute environment (min 0 is recommended so you don't waste many when no jobs are running). Then only set the resources needed by your jobs and batch will add compute capacity to satisfy the demand.

Your costs will be the same because batch will create an ASG(autoscaling group) and ECS cluster but it only charges you for EC2 instances.

> **Comments:**
> **username_2**: Perhaps you could add more details and explain the abbreviation ASG  
> **username_1**: Done, thanks. ASG is autoscaling group.  

---

