1 Answer
- Newest
- Most votes
- Most comments
1
Does the ECS task role have a policy which allows the 2 following IAM Permissions?
- ecs:GetTaskProtection:
- ecs:UpdateTaskProtection
What version of the ECS Container agent are you running? It needs to be 1.65.0 or later
Relevant content
- asked 2 years ago
- asked a year ago
- asked a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
thanks. I have try to add the policy:
into my ec2 ECS task role and definition task role , but still
my ecs-agent version is 1.79.2 and the doc mentioned with the "This operation is only supported for tasks belonging to an Amazon ECS service. Invoking this operation for a standalone task will result in an TASK_NOT_VALID failure." https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_UpdateTaskProtection.html maybe my task is standalone task? But my task is running as ecs task in ec2 auto scaling.
EC2 AutoScaling is for launching instances into your cluster. You can then either launch standalone tasks onto those cluster instances, or create an ECS Service to manage multiple tasks for the same Task Definition. If you went through the workflow of launching a single task, its a standalone task.
However, I don't think shouldn't be causing the error you see now (it might cause an error after this first one is fixed, but your failure is earlier in the process)