[AWS CLI] Add an attribute to an existing DynamoDB item

Created on November 30, 2026

Use aws dynamodb update-item with a SET expression to add an attribute to an existing DynamoDB item. This example adds email to the item whose id is user-1 in the Users table.

aws dynamodb update-item \
  --table-name Users \
  --key '{"id":{"S":"user-1"}}' \
  --update-expression 'SET email = :email' \
  --expression-attribute-values '{":email":{"S":"taro@example.com"}}'

SET replaces the value if the attribute already exists. update-item cannot change the item's primary key attributes.

AWS CLI DynamoDB