From 4ed375b0afecacd1e4921f5afbee715cf6f236ce Mon Sep 17 00:00:00 2001 From: Christopher Chambers Date: Sun, 19 Feb 2017 13:22:51 -0500 Subject: [PATCH] Add missing init for DynamoDB client in Worker (#51) When the dynamoDBEndpoint configuration property was added, not all paths that should have made use of it were updated. Both paths now use the config value to set up the DynamoDB client. --- .../services/kinesis/clientlibrary/lib/worker/Worker.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/com/amazonaws/services/kinesis/clientlibrary/lib/worker/Worker.java b/src/main/java/com/amazonaws/services/kinesis/clientlibrary/lib/worker/Worker.java index 7ebfc3f3..bf9f4e7d 100644 --- a/src/main/java/com/amazonaws/services/kinesis/clientlibrary/lib/worker/Worker.java +++ b/src/main/java/com/amazonaws/services/kinesis/clientlibrary/lib/worker/Worker.java @@ -1064,6 +1064,11 @@ public class Worker implements Runnable { dynamoDBClient.setRegion(region); LOG.debug("The region of Amazon DynamoDB client has been set to " + config.getRegionName()); } + // If a dynamoDB endpoint was explicitly specified, use it to set the DynamoDB endpoint. + if (config.getDynamoDBEndpoint() != null) { + dynamoDBClient.setEndpoint(config.getDynamoDBEndpoint()); + LOG.debug("The endpoint of Amazon DynamoDB client has been set to " + config.getDynamoDBEndpoint()); + } // If a kinesis endpoint was explicitly specified, use it to set the region of kinesis. if (config.getKinesisEndpoint() != null) { kinesisClient.setEndpoint(config.getKinesisEndpoint());