awslabs / aws-lambda-go-api-proxy

lambda-go-api-proxy makes it easy to port APIs written with Go frameworks such as Gin (https://gin-gonic.github.io/gin/ ) to AWS Lambda and Amazon API Gateway.
Apache License 2.0
1.05k stars 197 forks source link

Not passing context.Context to http.Request context #27

Closed snabb closed 5 years ago

snabb commented 5 years ago

The package is not currently accepting context.Context parameter from the Lambda runtime. Therefore the downstream http.Request is lacking it also.

As a result the http handler can not observe the Deadline and is unable to cancel the request gracefully.

See: https://docs.aws.amazon.com/lambda/latest/dg/go-programming-model-context.html https://godoc.org/context