Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others


0 votes
in Technique[技术] by (71.8m points)

amazon web services - Dynamodb transaction limits increase

Currently, I need to update two tables in concurrency and one table contains configurations and other table include items to the configuration link. Now whenever the configuration is updated, it provides me with the list of items that are belong to this configuration(it can be 100-1000 items or more). How can i update the dynamodb using transaction?

Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Since no more detail was provided I conclude that your application wants to update two DynamoDB tables at the same time (concurrent).

That is not possible.

But there is a way to build something like this with a more AWS-native approach using AWS DynamoDB Streams.

From the documentation:

DynamoDB Streams captures a time-ordered sequence of item-level modifications in any DynamoDB table and stores this information in a log for up to 24 hours. Applications can access this log and view the data items as they appeared before and after they were modified, in near-real time.

Possible solution:

  1. Enable DynamoDB Streams on your configuration table
  2. Configure the stream to send items to a Lambda (that you need to build, see #4)
  3. Change application code to only update configuration table
  4. Create Lambda (see #2) that processes stream items and updates your target table accordingly

With this solution your two tables won't be updated in the same transaction, but it is close to it. There will be extra delay, but it should usually be of no concern.

Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share