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

(ecs): ecs-service-with-advanced-alb-config example does not work #585

Closed
anggras opened this issue Dec 29, 2021 · 5 comments
Closed

(ecs): ecs-service-with-advanced-alb-config example does not work #585

anggras opened this issue Dec 29, 2021 · 5 comments
Labels
bug This issue is a bug. effort/small Small work item – less than a day of effort p1

Comments

@anggras
Copy link

anggras commented Dec 29, 2021

What is the problem?

Upon cdk deploy, the ECS service stuck and unable to proceed with message:

service XXXXX was unable to place a task because no container instance met all of its requirements. Reason: No Container Instances were found in your cluster. For more information, see the Troubleshooting section.

Reproduction Steps

  1. Clone the ecs-service-with-advanced-alb-config example
  2. Install the requirements
  3. Run cdk deploy

What did you expect to happen?

The sample ECS service should be deployed successfully

What actually happened?

The deployment is stuck and unable to complete. The ECS service event console shows the following message:

service XXXXX was unable to place a task because no container instance met all of its requirements. Reason: No Container Instances were found in your cluster. For more information, see the Troubleshooting section.

CDK CLI Version

2.3.0 (build beaa5b2)

Framework Version

No response

Node.js Version

16.13.1

OS

macOS

Language

Python

Language Version

No response

Other information

No response

@anggras anggras added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Dec 29, 2021
@ryparker ryparker added effort/small Small work item – less than a day of effort p1 and removed needs-triage This issue or PR still needs to be triaged. labels Dec 29, 2021
@its-mirus-lu
Copy link
Contributor

There's another issue with the example... it's attempting to use instance type m5.micro (

) when there isn't an instance size 'micro' for family m5: https://aws.amazon.com/ec2/instance-types/m5/

@its-mirus-lu
Copy link
Contributor

This error is also coming up... it may have to do with how the name of the resource is interpolated as a concatenation of the stack and resource name: The specified capacity provider name is invalid. Up to 255 characters are allowed, including letters (upper and lowercase), numbers, underscores, and hyphens. The name cannot be prefixed with "aws", "ecs", or "fargate". Specify a valid name and try again.

@its-mirus-lu
Copy link
Contributor

With respect to @anggras' original error, I was not able to reproduce the error message: "service XXXXX was unable to place a task because no container instance met all of its requirements. Reason: No Container Instances were found in your cluster. For more information, see the Troubleshooting section."

However, I did discover that an incorrect instance type was specified for the autoscaling group definition (m5.micro doesn't exist). The stack wouldn't synth because the ecs autoscaling group name did not meet the name requirements. I'll create a new issue since these issues don't directly address OP's issue.

@its-mirus-lu
Copy link
Contributor

The fix for this is in PR #626

@kaiz-io kaiz-io closed this as completed Dec 28, 2024
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. effort/small Small work item – less than a day of effort p1
Projects
None yet
Development

No branches or pull requests

4 participants