Error with AWS ECS Deployment Pipe
Asked by Manoj Kinage:

'volumes': \[\]}  
DEBUG: Event before-parameter-build.ecs.RegisterTaskDefinition: calling handler \<function generate_idempotent_uuid at 0x7f72873eb343\>  
? ECS task definition parameter validation error:  
Parameter validation failed:  

<br />

{'key': 'Environment', 'value': 'dev'},  
{'key': 'DCIO', 'value': 'Customer'},  
{'key': 'Name', 'value': 'ECS_TASK_NAME'}\],  
'taskDefinitionArn': 'arn:aws:ecs:us-west-2:1111111111111:task-definition/ECS_TASK_NAME:4',  
'volumes': \[\]}  
DEBUG: Calling endpoint provider with parameters: {'Region': 'us-west-2', 'UseDualStack': False, 'UseFIPS': False}  
DEBUG: Endpoint provider result: <https://ecs.us-west-2.amazonaws.com>  
DEBUG: Event before-parameter-build.ecs.RegisterTaskDefinition: calling handler \<function generate_idempotent_uuid at 0x7f62b73bf010\>  
? ECS task definition parameter validation error:  
Parameter validation failed:  
Unknown parameter in input: "taskDefinitionArn", must be one of: family, taskRoleArn, executionRoleArn, networkMode, containerDefinitions, volumes, placementConstraints, requiresCompatibilities, cpu, memory, tags, pidMode, ipcMode, proxyConfiguration, inferenceAccelerators, ephemeralStorage, runtimePlatform  
Unknown parameter in input: "revision", must be one of: family, taskRoleArn, executionRoleArn, networkMode, containerDefinitions, volumes, placementConstraints, requiresCompatibilities, cpu, memory, tags, pidMode, ipcMode, proxyConfiguration, inferenceAccelerators, ephemeralStorage, runtimePlatform  
Unknown parameter in input: "status", must be one of: family, taskRoleArn, executionRoleArn, networkMode, containerDefinitions, volumes, placementConstraints, requiresCompatibilities, cpu, memory, tags, pidMode, ipcMode, proxyConfiguration, inferenceAccelerators, ephemeralStorage, runtimePlatform  
Unknown parameter in input: "requiresAttributes", must be one of: family, taskRoleArn, executionRoleArn, networkMode, containerDefinitions, volumes, placementConstraints, requiresCompatibilities, cpu, memory, tags, pidMode, ipcMode, proxyConfiguration, inferenceAccelerators, ephemeralStorage, runtimePlatform  
Unknown parameter in input: "compatibilities", must be one of: family, taskRoleArn, executionRoleArn, networkMode, containerDefinitions, volumes, placementConstraints, requiresCompatibilities, cpu, memory, tags, pidMode, ipcMode, proxyConfiguration, inferenceAccelerators, ephemeralStorage, runtimePlatform  
Unknown parameter in input: "registeredAt", must be one of: family, taskRoleArn, executionRoleArn, networkMode, containerDefinitions, volumes, placementConstraints, requiresCompatibilities, cpu, memory, tags, pidMode, ipcMode, proxyConfiguration, inferenceAccelerators, ephemeralStorage, runtimePlatform  
Unknown parameter in input: "registeredBy", must be one of: family, taskRoleArn, executionRoleArn, networkMode, containerDefinitions, volumes, placementConstraints, requiresCompatibilities, cpu, memory, tags, pidMode, ipcMode, proxyConfiguration, inferenceAccelerators, ephemeralStorage, runtimePlatform


Answers:
author: Igor Stoyanov
body: [@Manoj Kinage](/t5/user/viewprofilepage/user-id/5179469) hi. This pipe based on boto3 1.26 version. According to [docs](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ecs/client/register_task_definition.html#) there is no request parameter \`taskDefinitionArn\`. That's why your task-definition failed validation.  

Regards, Igor  

comments: author: Manoj Kinage
body: [@Igor Stoyanov](/t5/user/viewprofilepage/user-id/4550492) there is TaskARN and it is also printed in error. As I mentioned with same json file I am able to deploy using AWS CLI.


author: Igor Stoyanov
body: [@Manoj Kinage](/t5/user/viewprofilepage/user-id/5179469) AWS CLI and boto3 are not the same tools. Boto3 does not support \`taskDefinitionArn\` request parameter in [register-task-definition](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ecs/client/register_task_definition.html#register-task-definition)  

Regards, Igor


author: Oday Rafeh
body: [@Manoj Kinage](/t5/user/viewprofilepage/user-id/5179469)

The error message indicates that there is a parameter validation failure related to the ECS task definition. Specifically, the error messages show that there are **unknown parameters** being used.

One thing you can try is to check the parameters you are using in your code and compare them to the parameters listed in the AWS ECS documentation to make sure you are using the correct syntax.

You may also want to check the version of the AWS ECS Deployment Pipe you are using to see if there are any known issues or bugs that could be causing this error.

comments: author: Manoj Kinage
body: I don't think there is any invalid parameter in task definition because I am able to deploy using same task definition using aws-cli and also from bitbucket using aws cli image.


author: Oday Rafeh
body: May be an issue with the AWS ECS Deployment Pipe itself. You could try reaching out to the support team for the pipe to see if they can provide any insights or solutions for this error


Tags: aws

bitbucket-cloud

bitbucket-pipelines

cloud