Skip to content

How to debug failed ECS deployment?

0

For a proof-of-concept project, I have manually set up an ECS cluster with Fargate. The Task Definition I used works with a Hello World Docker image I created. However, it does not work when I point it to an image I created based of a third party program and update the service. Is there a way to figure out why an ECS deployment fails?

  • I enabled Cloudwatch logging in the Task Definition, and I was able to see that it successfully found my Docker image in ECR. But there are no errors in the CW logs.
  • Clicking on "View in Pipelines" shows nothing.
  • There are zero entries in Code Deploy
2 Answers
3

Hello,

ECS deployment fails with custom image?

  • Increase CloudWatch Logs: Get more details from your application by cranking up logging.
  • Check Exit Codes: Look for non-zero exit codes in container logs, indicating abnormal termination.
  • Verify Resources: Ensure your Task Definition has enough CPU/memory for your custom program.
  • Review Environment Variables: Make sure any needed environment variables are defined correctly.
EXPERT
answered 2 years ago
2

Have you reviewed the stopped tasks in the ECS cluster gui and looked at the error messages there?

Have you tested the container locally?

EXPERT
answered 2 years ago
    • For the ECS cluster error messages, do you mean the Logs tab? If so, that is identical to the CloudWatch logs. There are no errors there. In fact, it looks like the container loaded successfully.
    • I have tested the container on a manually created EC2 instance and it worked fine.

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.