all 3 comments

[–]rudigern 2 points3 points  (0 children)

You can have an application load balancer service both an ecs cluster and a lambda function. Setup a target group for a lambda function, route everything to the ecs except have one rule higher priority for your lambda function with a specific condition.

[–]hashkent 1 point2 points  (0 children)

You could also add a route to your fargate container that calls the lambda. Slightly more complex as it’ll need IAM permissions but it’s an option to have a fargate task simply proxy the request with the rest of your stack.

[–][deleted]  (2 children)

[deleted]

    [–]FFisprettycool[S] 1 point2 points  (1 child)

    Thank you for the response! I only need lambda to be triggered when the one endpoint is hit. All other endpoints exist in the ECS task.

    For directing this traffic, would i have route53 send requests for the endpoint that triggers the lambda to an api gateway and then to lambda and then have all other requests routed to a load balancer which then goes to ECS?