This crate provides a tower::Layer
that translates hyper
/axum
requests to the format used by the aws-lambda-rust-runtime
crate. This allows users to switch between just running a Hyper server, and running under the Lambda runtime - this dramatically speeds up development! It also means that you can use off-the-shelf components from the Tower ecosystem!
Check out examples/main.rs
: running in debug mode runs a hyper server, and building for release mode compiles using the Lambda runtime.
There is an example Dockerfile for locally spinning up a lambda runtime:
cargo build --release --example main
docker build . -t lambda-test
docker run -p 9000:8080 lambda-test
In test-lambda-runtime/
there is a python script for testing and a Dockerfile for running it.
In another shell, from the root of this repository:
cd test-lambda-runtime
docker build . -t test_lambda_runtime
docker run --network="host" test_lambda_runtime
axum-aws-lambda's People
Forkers
mehmetcansahin arwtyxouymz fdoyon dcormier yassun7010 georgehahn l1x kcking canerduzen nemosupremo kalzoo grafbase pol-inc lemaybaxum-aws-lambda's Issues
Lambda Context?
What do you think about carrying the lambda_http::Context forward into the request? That data is necessary for auth claims when using Cognito, among other things.
I imagine we'd use Extensions for that; I can take a shot at it if you're interested.
Routing?
I have an axum app with multiple routes. Is there a way to access these routes via the generated lambda function?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.