MCPcopy Create free account
hub / github.com/aws/aws-lambda-rust-runtime / main

Function main

examples/basic-s3-thumbnail/src/main.rs:110–123  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

108
109#[tokio::main]
110async fn main() -> Result<(), Error> {
111 // required to enable CloudWatch error logging by the runtime
112 tracing::init_default_subscriber();
113
114 let shared_config = aws_config::load_from_env().await;
115 let client = S3Client::new(&shared_config);
116 let client_ref = &client;
117
118 let func = service_fn(move |event| async move { function_handler(event, 128, client_ref).await });
119
120 run(func).await?;
121
122 Ok(())
123}
124
125#[cfg(test)]
126fn get_thumbnail(vec: Vec<u8>, _size: u32) -> Result<Vec<u8>, String> {

Callers

nothing calls this directly

Calls 3

init_default_subscriberFunction · 0.85
function_handlerFunction · 0.70
runFunction · 0.50

Tested by

no test coverage detected