()
| 24 | |
| 25 | #[tokio::main] |
| 26 | async fn main() -> Result<(), Error> { |
| 27 | // required to enable CloudWatch error logging by the runtime |
| 28 | tracing::init_default_subscriber(); |
| 29 | |
| 30 | let func = service_fn(my_handler); |
| 31 | if let Err(err) = lambda_runtime::run(func).await { |
| 32 | eprintln!("run error: {:?}", err); |
| 33 | return Err(err); |
| 34 | } |
| 35 | Ok(()) |
| 36 | } |
| 37 | |
| 38 | pub(crate) async fn my_handler(event: LambdaEvent<Request>) -> Result<Response, Error> { |
| 39 | // extract some useful info from the request |
nothing calls this directly
no test coverage detected