By using AWS re:Post, you agree to the AWS re:Post Terms of Use

Can not launch task in ECS cluster on EC2 instances

0

Hello,

I'm trying to deploy a task that should start 3 containers with a Hello world nodejs dockerized app using ECS cluster and the tasks got stuck at "Provisioning" phase for a long time (10 minutes already).

Task overview

Capacity provider and ASG

Do you have any idea what is wrong? I'm totally new to AWS and the UI is driving me crazy.

How to find out what the tasks are stuck in the provisioning state? I was able to deploy the same task to FARGATE within one minute, but deploying to EC2 seems like extremely complicated.


UPDATE

So I found the root of the problem - all the running EC2 instances had cca 900 MB of memory and the tasks needed 1 GB of memory.

It would be nice if the UI indicated this in some way because after some investigation this seems like a common problem.

Is there some timeout after which the UI shows me something like "Tasks were not allocated because we did not find available EC2 instances for it"? Or where can I found some information like this?

Thank you for any help

asked 4 months ago178 views
1 Answer
1

I think, you have identified the cause of the issue correctly. you can also find more information via ECS Console From the UI,. Check the "Events" tab in your ECS service for any error messages. Look at the "Stopped tasks" section for any tasks that failed to start. AWS CLI one more option, you can find out using, aws ecs describe-tasks --cluster your-cluster-name --tasks your-task-arn Other way is CloudWatch Logs, If you've enabled CloudWatch logging for your ECS cluster, you might find more detailed error messages there.

profile pictureAWS
EXPERT
answered 4 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions