DynamoDB 跨区域复制 AWS Java SDK

DynamoDB cross-region replication AWS Java SDK

我需要为我的 DynamoDb 配置跨区域复制 table。要手动尝试,我只使用了 AWS Web 控制台,我在其中配置了具有适当区域的全局 Table 以通过 DynamoDb 流进行复制,这非常简单。有人可以告诉我如何使用 Java SDK 吗?

请记住,DyanmoDB 现在支持 global tables as announced on 29 November 2017。因此,您可能可以用全局表替换大量区域表。

Global Tables eliminates the difficult work of replicating data between regions and resolving update conflicts, enabling you to focus on your application’s business logic. In addition, Global Tables enables your applications to stay highly available even in the unlikely event of isolation or degradation of an entire region.

但是直接回答你的问题,它不是 AWS DynamoDB Java SDK 的一部分。您必须使用 AWS 实验室的 dynamodb-cross-region-library。

Cross-Region Replication

Important

AWS previously provided a cross-region replication solution based on AWS CloudFormation. This solution has now been deprecated in favor of an open source command line tool. For more information, please refer to the detailed instructions on

GitHub:

https://github.com/awslabs/dynamodb-cross-region-library/blob/master/README.md

The DynamoDB cross-region replication solution uses the Amazon DynamoDB Cross-Region Replication Library. This library uses DynamoDB Streams to keep DynamoDB tables in sync across multiple regions in near real time. When you write to a DynamoDB table in one region, those changes are automatically propagated by the Cross-Region Replication Library to your tables in other regions.

You can leverage the Cross-Region Replication Library in your own applications, to build your own replication solutions with DynamoDB Streams. For more information, and to download the source code, go to the following GitHub repository:

https://github.com/awslabs/dynamodb-cross-region-library