# Can several functions in parallel write data in dynamo db?

**URL:** <https://forum.serverless.com/t/can-several-functions-in-parallel-write-data-in-dynamo-db/9906>\
**Category:** Serverless Framework\
**Tags:** lambda, dynamodb\
**Created:** [November 19, 2019, 5:00am UTC](https://forum.serverless.com/t/can-several-functions-in-parallel-write-data-in-dynamo-db/9906 "2019-11-19T05:00:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![maxxis1996](https://avatars.discourse-cdn.com/v4/letter/m/d07c76/32.png) [@maxxis1996](https://forum.serverless.com/u/maxxis1996)\
**Post date:** [November 19, 2019, 5:00am UTC](https://forum.serverless.com/t/can-several-functions-in-parallel-write-data-in-dynamo-db/9906/1 "2019-11-19T05:00:47Z")

</div>

execution without parallel functions: time = x

execution with 4 parallel functions: time = x / 4

When the code attached with 4 parallel functions is executed, the total time is not divided for 4, but is maintained.

- my question is: Does Dynamodb support parallel function table writes?
- Is there any configuration for dynamo to support writes in parallel?

```auto
def patronfanin_out(event, context):
    for i in range(4):
        x= list #aqui envio una lista nueva para cada función
        response = lambda_client.invoke(
        FunctionName="tesis-aws-patrones-dev-workers",
        InvocationType='Event',
        Payload=json.dumps(x)
      )

def workers(event, context):
  table = boto3.resource('dynamodb').Table('patron2')
  rowsFinal = event['list']
  with table.batch_writer() as batch:
    for row in rowsFinal:
      batch.put_item(Item={
          'id': str(uuid.uuid4()),
          'serie': row[0],
          'rank': row[1],
          'discipline': row[2],
          'sex': row[3],
          'salary': row[4]
          })
  response = {
      "statusCode": 200,
      "params" : rowsFinal
  }
  return response

```
