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

Function main

examples/http-dynamodb/src/main.rs:56–69  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

54
55#[tokio::main]
56async fn main() -> Result<(), Error> {
57 // required to enable CloudWatch error logging by the runtime
58 tracing::init_default_subscriber();
59
60 //Get config from environment.
61 let config = aws_config::load_from_env().await;
62 //Create the DynamoDB client.
63 let client = Client::new(&config);
64
65 run(service_fn(|event: Request| async {
66 handle_request(&client, event).await
67 }))
68 .await
69}
70
71// Add an item to a table.
72// snippet-start:[dynamodb.rust.add-item]

Callers

nothing calls this directly

Calls 3

init_default_subscriberFunction · 0.85
handle_requestFunction · 0.85
runFunction · 0.50

Tested by

no test coverage detected