update container definitions without redefine whole task definition in ECS

0

I trying to update only image inside ECS task definition:

aws ecs register-task-definition --family some-family --container-definitions "$JSON" --execution-role-arn "arn:aws:iam::xxx:role/role-name"

Where $JSON is definitely same JSON description as before and only image key is changed (because ECR image tag is updated)

And getting error:

At least one of 'memory' or 'memoryReservation' must be specified

It is super annoying that we have to update whole container definitions just to be able update ECR image tag. But at least this JSON may be easily taken with describe-task-definition command.
However the fact that we have to redefine whole Task Definition every time when Image tag is changed is ridiculous.
Is it possible to update only container definitions or image tag (most perfect) inside current version?

2 Answers
1

The current version of the AWS CLI currently require that you create a new task definition to update the Docker image of your application. You can find this information in the AWS CLI Command Reference documentation.

There is also this issue that is currently open about this in the AWS CLI GitHub repository. You may find useful information there depending on the deployment method you use to update your ECS task. You can also contribute to the discussion if you want.

AWS
Michael
answered 2 years ago
0

TASK202303240151581002711250 actions

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions