2

I understand that usually for web app containers there needs to be an HTTP endpoint which responds with 200 for a succesful healthcheck.

However, in my case I would have a non web app (a python script) running as an only container in a Fargate task. Now, how can I configure a healthcheck command in this scenario?

Khrysmb
  • 21
  • 3

1 Answers1

1

What kind of monitoring are you after? If your Python process is the only thing running in the container then if it crashes it should automatically take down the container with it.

That you can detect through CloudWatch Events and restart it, e.g. with Lambda or some other means. Check this out for details: Sending SNS Alerts for ECS Task Stopped Events.

Hope that helps :)

MLu
  • 23,798
  • 5
  • 54
  • 81