title: AWSCli dynamodb update-item command syntax
body: <p>am using AmazonAwsCli to write a shell script to update an attribute in an item in a dynamodb table. I want to update an attribute in a table for multiple items. I am reading the attribute value from a file and am trying to update the table by injecting the value of the shell script variable in the command. The documentation available at <a href="http://docs.aws.amazon.com/cli/latest/reference/dynamodb/update-item.html" rel="noreferrer">http://docs.aws.amazon.com/cli/latest/reference/dynamodb/update-item.html</a> suggests using separate json files for expression-attribute-names and expression-attribute-values. However, I do not want to create separate json files. Rather, I want to write one command to update an item for a given attribute value.</p>
  
  <pre><code>My table name = MY_TABLE_NAME
  
  hashkey = AccountId
  
  shell script variable holding the value of AccountId = accountId
  
  attribute name that needs to be updated = Version
  
  shell script variable holding the value of Version = ver
  </code></pre>
  
  <p>I have got something like :</p>
  
  <blockquote>
    <p>aws dynamodb update-item --table-name MY_TABLE_NAME --key '{"AccountId": {"S": '$accountId'}}' --update-expression "SET Version = '{"Version": {"S": '$ver'}}'" --condition-expression "attribute_exists(Version)" --return-values UPDATED_NEW</p>
  </blockquote>
  
  <p>But, the above command does not work. Can someone point me to the correct syntax.</p>