Ecs Healthchecks


Just a tiny little gotcha that wasted far too much of my time on Friday.

The ECS health check requires a comma separated list, but will accept one that’s not. Furthermore if you copy the health check from another task definition the check will be shown without the commas. This causes a lot of wasted time.

The correct format is something like:

CMD_SHELL, /usr/bin/curl http://localhost:1234/healthcheck | grep -q ‘HEALTHY’ || return 1

ECS will accept the above without the comma, but it will constantly fail the health check. Absolutely stupid but there we go.

Hope this saves someone else from losing 45 minutes chasing their tail.

Enter your instance's address