- Update items using the update-item command:
aws dynamodb update-item
--table-name my_table
--key '{"id":{"S":"001"},"dateandtime":{"N":"1536898265"}}'
--update-expression "SET field1=:field1"
--expression-attribute-values '{":field1":{"N":"30"}}'
--region us-east-1
--profile admin
For update-item, you need to specify all the keys available using the key option.