Expand description
Run an Autumn application on AWS Lambda.
Add the plugin. Do not change the call to run():
use autumn_plugin_aws_lambda::AwsLambdaPlugin;
use autumn_web::prelude::*;
#[get("/")]
async fn index() -> &'static str {
"hello"
}
#[autumn_web::main]
async fn main() {
autumn_web::app()
.plugin(AwsLambdaPlugin::new())
.routes(routes![index])
.run()
.await;
}On Lambda, the plugin receives each event. It sends the event to the
Autumn server as an HTTP request on loopback. With the default
Activation::Auto, the plugin stays idle outside Lambda. See the
design record.
Structs§
- AwsLambda
Plugin - Runs an Autumn app on AWS Lambda.
Enums§
- Activation
- Controls when the plugin starts the Lambda runtime loop.
- Plugin
Error - Errors that stop the plugin at startup.
- Response
Mode - How the plugin sends responses to Lambda.