Why doesn't aws-ecs-deploy support PortMapping name in the ContainerDefinitions?

Brandon Robinson
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 2, 2023

Using the aws-ecs-deploy-1.6.2, I keep getting an error stating:

 

✖ Failed to update the stack.
An error occurred (InvalidParameterException) when calling the UpdateService operation: portName(whatsours-stripe-service-8095-tcp) does not refer to any named PortMapping in the container definitions.

This is due to the fact that we had to add PortMapping name to our task definitions in AWS ECS because we want to enable client/server Service Discovery; however, our task-definition-development.json file doesn't allow us to add name in the portMappings. If we add it, then we receive the following error:

 

✖ ECS task definition parameter validation error:
Parameter validation failed:
Unknown parameter in containerDefinitions[0].portMappings[0]: "name", must be one of: containerPort, hostPort, protocol
Any solutions?
 

 

1 answer

1 accepted

0 votes
Answer accepted
Igor Stoyanov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 3, 2023

@Brandon Robinson hi. Thanks for your question.

Looks like boto3 library should be updated in this pipe to fix this error (add support for it): 

✖ ECS task definition parameter validation error:
Parameter validation failed:
Unknown parameter in containerDefinitions[0].portMappings[0]: "name", must be one of: containerPort, hostPort, protocol
We will notify you when new release will become available.

Regards, Igor
Brandon Robinson
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 3, 2023

Hell Igor,

 

Thank you for your response. Looking forward to the new release given the circumstances.

 

Thanks again,

 

Brandon 

Oleksandr Kyrdan
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 16, 2023

Hi @Brandon Robinson 

The new version of the aws-ecs-deploy pipe is released:

atlassian/aws-ecs-deploy:1.7.0 

The boto3 dependency is updated to the latest version (1.26). 

 

Best regards,
Oleksandr Kyrdan

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events