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:
- Enable DynamoDB Streams on your configuration table
- Configure the stream to send items to a Lambda (that you need to build, see #4)
- Change application code to only update configuration table
- 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.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…