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

how to set region for checkpoint table? #33

Closed ttaranov closed 8 years ago

ttaranov commented 8 years ago

library is creating checkpoint tables ("DynamoDBCrossRegionReplication*") in the default region (us-east-1 for me), and not in the region of the source (?) table.

I tried setting AWS_REGION env var, AWS_DEFAULTREGION, ~/.aws/credentials do not have a default region... no matter which region end point I chose as source, or what I put into AWS%REGION env vars, checkpoint tables always end up in in us-east-1.

how to configure this?

dymaws commented 8 years ago

Checkpoint table for KCL will be created in the same region as the EC2 instance region, please see: https://github.com/awslabs/dynamodb-cross-region-library/blob/master/src/main/java/com/amazonaws/services/dynamodbv2/streams/connectors/CommandLineInterface.java#L119

and

https://github.com/awslabs/dynamodb-cross-region-library/blob/master/src/main/java/com/amazonaws/services/dynamodbv2/streams/connectors/DynamoDBConnectorUtilities.java#L116

If you are not running the utility from an EC2 instance the default is us-east-1.