0

I need to call some ECS service periodically.

Trying to achieve this with a scheduled ECS task.

The task definition specifies a bare alpine-curl container, that leverages the healthcheck to curl the target service: CMD-SHELL,curl,--request PATCH,http://some-service-address,exit 0

The same curl from the EC2 instance or any container running on the instance, works just great. The curl as a healthcheck on the scheduled task doesn't get to where it should.

I can see on CloudWatch that the task itself was invoked.

Help please.

Dondey
  • 267
  • 4
  • 13
  • Are you using Fargate? Does your container have a public IP address? I can't remember all the networking specifics in each different case but I needed to curl localhost to get a healthcheck to work. – tschumann Aug 12 '20 at 05:43

1 Answers1

0

Switching the base image from byrnedo/alpine-curl to curlimages/curl solved the problem.

Dondey
  • 267
  • 4
  • 13