I am trying to create a ECS fargate type task on ECS through this command aws ecs register-task-definition --family ${FAMILY} --cli-input-json file://${NAME}-v_${BUILD_NUMBER}.json --region ${REGION} as mentined in docs here. Task defination file is given below
Every thing seems to work well with this command and have proper response in CLI. But when i try to do the same in Jenkins as i have to setup CI environment it gives following error.
Parameter validation failed:
Unknown parameter in input: "cpu", must be one of: family, taskRoleArn,
networkMode, containerDefinitions, volumes
Unknown parameter in input: "executionRoleArn", must be one of: family,
taskRoleArn, networkMode, containerDefinitions, volumes
Unknown parameter in input: "memory", must be one of: family, taskRoleArn,
networkMode, containerDefinitions, volumes
Unknown parameter in input: "requiresCompatibilities", must be one of:
family, taskRoleArn, networkMode, containerDefinitions, volumes
If i removed those tags in task definition json file. It creates a EC2 type task which i don't need. I want to create only a fargate launch type task.