aws-actions/amazon-ecs-render-task-definition

BUG: RegisterTaskDefinition operation no longer accepts task-definitions without an `image`

thomasmost opened this issue · 6 comments

When following the instructions for using this action here:
https://aws.amazon.com/blogs/opensource/github-actions-aws-fargate/

...I can no longer register the task definition because the image is filled in during the GitHub workflow after the image is built.

This must have changed recently because I implemented this workflow for a different project as recently as November.

task-definition.json

{
  "family": "web-task-staging",
  "networkMode": "awsvpc",
  "containerDefinitions": [
    {
      "name": "web-container-staging",
      "memory": 200,
      "cpu": 10,
      "essential": true,
      "portMappings": [
        {
          "containerPort": 80,
          "hostPort": 80
        }
      ],
      ...

And the error:
An error occurred (ClientException) when calling the RegisterTaskDefinition operation: Container.image should not be null or empty.

@thomasmost Thank you reporting this bug, we will take a look at it.

@thomasmost Could you please confirm if this workflow is still working for your previous project? And if yes, then is it pointing to the latest version (i.e. v1) of amazon-ecs-render-task-definition.

@paragbhingre So it is still working and I also have to apologize because I found a workaround. If I initialize the task definition with an image string filled in (could be anything, could be "TBD", and then remove it for use with the GitHub action, that works. So it's possible that this can be closed

@thomasmost great that you could find a solution to unblock on this one. Could you please confirm if your previous project is not specifying an image tag and still working fine?

Correct, neither project is specifying an image tag and both are now working

@thomasmost great to know that both the projects are working fine. I closing this issue for now, if you have any more concerns then please feel free to reopen this issue.

P.S. In order to avoid getting the error mentioned in the issue above, we need to mention the image tag in task def JSON with the string filled in (could be anything, could be "TBD").