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 個月前

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

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

回答問題指南