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

Function add_item

examples/http-dynamodb/src/main.rs:73–83  ·  view source on GitHub ↗

Add an item to a table. snippet-start:[dynamodb.rust.add-item]

(client: &Client, item: Item, table: &str)

Source from the content-addressed store, hash-verified

71// Add an item to a table.
72// snippet-start:[dynamodb.rust.add-item]
73pub async fn add_item(client: &Client, item: Item, table: &str) -> Result<(), Error> {
74 let item = to_item(item)?;
75
76 let request = client.put_item().table_name(table).set_item(Some(item));
77
78 tracing::info!("adding item to DynamoDB");
79
80 let _resp = request.send().await?;
81
82 Ok(())
83}

Callers 1

handle_requestFunction · 0.85

Calls 1

sendMethod · 0.80

Tested by

no test coverage detected