Lambda on


Application Load Balancer

AWS Cloud

Application Load Balancer (ALB) can now trigger AWS Lambda functions to serve HTTP/HTTPS requests enabling users to access serverless applications.

Application Load Balancer now provides you a single HTTP endpoint for all requests whether they are served from EC2, containers, on-prem servers or Lambda functions.

With the Application Load Balancers’ support for content-based routing rules, you can also route requests to different Lambda functions based on the request content.

Prior to this launch, you could only use EC2 instances, containers, and on-premises servers, as targets for Application Load Balancers, and you needed other proxy solutions to invoke Lambda functions over HTTP(S).

You can now use an Application Load Balancer as a common HTTP endpoint to simplify operations and monitoring for applications that use servers and serverless computing.

Read more about using Lambda as a target in the Elastic Load Balancing documentation.

Overview:

ALB invoking AWS Lambda Process:

  1. ALB receives client request that matches rules to forward to Lambda function.
  2. ALB invokes Lambda function, sending the incoming data in JSON format.
  3. Lambda function performs task, returns HTTP response to ALB
  4. ALB routes response to client

Additional Resources:

via GIPHY