ECS Fargate Failed Invocation with EventBridge

0

I have created an ECS Fargate Task, which I can manually run. It updates a Dynomodb and I get logs.

Now I want this to run on a schedule. I have setup a scheduled ECS task through EventBridge and through the UI in the ECS cluster. However, this does not run.

I have used the cron scheduler and I have also tried the 'Run at fixed interval' option, which also doesn't work. As far as possible I am using the same settings when I run the task manually and in EventBridge. I've tried the default capacity provider (and made sure that's set to Fargate in the cluster). I've tried using manually defined permissions and I've tried letting EventBridge make it's own permissions.

I see a 'Failed Invocation' in CloudWatch metrics, for every invocation of the task. But I am unable to find any other logs to debug. The task seems to not start: no logs are generated and the failed invocation happens at the same time as the invocation.

Are there any logs I could share that would help diagnose?

Does anyone have any suggestions for what might be causing this failure?

1 Answer
1
Accepted Answer

Have a look in cloudtrail for "Error" events with around the time period - The event will contain a more detailed cause.

You may want to wrap this execution in a step function then you can build in more detailed logic/error response etc

AWS
EXPERT
Peter_G
answered 2 years ago
  • Thanks - cloudtrail helped a lot!

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