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

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则