Skip to content

Issue with CPU Setting for ECS Task Definitions on EC2

0

According to the AWS documentation, supported ECS task CPU values for tasks hosted on Amazon EC2 range between 0.25 vCPUs and 192 vCPUs. However, when I attempt to set the CPU value to 32 vCPUs, I receive an error stating "The CPU value is not valid. The valid values are .125 vCPU - 10 vCPU."

Here are the steps I followed and the errors I encountered:

  1. In the ECS Management Console, I set the CPU value to 32 vCPUs and the memory to 64 GB in the task definition UI (screenshot attached).
  2. I tried creating the task definition via JSON and received an "Invalid 'cpu' setting for task" error (screenshot attached).

Could someone please help me understand why I'm encountering this error despite the documentation stating that up to 192 vCPUs are supported?

1 2

asked 2 years ago843 views
1 Answer
1

Hello.

The supported values ​​for tasks running on EC2 or external instances are up to 10vCPU as described in the documentation below.
https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html#task_size

For tasks that run on EC2 or external instances, this field is optional. If your cluster doesn't have any registered container instances with the requested CPU units available, the task fails. Supported values for tasks that run on EC2 or external instances are between 0.125 vCPUs and 10 vCPUs.

EXPERT
answered 2 years ago
EXPERT
reviewed 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.