Skip to content

nrlambda: Add support for LambdaFunctionURLRequest #1032

@rittneje

Description

@rittneje

Summary

Add support for treating LambdaFunctionURLRequest as a web request.

Desired Behaviour

Currently, this library will treat APIGatewayProxyRequest and ALBTargetGroupRequest as a web request.

switch r := event.(type) {
case events.APIGatewayProxyRequest:
request.Method = r.HTTPMethod
path = r.Path
headers = r.Headers
case events.ALBTargetGroupRequest:
// https://docs.aws.amazon.com/elasticloadbalancing/latest/application/lambda-functions.html#receive-event-from-load-balancer
request.Method = r.HTTPMethod
path = r.Path
headers = r.Headers
default:
return nil
}

switch r := event.(type) {
case events.APIGatewayProxyResponse:
code = r.StatusCode
headers = r.Headers
case events.ALBTargetGroupResponse:
code = r.StatusCode
headers = r.Headers
default:
return nil
}

Please also add support for LambdaFunctionURLRequest and LambdaFunctionURLResponse.

Possible Solution

Amend the aforementioned switch cases.

Additional context

We want to be able to use Lambda function URLs instead of API Gateway.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions