Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support ECS Service connect #426

Open
guns2410 opened this issue Dec 8, 2022 · 7 comments
Open

Support ECS Service connect #426

guns2410 opened this issue Dec 8, 2022 · 7 comments

Comments

@guns2410
Copy link

guns2410 commented Dec 8, 2022

Updating the task definition to use Service Connect, I get an error during the deploy process.

* UnexpectedParameter: Unexpected key 'name' found in params.containerDefinitions[0].portMappings[0]
* UnexpectedParameter: Unexpected key 'appProtocol' found in params.containerDefinitions[0].portMappings[0]

With ECS supporting Service connect, name and appProtocol has to be supported in portMappings

https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/ECS.html#registerTaskDefinition-property

@frannpr
Copy link

frannpr commented Dec 12, 2022

how is it going on? any temporary fix? I used cloudmap before Connect existed and without making any changes this error pops up

@javalon
Copy link

javalon commented Dec 13, 2022

Hi!

A temporal fix to work with our project consisted in creating a new task version from the AWS Dashboard changing the value of the App protocol (to None) and deleting the Port name (empty).

Be careful when you create a new task version manually. The dashboard form sets a Port name by default when its value is empty, making to fail the Github action again if doesn't delete before.

I hope to help you.

@shinenelson
Copy link

This is a problem only if one uses the AWS Management Console to create new task definition revision. To get around this, one could use the Create new version with JSON option while creating the new revision and edit the task definition JSON by hand.
I recognize that this is not as intuitive as filling up a form, but that comes at the cost of all of the GitHub Action workflows depending on the same task definitions failing.

@frannpr
Copy link

frannpr commented Dec 15, 2022

thank you both @shinenelson @javalon very much! It has helped me to understand and solve the problem 💯

@guns2410
Copy link
Author

When you create a new version from the AWS management console, the tasks are updated correctly. However, with the next deployment, the deployment would fail since the ports are named in the management console and not in the task definition.

@rockey5520
Copy link

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.

@rockey5520
Copy link

@veglos provided a PR aws/aws-sdk-js#4310 it would be awesome if someone could review and merge this solves the problem of not being able to redeploy service via github actions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants