issue in describe ecs task definition

Hardik Patel July 5, 2021

Hello ,

 

i am getting below issue in bitbucket pipeline,

 

An error occurred (ClientException) when calling the DescribeTaskDefinition operation: Unable to describe task definition.

 

command i used to ran is as below,

 

#!/bin/bash
TASK_FAMILY=xxxx

DOCKER_IMAGE=xxxxxxx.dkr.ecr.us-west-1.amazonaws.com/xxxxx:dev

SERVICE=xxxxx

CLUSTER=xxxxxx

LATEST_TASK_DEFINITION=$(aws ecs describe-task-definition --task-definition ${TASK_FAMILY})

echo $LATEST_TASK_DEFINITION

echo $LATEST_TASK_DEFINITION \ | jq '{containerDefinitions: .taskDefinition.containerDefinitions, volumes: .taskDefinition.volumes}' \ | jq '.containerDefinitions[0].image='\"${DOCKER_IMAGE}\" \ > /tmp/tmp.json

cat /tmp/tmp.json

aws ecs register-task-definition --family ${TASK_FAMILY} --cpu 256 --memory 512 --network-mode awsvpc --requires-compatibilities "FARGATE" --task-role-arn arn:aws:iam::xxxxxx:role/ECSTaskExecutionRole --execution-role-arn arn:aws:iam::xxxx:role/ECSTaskExecutionRole --cli-input-json file:///tmp/tmp.json

 

 

but when i am running same command from terminal manually its working fine.

please help me with this where is issue?

 

Thanks in advance.

1 answer

0 votes
Caroline R
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 7, 2021

Hi, @Hardik Patel! Welcome to the community! 

I saw you created a ticket with our support related to the same question, so to avoid any possible misunderstandings or miscommunication that may arise from discussing the same matter on two different platforms, let’s focus on the ticket instead.

Feel free to share the resolution here to help other community members that may have the same issue. 

Kind regards,
Caroline 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events