On ReInvent last week, one of the announcements made was that an ALB can now invoke Lambas to serve HTTPS request. Since we can already connect API Gateway to Lambdas, I'm a bit puzzled as to what problem this new feature solves.
This is the annoncement - https://aws.amazon.com/about-aws/whats-new/2018/11/alb-can-now-invoke-lambda-functions-to-serve-https-requests/
Can someone please give some examples?
The problem this solves is that it allows yet another way to use Lambda functions to handle HTTP requests and generate responses.
...but you can already do this with either API Gateway or CloudFront's Lambda@Edge feature.
So, what problem does it really solve?
Simplified integration of Lambda request handling into server-centric applications that use ALB.
While this feature offers, in some sense, a subset of API Gateway's capability, it differs in an important way -- by allowing you to easily "mount" Lambda functions into a specific set of paths in your existing EC2-based application.
You can pick off specific path patterns and send only those to the Lambda function(s) -- under the same domain without any cross-domain complexity, and without needing to proxy the request through your EC2 instances -- while continuing to serve the rest of the app from EC2. Avoiding cross-domain resources within an application simplifies many things, not the least of which is cookies and sessions.
While you could also use this in some cases to replace what API Gateway can do, the idea isn't really that you'd set an ALB exclusively for Lambda functions, although of course you could do that.
This is a great announcement, truly an enabler for Serverless Architecture. In my view, i feel following use cases are now making more sense:
now this will enable us to route requests starting with /application triggers Lambda Function.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With