Urgent help required. Production Pipeline failing
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
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?
@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.
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.image = $IMAGE | del(.taskDefinitionArn) | del(.revision) | del(.status) | del(.requiresAttributes) | del(.compatibilities)')
And using the NEW_TASK_DEFINITION in the pipeline
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.
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.
...hey are a part of us, shaping how we interact with the world around us. The same holds true for programming languages when we think about how different kinds of vulnerabilities raise their heads in t...
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