Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.
×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': []
}
Hi @Anuj ,
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 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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Anuj ,
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Append the additional values | del(.registeredAt) | del(.registeredBy)') to your NEW_TASK_DEFINITION and run the pipeline.
--
Regards,
Sunil Amara
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.