Failed to register task definition in ECS with GitHub Actions

Viewed 2311

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:

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.
1 Answers

Issue found, I had not correctly updated the task definition json to declare the correct ARN

Related