Enriches the lambda
crate with http
types targeting AWS ALB, API Gateway REST and HTTP API lambda integrations.
This crate abstracts over all of these trigger events using standard http
types minimizing the mental overhead
of understanding the nuances and variation between trigger details allowing you to focus more on your application while also giving you to the maximum flexibility to
transparently use whichever lambda trigger suits your application and cost optimiztions best.
Examples
Hello World
The following example is how you would structure your Lambda such that you have a main
function where you explicitly invoke
lambda_runtime::run
in combination with the handler
function. This pattern allows you to utilize global initialization
of tools such as loggers, to use on warm invokes to the same Lambda function after the first request, helping to reduce the latency of
your function's execution path.
use ;
async
Leveraging trigger provided data
You can also access information provided directly from the underlying trigger events, like query string parameters,
with the RequestExt
trait.
use ;
async
async