I am setting up a Github Actions CI to AWS Fargate. But facing a permission issue on the step of Deploy Amazon ECS task definition.
Getting the following error:
##[error]Failed to register task definition in ECS: Fargate requires task definition to have execution role ARN to support ECR images.
Already verified the following:
- ecsTaskExecutionRole exists
- AmazonECSTaskExecutionRolePolicy exists
- AmazonECSTaskExecutionRolePolicy is attached to the role
- Trust policy is in place
- Task Definition is assigned to the ecsTaskExecutionRole Role all outlined in https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_execution_IAM_role.html
Any hints on how to further debug / resolve things are appreciated
Deploy Amazon ECS task definition2s
cluster: default
##[debug]Evaluating condition for step: 'Deploy Amazon ECS task definition'
##[debug]Evaluating: success()
##[debug]Evaluating success:
##[debug]=> true
##[debug]Result: true
##[debug]Starting: Deploy Amazon ECS task definition
##[debug]Loading inputs
##[debug]Evaluating: steps.task-def.outputs.task-definition
##[debug]Evaluating Index:
##[debug]..Evaluating Index:
##[debug]....Evaluating Index:
##[debug]......Evaluating steps:
##[debug]......=> Object
##[debug]......Evaluating String:
##[debug]......=> 'task-def'
##[debug]....=> Object
##[debug]....Evaluating String:
##[debug]....=> 'outputs'
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'task-definition'
##[debug]=> '/home/runner/work/_temp/task-definition--3322-yHLvp6V1t9QO-.json'
##[debug]Result: '/home/runner/work/_temp/task-definition--3322-yHLvp6V1t9QO-.json'
##[debug]Loading env
Run aws-actions/amazon-ecs-deploy-task-definition@v1
##[debug]Registering the task definition
##[error]Failed to register task definition in ECS: Fargate requires task definition to have execution role ARN to support ECR images.