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개 답변
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

답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠