Skip to content

Instantly share code, notes, and snippets.

@billydh
Created January 13, 2020 11:12
Show Gist options
  • Select an option

  • Save billydh/d26076824f7d84791cd7c55ba2c3caed to your computer and use it in GitHub Desktop.

Select an option

Save billydh/d26076824f7d84791cd7c55ba2c3caed to your computer and use it in GitHub Desktop.
Update item with new fields with return values
aws dynamodb update-item --endpoint-url http://localhost:8042 --table-name demo-customer-info \
--key '{"customerId": {"S": "1111"}}' \
--update-expression 'SET #lastName = :lastName, #dateOfBirth = :dateOfBirth' \
--expression-attribute-names '{"#lastName": "lastName", "#dateOfBirth": "dateOfBirth"}' \
--expression-attribute-values '{":lastName": {"S": "Jones"}, ":dateOfBirth": {"S": "1985-03-01"}}' \
--return-values ALL_NEW
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment