ECS scheduled task vs EventBridge scheduler + ECS RunTask

0

What exactly is the difference between ECS scheduled task and EventBridge scheduler + ECS RunTask? When to use which one? Does ECS scheduled task use EventBridge in the background? I couldn't find answers in the documentation.

1개 답변
1
수락된 답변

The documentation here shows that ECS scheduled tasks use Amazon EventBridge.
https://docs.aws.amazon.com/AmazonECS/latest/developerguide/scheduling_tasks.html

If you have tasks to run at set intervals in your cluster, you can use the Amazon ECS console to create an EventBridge event. You can run tasks for a backup operation or a log scan. The EventBridge event that you create can run one or more tasks in your cluster at specified times. Your scheduled event can be set to a specific interval (run every N minutes, hours, or days). Otherwise, for more complicated scheduling, you can use a cron expression. For more information, see Scheduled tasks.

Both use EventBridge, but ECS Scheduled Tasks are better suited for actions like Cron that run at regular intervals.
EventBridge Scheduler + ECS RunTask is suitable when you want to execute when a specific action occurs.
For example, it can be used when a file is uploaded to S3 and you want to process that file.

profile picture
전문가
답변함 2년 전
  • thanks for the answer, I was confused because when I set up ECS scheduled task I couldn't see it in the EventBridge console, only in the tab of the scheduled task in ECS.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인