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 年前1438 查看次数
2 回答
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
已回答 2 年前
0

TASK202303240151581002711250 actions

已回答 1 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则