-2

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'
Jake
  • 7
  • 1
  • 2

1 Answers1

1

Found an example here: http://pyrasis.com/book/TheArtOfAmazonWebServices/Chapter30/09 (though it seems to use an outdated/deprecated option).

Jake
  • 7
  • 1
  • 2