Dondey
Dondey

Reputation: 277

AWS multiple scaling groups in single ECS cluster


I want to place some ECS services on two separate security groups.

Say services S1, S2 on security group SG1, and services S3, S4 on security group SG2.


One approach would be to place them on two separate ECS clusters.

However, I prefer to place them on the same ECS cluster.


So I thought of defining two austoscaling groups (ASG1, ASG2) on the cluster, in order to achieve that. This means that machines on ASG1 would be associated with SG1, and machines on ASG2 would beassociated with SG2.

My question is, how do I associate S1, S2 with the machines on ASG1, and S3, S4 with the machines on ASG2?

Upvotes: 0

Views: 688

Answers (2)

Bader Maluff
Bader Maluff

Reputation: 121

That's perfectly doable with ECS capacity providers, the logical steps are:

  1. Create the ASG1 and ASG2
  2. Assign the ASG clusters to your ECS cluster through Capacity Providers
  3. Assign each service (S1 and S2) to the each capacity provider that you'd like

Sorry about the short answer, I'm not very good at MD syntax, but I hope it helps.

Upvotes: 0

Shahad
Shahad

Reputation: 781

As far as I know there's no way to do that. What's the point of keeping it in one cluster at that point? A cluster is a set of capacity, so if you want one of those sets to have different security groups, and it would only have tasks from 1 of the services, just make a second cluster?

Upvotes: 0

Related Questions