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?

mhairi
已提問 2 年前檢視次數 1545 次
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!

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南