()
| 54 | |
| 55 | #[tokio::main] |
| 56 | async 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] |
nothing calls this directly
no test coverage detected