When registering a task, if you specify an invalid cpu or memory value, you receive the following error: An error occurred (ClientException) when calling the RegisterTaskDefinition operation: Invalid ‘ cpu ‘ setting for task. For more information, see the Troubleshooting section of the Amazon ECS Developer Guide.
Remediation
To resolve this issue, you must specify a supported value for the task CPU and memory in your task definition. https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-cpu-memory-error.html