I'm using the following command to read a value from AWS DynamoDB:
aws dynamodb get-item --table-name XXXTABLEXXX --key '{"key":{"S":"XXXKEYXXX"}}' --attributes-to-get XXXATTRXXX | awk '{print $2}'
I'm trying to find out how to also update this attribute, but the documentation for the command line tool has no examples whatsoever of the syntax for doing so (http://docs.aws.amazon.com/cli/latest/reference/dynamodb/update-item.html). What I have so far is the following, but there is a problem with the syntax of the update expression and I can't figure out what the correct one is.
aws dynamodb update-item --table-name XXXTABLEXXX --key '{"key":{"S":"XXXKEYXXX"}}' --update-expression 'SET XXXATTRXXX = 1000'