aws-dynamodb
Verified for current stable LTS
Aws Dynamodb Command: Update Item
An engineer would use the AWS DynamoDB update-item command to modify the name attribute of an existing item in the specified table when they need to reflect a change, such as updating a user's name from the previous value to 'Jane' using the unique key 'ID'. Exact CLI syntax to update item using Aws Dynamodb.
When to use this: An engineer would use the AWS DynamoDB update-item command to modify the name attribute of an existing item in the specified table when they need to reflect a change, such as updating a user's name from the previous value to 'Jane' using the unique key 'ID'.
Command Syntax
aws dynamodb update-item --table-name <table_name> --key '{{{"ID": {"N": "1"}}}}' --update-expression "{SET Name = :n}" --expression-attribute-values '{{{":n": {"S": "Jane"}}}}' aws dynamodb update-item --table-name <table_name> --key "{{{"ID": `{"N": "1"`}}}}" --update-expression "`{SET Name = :n`}" --expression-attribute-values "{{{":n": `{"S": "Jane"`}}}}" Command Breakdown
--table-name- Command Option
- Tool-specific option used by this command invocation.
--key- Command Option
- Tool-specific option used by this command invocation.
--update-expression- Command Option
- Tool-specific option used by this command invocation.
--expression-attribute-values- Command Option
- Tool-specific option used by this command invocation.
FAQ
Purpose: Exact syntax to update item using Aws Dynamodb.
Test path: Replace placeholders and run destructive commands in a disposable workspace first.
Flag behavior: Tool version, platform, and shell can change behavior.
Improve This Command
Suggest a correction, safer default, or version-specific note for this entry.
Related Operations
Aws Dynamodb Command: List Tables
aws dynamodb list-tables Aws Dynamodb Command: Describe Table aws dynamodb describe-table --table-name <table_name> Aws Dynamodb Command: Get Item aws dynamodb get-item --table-name <table_name> --key '{{{"ID": {"N": "1"}}}}' Aws Dynamodb Command: Scan aws dynamodb scan --table-name <table_name> Aws Dynamodb Command: Create Table aws dynamodb create-table --table-name <table_name> --attribute-definitions <AttributeName=S,AttributeType=S> --key-schema <AttributeName=S,KeyType=HASH> --provisioned-throughput <ReadCapacityUnits=5,WriteCapacityUnits=5>