ECS Fargate Failed Invocation with EventBridge
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?
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
Thanks - cloudtrail helped a lot!
RDS DB migrations using ECS and Fargateasked 2 years ago
ECS Fargate Failed Invocation with EventBridgeAccepted Answer
Charging operate Task for execution timeAccepted Answerasked 5 months ago
How to solve the ECS Error: You've reached the limit on the number of tasks you can run concurrently.asked 5 months ago
Trigger Step Function with API Gateway and use Fargate within Step Function?asked a month ago
Delayed shutdown of ECS Fargate tasks?asked 4 months ago
ECS Fargate Task in EventBridge has ResourceInitializationError
What needs to be done to make event bridge invoke a fargate task when file added to s3asked 22 days ago
How to I troubleshoot a deploy that is forever in "IN_PROGRESS"?asked 6 months ago
Aws ecs task failed ELB health checkasked 16 hours ago