title: "The document path provided in the update expression is invalid for update" when trying to update a map value
body: <p>Here is my sample code</p>
  <pre><code>import boto3
  
  import os
  
  ENV = &quot;dev&quot;
  DB = &quot;http://awsservice.com&quot;
  REGION = &quot;us-east-1&quot;
  TABLE = &quot;traffic-count&quot;
  
  
  def main():
      os.environ[&quot;AWS_PROFILE&quot;] = ENV
      client = boto3.resource(&quot;dynamodb&quot;, endpoint_url=DB, region_name=REGION)
  
      kwargs = {'Key': {'id': 'D-D0000012345-P-1'}, 
              'UpdateExpression': 'ADD #count.#car  :delta \n            SET #parentKey = :parent_key, #objectKey = :object_key', 
              'ExpressionAttributeValues': {':delta': 1, ':parent_key': 'District-D0000012345', ':object_key': 'Street-1'}, 
              'ExpressionAttributeNames': {'#car': 'car', '#count': 'count', '#parentKey': 'parentKey', '#objectKey': 'objectKey'}}
  
      client.Table(TABLE).update_item(**kwargs)
  
  
  if __name__ == &quot;__main__&quot;:
      main()
  </code></pre>
  <p>What I want to achieve is this:</p>
  <p>With a single API call (in this <code>update_item</code>), I want to be able to</p>
  <ol>
  <li>If the item does not exit. create an item with a map <code>count</code> and initialise it with <code>{'car': 1}</code> and set the fields <code>parent_key</code> and <code>object_key</code>.</li>
  </ol>
  <p>or</p>
  <ol start="2">
  <li>If the item already exists, update the field to <code>{'car': 2}</code> (if the original count is 1)</li>
  </ol>
  <p>Previously, if I did not use a map,  I can successfully update with this expression,</p>
  <pre><code>SET #count = if_not_exist(#count, :zero) +  :delta, 
      #parentKey = :parent_key, #objectKey = :object_key
  </code></pre>
  <p>However I am getting this error:</p>
  <blockquote>
  <p>botocore.exceptions.ClientError: An error occurred
  (ValidationException) when calling the UpdateItem operation: The
  document path provided in the update expression is invalid for update</p>
  </blockquote>
  <p>Which document path  is causing the problem? How can I fix it?</p>