Issues icon indicating copy to clipboard operation
Issues copied to clipboard

Update Amazon ECS Service step does not support 'name' and 'appProtocol' fields from port mappings section

Open Clare-Octopus opened this issue 2 months ago • 0 comments

Severity

Blocking customers from deploying to ECS using Update Amazon ECS Service step with Service Connect enabled (service connect requires those missing fields).

Version

2022.3.10674 and higher

Latest Version

I could reproduce the problem in the latest build

What happened?

When updating an ECS task definition with the ECS Service Connect feature enabled, the task definition must include certain fields for the ECS Service Connect feature, specifically the name and appProtocol fields from the port mappings section.

Octopus, at present, does not support those fields and so omits them when trying to update a task definition using the Amazon ECS Service step.

An example of this is below:

If you have a task definition as per the below:

"portMappings": [
                {
                    "name": "testdefinition",
                    "containerPort": 80,
                    "hostPort": 80,
                    "protocol": "tcp",
                    "appProtocol": "http"
                }
]

And try to use the Octopus Update Amazon ECS Service step to update that task definition, it will deploy it without the name or appProtocol fields:

"portMappings": [
                {
                    "containerPort": 80,
                    "hostPort": 80,
                    "protocol": "tcp"
                }
 ]

An error will then appear on a deployment if you are deploying to an ECS service with Service connect enabled:

Unable to update ECS Service. "InvalidParameterException: portName(<portName Value>) does not refer to any named PortMapping in the container definitions".

name and appProtocol fields are not required for a normal ECS service application, only one with Service Connect enabled so this would be a feature request as Octopus currently does not support those fields.

Reproduction

  1. Have an Amazon ECS service setup with Service Connect enabled, see the JSON includes name and appProtocol fields.
  2. Use the Update Amazon ECS Service step in Octopus to update the task definition for that ECS service.
  3. See the error in the Octopus deployment and note the name and appProtocol fields are ommitted from the JSON as Octopus does not support them.

Error and Stacktrace

`Unable to update ECS Service. "InvalidParameterException: portName(<portName Value>) does not refer to any named PortMapping in the container definitions".`

More Information

Customer Ticket (Internal) - https://octopus.zendesk.com/agent/tickets/208553 RnD Thread (Internal) - https://octopusdeploy.slack.com/archives/CNHBHV2BX/p1729271254238179

Workaround

None at present, we are working on supporting those fields, but adding them requires another piece of work to be completed first, as adding those fields are dependent on the other piece of work.

Clare-Octopus avatar Oct 27 '25 15:10 Clare-Octopus