Closed estebane-frb closed 2 years ago
Well looks like I just needed to use thee "GitHub.com/awslabs/aws-lambda-go-api-proxy/core" library. Like this:
apiGwCtx, ok := core.GetAPIGatewayContextFromContext(ctx)
if !ok{
return errors.New("gatewayProxyContext not found")
}
I need AWS API gatewayProxyContext which is located within the http.Request passed by GorillaMux. However this context in within a nested context and I don't know how to retrieve it. Here is a screenshot of my debugger (ctx at the top is from http.Request obtained after passing ApiGatewayProxyEvent through gorillamux router)
Is there a recommended way to retrieve this? So far I've tried using github.com/apex/gateway's RequestContext but it can't find the gatewayProxyContext.
Appreciate any help!