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

Task definition causing deploy errors for AWS ECS

I copied the task definition JSON from the actual task definition I created in the AWS console.

I pasted this this JSON into the file task-definition.json file in my repo.

I then tried to run the deploy pipe as described here:

https://bitbucket.org/atlassian/aws-ecs-deploy/src/master/

but it spits out a whole bunch of errors like below. In my task-definition for example, compatibilities is:

 

"compatibilities": [

    "EC2",

    "FARGATE"

  ],

 

 

Unknown parameter in input: "compatibilities", must be one of: family, taskRoleArn, executionRoleArn, networkMode, containerDefinitions, volumes, placementConstraints, requiresCompatibilities, cpu, memory, tags, pidMode, ipcMode, proxyConfiguration, inferenceAcceleratorsUnknown parameter in input: "taskDefinitionArn", must be one of: family, taskRoleArn, executionRoleArn, networkMode, containerDefinitions, volumes, placementConstraints, requiresCompatibilities, cpu, memory, tags, pidMode, ipcMode, proxyConfiguration, inferenceAcceleratorsUnknown parameter in input: "requiresAttributes", must be one of: family, taskRoleArn, executionRoleArn, networkMode, containerDefinitions, volumes, placementConstraints, requiresCompatibilities, cpu, memory, tags, pidMode, ipcMode, proxyConfiguration, inferenceAcceleratorsUnknown parameter in input: "revision", must be one of: family, taskRoleArn, executionRoleArn, networkMode, containerDefinitions, volumes, placementConstraints, requiresCompatibilities, cpu, memory, tags, pidMode, ipcMode, proxyConfiguration, inferenceAcceleratorsUnknown parameter in input: "status", must be one of: family, taskRoleArn, executionRoleArn, networkMode, containerDefinitions, volumes, placementConstraints, requiresCompatibilities, cpu, memory, tags, pidMode, ipcMode, proxyConfiguration, inferenceAcceleratorsInvalid type for parameter ipcMode, value: None, type: <class 'NoneType'>, valid types: <class 'str'>Invalid type for parameter containerDefinitions[0].dnsSearchDomains, value: None, type: <class 'NoneType'>, valid types: <class 'list'>, <class 'tuple'>Invalid type for parameter containerDefinitions[0].environmentFiles, value: None, type: <class 'NoneType'>, valid types: <class 'list'>, <class 'tuple'>Invalid type for parameter containerDefinitions[0].logConfiguration.secretOptions, value: None, type: <class 'NoneType'>, valid types: <class 'list'>, <class 'tuple'>Invalid type for parameter containerDefinitions[0].entryPoint, value: None, type: <class 'NoneType'>, valid types: <class 'list'>, <class 'tuple'>Invalid type for parameter containerDefinitions[0].command, value: None, type: <class 'NoneType'>, valid types: <class 'list'>, <class 'tuple'>Invalid type for parameter containerDefinitions[0].linuxParameters, value: None, type: <class 'NoneType'>, valid types: <class 'dict'>Invalid type for parameter containerDefinitions[0].resourceRequirements, value: None, type: <class 'NoneType'>, valid types: <class 'list'>, <class 'tuple'>Invalid type for parameter containerDefinitions[0].ulimits, value: None, type: <class 'NoneType'>, valid types: <class 'list'>, <class 'tuple'>Invalid type for parameter containerDefinitions[0].dnsServers, value: None, type: <class 'NoneType'>, valid types: <class 'list'>, <class 'tuple'>Invalid type for parameter containerDefinitions[0].workingDirectory, value: None, type: <class 'NoneType'>, valid types: <class 'str'>Invalid type for parameter containerDefinitions[0].secrets, value: None, type: <class 'NoneType'>, valid types: <class 'list'>, <class 'tuple'>Invalid type for parameter containerDefinitions[0].dockerSecurityOptions, value: None, type: <class 'NoneType'>, valid types: <class 'list'>, <class 'tuple'>Invalid type for parameter containerDefinitions[0].memory, value: None, type: <class 'NoneType'>, valid types: <class 'int'>Invalid type for parameter containerDefinitions[0].stopTimeout, value: None, type: <class 'NoneType'>, valid types: <class 'int'>Invalid type for parameter containerDefinitions[0].startTimeout, value: None, type: <class 'NoneType'>, valid types: <class 'int'>Invalid type for parameter containerDefinitions[0].firelensConfiguration, value: None, type: <class 'NoneType'>, valid types: <class 'dict'>Invalid type for parameter containerDefinitions[0].dependsOn, value: None, type: <class 'NoneType'>, valid types: <class 'list'>, <class 'tuple'>Invalid type for parameter containerDefinitions[0].disableNetworking, value: None, type: <class 'NoneType'>, valid types: <class 'bool'>Invalid type for parameter containerDefinitions[0].interactive, value: None, type: <class 'NoneType'>, valid types: <class 'bool'>Invalid type for parameter containerDefinitions[0].healthCheck, value: None, type: <class 'NoneType'>, valid types: <class 'dict'>Invalid type for parameter containerDefinitions[0].links, value: None, type: <class 'NoneType'>, valid types: <class 'list'>, <class 'tuple'>Invalid type for parameter containerDefinitions[0].hostname, value: None, type: <class 'NoneType'>, valid types: <class 'str'>Invalid type for parameter containerDefinitions[0].extraHosts, value: None, type: <class 'NoneType'>, valid types: <class 'list'>, <class 'tuple'>Invalid type for parameter containerDefinitions[0].pseudoTerminal, value: None, type: <class 'NoneType'>, valid types: <class 'bool'>Invalid type for parameter containerDefinitions[0].user, value: None, type: <class 'NoneType'>, valid types: <class 'str'>Invalid type for parameter containerDefinitions[0].readonlyRootFilesystem, value: None, type: <class 'NoneType'>, valid types: <class 'bool'>Invalid type for parameter containerDefinitions[0].dockerLabels, value: None, type: <class 'NoneType'>, valid types: <class 'dict'>Invalid type for parameter containerDefinitions[0].systemControls, value: None, type: <class 'NoneType'>, valid types: <class 'list'>, <class 'tuple'>Invalid type for parameter containerDefinitions[0].privileged, value: None, type: <class 'NoneType'>, valid types: <class 'bool'>Invalid type for parameter taskRoleArn, value: None, type: <class 'NoneType'>, valid types: <class 'str'>Invalid type for parameter pidMode, value: None, type: <class 'NoneType'>, valid types: <class 'str'>Invalid type for parameter inferenceAccelerators, value: None, type: <class 'NoneType'>, valid types: <class 'list'>, <class 'tuple'>Invalid type for parameter proxyConfiguration, value: None, type: <class 'NoneType'>, valid types: <class 'dict'>

2 answers

atlassian/aws-ecs-deploy needs just the subset of the task-definition.json

All of those keys it is complaining about should be removed.

@Jason Harrison yes, but this depends on the task definition structure, and pipe is not forming this structure, it is passing it just as you're passing it to the pipe. You can validate your task definition first. Also please share traceback from the pipe exactly, from the trace above I don't see where exactly the pipe failing and which aws command is throwing this traceback, because the traceback you shared is from aws cli .

This will help us a lot to find your failing root cause

@Galyna ZholtkevychI think you wanted to target the second half of your message to @AdamClarey 

0 votes

@AdamClarey could please share the line where pipe is failing (this part of logs in pipeline) and part of structure of your task definition?

In the doc I see that compatibilities should be mentioned like

requiresCompatibilities=[
        'EC2'|'FARGATE',
    ],

See https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ecs.html#ECS.Client.register_task_definition

Regards, Galyna

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira Service Management

Security Advisory for Jira Service Management

On October 20, 2021, Atlassian published a security advisory for Jira Service Management. The full advisory is available at this link.  We've seen a number of questions already asking for...

75 views 0 1
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