mirror of
https://github.com/maplibre/martin.git
synced 2024-12-29 18:03:27 +03:00
9f9f18163c
This adds the lambda-web crate to adapt the actix App to speak to Lambda by way of the lambda_runtime crate. AWS Lambda has native support for scripting languages to execute a function directly; compiled languages must embed a runtime to fetch incoming events from Lambda and post the responses. This detects the environment variables to start up in Lambda mode instead of the normal HTTP server, and is added as an optional feature. Lambda has five (!) distinct ways of routing HTTP requests to a function; this supports some of them. (Specifically, the most obvious way to do this is with a Function URL, which is newest and simplest, and perhaps with CloudFront, which speaks to the Function URL and not Lambda directly.) The error handling could probably be refined, I was just trying to get this to compile. (Supported: API Gateway HTTP API with payload format version 2.0; API Gateway REST API; Lambda function URLs / Not supported: API Gateway HTTP API with payload format version 1.0; Application Load Balancer) Necessary for #1102 to be able to run the released packages directly, and only having to configure the appropriate environment. --------- Co-authored-by: Yuri Astrakhan <yuriastrakhan@gmail.com> |
||
---|---|---|
.. | ||
lambda-function | ||
lambda-layer | ||
config.markdownlint-cli2.jsonc | ||
homebrew.martin.rb.j2 | ||
lambda.yaml | ||
markdown.links.config.json | ||
multi-platform.Dockerfile |