Lambda Integration With ALB

Pasted image 20221009185737.png

  • HTTP gets transformed into JSON to trigger the Lambda function
  • Lambda function returns a JSON and ALB converts it back to HTTP
{
	"statusCode": 200,
	"headers": {
		"Content-Type": "text/html"
	},
	"body": "<h1>hello world</h1>",
	"isBase64Encoded": false
}

Multi-header values support (in ALB settings)

  • When enable multiheaders. For example if we have
    • http://example.com/path?name=foo&name=bar
  • Will be converted into
    • "queryStringParameters": {"name": ["foo", "bar"]}