awslabs / dynamodb-cross-region-library

A library to facilitate cross-region replication with Amazon DynamoDB Streams.
Apache License 2.0
275 stars 98 forks source link

Convert AmazonCloudWatchAsync and AmazonDynamoDBAsync to Non-Static #48

Open vjkoskela opened 7 years ago

vjkoskela commented 7 years ago

Summary: Convert AmazonCloudWatchAsync and AmazonDynamoDBAsync references from static to non-static to allow library to be used against multiple instances simultaneously.

Details: In our case, we are leveraging this library to implement N-way replication of DynamoDb tables from within a single application. These static references lock all emitter instances to a particular AWS region (whichever is established first). Converting from static to non-static addresses our concerns. Further, in our analysis this change does not have any negative impact on the non-library use case since only a single emitter is instantiated and therefore a single instance of AmazonCloudWatchAsync and AmazonDynamoDBAsync remain.