Let's say I have a website: mysite.com
, running on AWS, served from some EC2 instances behind an Application Load Balancer. The load balancer terminates SSL through an ACM certificate.
I need to route incoming requests to a URL (example: mysite.com/{user_id}/something/here/
) away from the load balancer and instead send them to a Lambda function (more specifically, I want to just capture the request body and write it somewhere and then return an HTTP 200; it doesn't have to be done via a Lambda function).
The ALB lets you route to different target groups, but they can only contain EC2 instances it seems. The docs state "You register targets, such as EC2 instances, with a target group" - what else can be added if not only EC2 instances?
I don't want to have to run my own instance of haproxy etc, nor route them via nginx once the requests go through the ALB and hit the web servers, because the point of this exercise is to reduce things I have to manage, not increase them!
Is there a way around this?