mirror of
https://github.com/maplibre/martin.git
synced 2024-12-20 21:31:49 +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>
27 lines
439 B
Plaintext
27 lines
439 B
Plaintext
# Extras that are not part of .gitignore
|
|
.git/
|
|
# Having Dockerfile in .dockerignore lets us develop docker images without full rebuild on each change
|
|
Dockerfile
|
|
# Justfile is not needed in the image
|
|
justfile
|
|
# Remove self from the image too
|
|
.dockerignore
|
|
# Unneeded code
|
|
**/tests
|
|
demo/
|
|
|
|
#### This must match .gitignore ####
|
|
.DS_Store
|
|
target/
|
|
**/*.rs.bk
|
|
.idea/
|
|
.vscode/
|
|
test_log*
|
|
*.profraw
|
|
|
|
pg_data/
|
|
config.yml
|
|
tests/output/
|
|
tmp/
|
|
.aws-sam/
|