MCPcopy Index your code
hub / github.com/aws/aws-lambda-rust-runtime / run

Function run

lambda-http/src/lib.rs:228–236  ·  view source on GitHub ↗

Starts the Lambda Rust runtime and begins polling for events on the [Lambda Runtime APIs](https://docs.aws.amazon.com/lambda/latest/dg/runtimes-api.html). This takes care of transforming the LambdaEvent into a [`Request`] and then converting the result into a `LambdaResponse`. # Managed concurrency If `AWS_LAMBDA_MAX_CONCURRENCY` is set, a warning is logged. If your handler can satisfy `Clone +

(handler: S)

Source from the content-addressed store, hash-verified

226/// (`AWS_LAMBDA_FUNCTION_NAME`, `AWS_LAMBDA_FUNCTION_MEMORY_SIZE`,
227/// `AWS_LAMBDA_FUNCTION_VERSION`, `AWS_LAMBDA_RUNTIME_API`).
228pub async fn run<'a, R, S, E>(handler: S) -> Result<(), Error>
229where
230 S: Service<Request, Response = R, Error = E>,
231 S::Future: Send + 'a,
232 R: IntoResponse,
233 E: std::fmt::Debug + Into<Diagnostic>,
234{
235 lambda_runtime::run(Adapter::from(handler)).await
236}
237
238/// Starts the Lambda Rust runtime and begins polling for events on the [Lambda
239/// Runtime APIs](https://docs.aws.amazon.com/lambda/latest/dg/runtimes-api.html).

Callers 15

mainFunction · 0.50
mainFunction · 0.50
mainFunction · 0.50
mainFunction · 0.50
mainFunction · 0.50
mainFunction · 0.50
mainFunction · 0.50
mainFunction · 0.50
mainFunction · 0.50
mainFunction · 0.50
mainFunction · 0.50

Calls

no outgoing calls

Tested by 1

mainFunction · 0.40