4 ms·
> For us it would have been better if we could just put a normal load balancer in front of Lambda. This can be done. https://aws.amazon.com/blogs/networking-a
by iddqd 7y ago
> For us it would have been better if we could just put a normal load balancer in front of Lambda.
This can be done.
https://aws.amazon.com/blogs/networking-and-content-delivery/lambda-functions-as-targets-for-application-load-balancers/ https://aws.amazon.com/blogs/networking-and-content-delivery...
- EwanToo 7y agoYes, it would be a much less dramatic headline if they'd used an ALB instead of an API Gateway, it shows the complexity of the AWS product offering though that someone picking up lambda for the first time didn't find this out. They already have a classic ELB in place, so switching to an ALB wouldn't be a significant change in cost or capability (the ALB is often cheaper, though it's hard to tell in this case)
- einaregilsson 7y agoYes, ALB would have been a much better fit for us. We used API Gateway because that's what the serverless framework sets up (at least by default) and I didn't know you could use ALB in front of Lambda.
- EwanToo 7y agoYes, it does show there's a gap in the documentation, hopefully someone from AWS will pick this up (and the serverless framework has only just added ALB support a couple of months ago)
- sakopov 7y agoI didn't know you could do this. For anyone interested here's a simple CF template that illustrates this scenario [1]. [1] https://github.com/s0enke/cloudformation-templates/blob/master/templates/lambda-alb-sam-sample.yaml https://github.com/s0enke/cloudformation-templates/blob/mast...