title: Exception: TypeError(string indices must be integers)
body: <p>I have written the below python function (a snippet of the full code) to work in AWS Lambda. The purpose of it is to take a GeoJSON from an S3 bucket and parse it accordingly.</p>
  <p>Once parsed, it is placed back into JSON format (<code>data</code>) and then should be inserted into the specified database using</p>
  <pre><code>        
                      bulk_item['uuid'] = str(uuid.uuid4())
                      bulk_item['name'] = feature_name
                      bulk_item['type'] = feature_type
                      bulk_item['info'] = obj
                      bulk_item['created'] = epoch_time
                      bulk_item['scope'] = 2
  
                      data = json.dumps(bulk_item)
                      print(data)
                      
             
                      self.database.upsert_record(self.organisation, json_doc=data)  
  
                  
          except Exception as e:
              print(f'Exception: {e.__class__.__name__}({e})')
  </code></pre>
  <p>The db_access file in which the above is relating to is another python script. The function <code>upsert_record</code> is as below:</p>
  <pre><code>def upsert_record(self, organisation,
          json_doc={}):
  </code></pre>
  <p>My code is working perfectly until I try to upsert it into the database. Once this line is gotten to, it throws the error</p>
  <pre><code>Traceback (most recent call last):
  File &quot;/var/task/s3_asset_handler.py&quot;, line 187, in process_incoming_file
  self.database.upsert_record(self.organisation, json_doc=data)
  File &quot;/opt/python/database_access.py&quot;, line 1218, in upsert_record
  new_uuid = json_doc['uuid']
  TypeError: string indices must be integers
  </code></pre>
  <p>I can't seem to figure out the issue at all</p>