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回答
1
承認された回答

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
エキスパート
Peter_G
回答済み 2年前
  • Thanks - cloudtrail helped a lot!

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン