15 releases (2 stable)
| 1.0.1 | Nov 14, 2025 |
|---|---|
| 0.12.4 | Aug 27, 2025 |
| 0.12.3 | Jul 21, 2025 |
| 0.11.1 | May 8, 2024 |
| 0.5.0 | Feb 20, 2022 |
#464 in HTTP server
309,136 downloads per month
Used in 105 crates
(3 directly)
30KB
532 lines
AWS Lambda Runtime API Client
lambda-runtime-api-client is a library to interact with the AWS Lambda Runtime API.
This crate provides simple building blocks to send REST request to this API. You probably don't need to use this crate directly, look at lambda_runtime and lambda_extension instead.
Example
use http::{Method, Request};
use hyper::Body;
use lambda_runtime_api_client::{build_request, Client, Error};
fn register_request(extension_name: &str, events: &[&str]) -> Result<Request<Body>, Error> {
let events = serde_json::json!({ "events": events });
let req = build_request()
.method(Method::POST)
.uri("/2020-01-01/extension/register")
.header("Lambda-Extension-Name", extension_name)
.body(Body::from(serde_json::to_string(&events)?))?;
Ok(req)
}
#[tokio::main]
async fn main() -> Result<(), Error> {
let client = Client::builder().build()?;
let request = register_request("my_extension", &["INVOKE"])?;
client.call(request).await
}
Dependencies
~10–24MB
~213K SLoC