I am trying to deploy a very simple web application to AWS Fargate. I have pushed a docker image of the backend of the application to ECR and I am trying to setup a Fargate task definition for the container. I have all of the properties of the task defined, the setup is fairly simple, but the task wont create and I am always getting the error:
Invalid request provided: Create TaskDefinition: Fargate requires task definition to have execution role ARN to support ECR images. (Service: AmazonECS; Status Code: 400; Error Code: ClientException; Request ID: <SOME UUID>; Proxy: null)" (RequestToken: <SOME UUID>, HandlerErrorCode: InvalidRequest)
I know I have an ECR image and I have created and selected the IAM role that Fargate wants (using this documentation) but it still complains. I had originally created the task with EC2 launch type and it had no problems, but decided to go with Fargate launch type for cost and simplicity reasons.
What else do I have to do?