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 Antwort
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
EXPERTE
beantwortet vor 2 Monaten
profile picture
EXPERTE
überprüft vor 2 Monaten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen