Run ECS task from event bridge: Not Scheduled

0

I have a setup that sends event from api gateway --> event bridge . I want event bridge to run an ECS task definition when an event is sent from api gateway and pass the event as an argument in the container. Is it possible to achieve this? Note that the task is not scheduled, I only want it to be executed when an event is sent from api gateway. Thanks :)

1回答
0

It is possible. As listed here: https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-targets.html#targets-specifics-ecs-task, ECS task is a valid target:

Amazon ECS task

If you use InputTransformers to shape the input event to a Target to match the Amazon ECS RunTask TaskOverride structure, the parameters will be mapped 1-to-1 and passed through to ecs.RunTask.

For more details check this post too: https://repost.aws/questions/QUtllxTXjgRCeBMmy4MzgNpQ/how-to-convince-eventbridge-to-pass-s3-event-information-to-an-ecs-target

profile picture
エキスパート
回答済み 2ヶ月前
profile picture
エキスパート
レビュー済み 2ヶ月前

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

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

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

関連するコンテンツ