skip to Main Content

I am trying to convert my existing DynamoDB table to a global DynamoDB table.

In the existing DynamoDB table structure, we have configured a DynamoDB Stream that triggers a Lambda function when there is a change in DynamoDB data.

What will happen to the DynamoDB Stream when I convert the table to a global DynamoDB table? Will the new DynamoDB replicas have their own DynamoDB streams or will the DynamoDB Stream be present only in the original region where the table was first initialized?

Will converting the DynamoDB table to a global table have any effect on DynamoDB Streams that trigger the Lambda function?

2

Answers


  1. Stream events will fire locally in all regions, as each region accepts the write or the replicated write.

    Login or Signup to reply.
  2. All replicas will have streams enabled. As for your Lambda trigger, that’s up to you.

    1. You can just have the Lambda in a single region, as you do now and it will fire for all modification, no matter what region the write was to.

    2. If you need a Lambda to fire only for each individual region, then you can create a Lambda per region and use Lambda Event Filters to filter it to fire only when the write occurred in the local region. To do so with DynamoDB, you’ll need to add the region as an attribute to your item.

    https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search