Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Pipeline failing: Unknown parameter in input: "registeredAt"

Urgent help required. Production Pipeline failing 

Using atlassian/aws-ecs-deploy:1.3.0

 

The pipelines to ECS are failing with the following error

✖ ECS task definition parameter validation error: Parameter validation failed:

Unknown parameter in input: "registeredAt", must be one of: family, taskRoleArn, executionRoleArn, networkMode, containerDefinitions, volumes, placementConstraints, requiresCompatibilities, cpu, memory, tags, pidMode, ipcMode, proxyConfiguration, inferenceAccelerators
Unknown parameter in input: "registeredBy", must be one of: family, taskRoleArn, executionRoleArn, networkMode, containerDefinitions, volumes, placementConstraints, requiresCompatibilities, cpu, memory, tags, pidMode, ipcMode, proxyConfiguration, inferenceAccelerators

Earlier it was working fine.

 

Following is the task definition

 

{
'containerDefinitions': [
],
'executionRoleArn': 'arn:aws:iam::<user>:role/ProdECSRole',

'family': 'backend-task-def',
 
'networkMode': 'bridge',
 
'placementConstraints': [],
 
'registeredAt': 1610533632.651,
 
'registeredBy': 'arn:aws:iam::<user>:user/bitbucket-prod',
'requiresCompatibilities': ['EC2'],
 
'taskRoleArn': 'arn:aws:iam::<user>:role/ProdECSRole',
'volumes': []
}

 

2 answers

1 accepted

0 votes
Answer accepted

Hi @Anuj Sharma ,

Thank you for your question.

It looks like it's AWS issue relates to the latest AWS API update.

We're investigating the issue and will notify you of any updates.

 

It would be nice if you provide us with more details: how long have you used aws-esd-deploy pipe with "registeredAt" and "registeredBy" params?

The last successful deployment was on January 13, 2021

@Anuj Sharma is it necessary for you to keep these arguments in  task definition? Looks like they are not provided anymore in documentation and I don't know if they've been ever provided. AWS respond with these parameters, but does not take into task definition (or they have updated documentation).

Have you tried to remove these fields, if you don't really need it?

 

It is because these are actually not allowed fields in task definition, these are post-processing fields, that aws cli creates after registering your task definition - it is like general createdAt fields.

Since we did not upgrade any version of aws libraries, neither botocore, no boto3 and not awscli , this looks like really aws documentation or aws server problem referring to the issue that @Oleksandr Kyrdan has mentioned.

 

 

Regards, Galyna

I don't think I'm adding these values. 

I use the following script to update the existing task definition, so the definition is retrieved from the AWS and replaced the required values only

 

TASK_DEFINITION=$(aws ecs describe-task-definition --task-definition "$AWS_ECS_TASK_FAMILY")
NEW_TASK_DEFINITION=$(echo "$TASK_DEFINITION" | jq --arg IMAGE "$ECR_IMAGE_TAG" '.taskDefinition | .containerDefinitions[0].image = $IMAGE | del(.taskDefinitionArn) | del(.revision) | del(.status) | del(.requiresAttributes) | del(.compatibilities)')

 

And using the NEW_TASK_DEFINITION in the pipeline

@Anuj Sharma ,

So I know what the problem is.

When you describe task definition, it responds to you with ALL fields that it make it visible. So registeredAt and registeredBy are those fields in the response, but not acceptable by AWS server side validator anymore (https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_DescribeTaskDefinition.html).

 

So you change just the image tag to deploy, but still want task definition to be new one to update the service.

 

Unfortunately, we're not able to fix this by upgrading AWS libraries, because it is on their server side.

But you can remove these not-acceptable fields by the same tool you're using - jq. Just like you remove other not needed fields

Is this solution fine for you? We are looking forward to your update and feedback, so we can investigate firther if there is still a problem resolving this.

 

Regards, Galyna

Append the additional values | del(.registeredAt) | del(.registeredBy)') to your NEW_TASK_DEFINITION and run the pipeline.

--

Regards,

Sunil Amara

Like Oleksandr Kyrdan likes this

@Galyna Zholtkevych Thanks. After deleting these params (as suggested by @sunilamara )  worked.

Like # people like this

@Anuj Sharma

I have not found registeredAt, registeredBy parameters in Request syntax of  https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ecs.html#ECS.Client.register_task_definition.

These parameters are only in Response syntax, I believe they cannot exist in request syntax, because they are like update_at, created_at paramters, that can persist only AFTER the request processing.

Check out this doc and ensure that you have right parameters , but pay attention only to Request Syntax. At the first glance to fix this, you have to remove these two params.

Regards, Galyna

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Apps & Integrations

🍻🍂Apptoberfest Update: Upcoming Virtual Events 🎉

Hello Community! I hope you've been enjoying the 🍂Apptoberfestivities🍂 (I know I have!) The event is heating up next week with a series of virtual events that we're calling the 🍻🍂Partner App ...

174 views 3 14
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you