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 Answer
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
EXPERT
answered a month ago
profile picture
EXPERT
reviewed a month ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions