-
Notifications
You must be signed in to change notification settings - Fork 570
Description
It's now possible to bind an ALB's listener to a target group that invokes a Lambda function. The request and response JSON schema is tantalizingly similar to the existing events.APIGatewayProxyRequest and events.APIGatewayProxyResponse types, but not close enough to just use those types.
Looking at the examples (in lieu of a proper schema), we find the following differences so far:
events.APIGatewayProxyRequestContextlacks an "elb" field.
The example shows a field with the path "requestContext.elb.targetGroupArn."events.APIGatewayProxyResponselacks the rather strange "statusDescription" field.
For the latter, it would be nice to have a function or method to set an HTTP status code using the net/http status code manifest constants, from which we can retrieve the corresponding reason phrase using the net/http.StatusText function. In other words, don't encourage setting the "statusCode" and "statusDescription" fields inconsistently, and make it easy to set them both together.