purple-shampoo-267505/03/2022, 3:08 PM
to deploy EC2-backed ECS services (not Fargate_)_ and having trouble setting them up with proper capacity providers. They have an ASG (via
) but by default the group doesn't scale for new deploys. I thought the answer might be to create an explicit
which will respond to task placement failures by provisioning new instances, but there seems to be a circular dependency between the different elements like so:
array on creation, but
needs the ARN of an
is created via
which is not available until after the cluster is created.
I hope that's enough context! I can provide more code if that would be useful. Basically where I want to get to is an ASG with
instances in, where every time a
happens the group scales up to
instances to place new tasks, then scales back down to
instances, getting rid of the old ones. Right now
completes successfully but new tasks don't happen unless I specify the ASG should be permanently twice as big as it needs to be.