AWS ECS EC2 Rolling Updates - Insufficient CPU units available

0 votes

I am running one AWS ECS Service with two tasks (they are the same) and one container per task. I would like to know, how to properly manage rolling updates?

As per information, I found inside AWS docs, a rolling update is the default option.

Task and services are described inside Terraform and I do update via aws cli:

aws ecs update-service --cluster $(ECS_CLUSTER) --service $(ECS_SERVICE) --force-new-deployment --task-definition $(ECS_TASK_DEFINITION)

Task configuration: +-------------+---------+ | Task memory | 900 MiB | +-------------+---------+ | Task CPU | 900 | +-------------+---------+ Container configuration: +-------------+---------+ | CPU | 256 | +-------------+---------+ | Hard limit | 900 MiB | +-------------+---------+ | Soft limit | 512 MiB | +-------------+---------+


For this cluster, I have registered one t3a.small instance, so available resources are the following:

  • CPU: 2048 units

  • Memory: 1961 MiB

This is suitable for running two tasks, however, I am facing issues during deployment:

Service web was unable to place a task because no container instance met all of its requirements. The closest matching container instance 123123123 has insufficient CPU units available. For more information, see the Troubleshooting section.

Service deployment is configured like this:

  • Minimum healthy per cent 50

  • Maximum per cent 200

So my guess was, one service will be killed and the other one will be updated, however, I am receiving this error instead.

How this should be configured correctly?

Apr 29, 2022 in AWS by Soham
• 9,710 points

edited Mar 4 5 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP