amazon-ecs-deploy-task-definition
amazon-ecs-deploy-task-definition copied to clipboard
Unsupported fields from new ECS Panel
If you are using the new ECS panel to create the original task definition you can now specify a port name & app protocol but both fields aren't supported by the code causing you to be unable to update it.
Error: Failed to register task definition in ECS: There were 2 validation errors: UnexpectedParameter: Unexpected key 'name' found in params.containerDefinitions[0].portMappings[0] UnexpectedParameter: Unexpected key 'appProtocol' found in params.containerDefinitions[0].portMappings[0]
We are using aws-actions/[email protected]
Seem issue here. Please fix this issue. Thanks.
Error: Failed to register task definition in ECS: Unexpected key 'appProtocol' found in params.containerDefinitions[0].portMappings[0]
Error: Unexpected key 'appProtocol' found in params.containerDefinitions[0].portMappings[0]
Until the issue is fixed, to let this work on new ECS console, we can delete these two fields i.e. name & appProtocol from container Definition part of json in task definition and it will start working.
I am too facing the same problem and wondering if there is a way to fix using Github action rather than adjusting it manually in the console.
duplicate of #426
Work around for now is to switch to the old ECS experience and generate the task definition using that. Ensure you create it from the older task definition before the modification was made.

Hey folks 👋🏼
Any updates or plan on making a new release to handle the updated fields?
The new layout is indeed forced now on the panels so can't even use the workaround anymore to go back to the old panel. Only solution now is using the API to setup the first version
Seems like a PR is already open to fix this so someone just needs to review it: https://github.com/aws/aws-sdk-js/pull/4310
Please fix this, there's already a fix, I'm quite tired of seeing this in my workflow failures
Failed to register task definition in ECS: Unexpected key 'name' found in params.containerDefinitions[0].portMappings[0]
Who do I need to ask to get this merged?
Yes, this has been a problem for so long. If I manually change the config, the next deployment fails, until I remember to edit the JSON manually.
Please consider merging the fix. 🙏🏼
This really needs to be merged as ServiceConnect is completely unusable through the boto ecs task registration apis.