Functions
delete-item
fn (table_name: Str, key: Map, condition_expression: Str, expression_attribute_values: Map): DeleteItemResponse | AwsError
fn (table_name: Str, key: Map): DeleteItemResponse | AwsError
Delete an item from a DynamoDB table by its primary key.
Example
key {pk: {S: "user-123"}, sk: {S: "profile"}}
::aws::dynamodb::items/delete-item("my-table", key)
get-item
fn (table_name: Str, key: Map, consistent_read: Bool, projection_expression: Str): GetItemResponse | AwsError
fn (table_name: Str, key: Map, consistent_read: Bool): GetItemResponse | AwsError
fn (table_name: Str, key: Map): GetItemResponse | AwsError
Get an item from a DynamoDB table by its primary key.
Example
key {pk: {S: "user-123"}, sk: {S: "profile"}}
result ::aws::dynamodb::items/get-item("my-table", key)
result.item.name.S // => "Alice"
result.item.age.N // => "30"
put-item
fn (table_name: Str, item: Map, condition_expression: Str, expression_attribute_values: Map): PutItemResponse | AwsError
fn (table_name: Str, item: Map): PutItemResponse | AwsError
Put an item into a DynamoDB table. Item should use DynamoDB attribute value format.
Example
item {
pk: {S: "user-123"},
sk: {S: "profile"},
name: {S: "Alice"},
age: {N: "30"}
}
result ::aws::dynamodb::items/put-item("my-table", item)
update-item
fn (table_name: Str, key: Map, update_expression: Str, expression_attribute_values: Map, expression_attribute_names: Map): UpdateItemResponse | AwsError
fn (table_name: Str, key: Map, update_expression: Str, expression_attribute_values: Map): UpdateItemResponse | AwsError
Update an item in a DynamoDB table using update expressions.
Returns the updated attributes (ALL_NEW).
Example
key {pk: {S: "user-123"}, sk: {S: "profile"}}
result ::aws::dynamodb::items/update-item(
"my-table",
key,
"SET hit_count = hit_count + :inc, updated_at = :now",
{":inc": {N: "1"}, ":now": {S: "2026-02-16"}}
)
result.attributes.hit_count.N // => "1"
Types
DeleteItemResponse
DeleteItemResponse type {
attributes: Map?,
consumed_capacity: Map?
}
GetItemResponse
GetItemResponse type {
item: Map?,
consumed_capacity: Map?
}
PutItemResponse
PutItemResponse type {
attributes: Map?,
consumed_capacity: Map?
}
UpdateItemResponse
UpdateItemResponse type {
attributes: Map?,
consumed_capacity: Map?
}