amazon-kinesis-client-nodejs icon indicating copy to clipboard operation
amazon-kinesis-client-nodejs copied to clipboard

Override dynamoDBEnpoint

Open aikeda opened this issue 6 years ago • 3 comments

Hi,

I'm running Localstack with Kinesis and DynamoDB locally, but I still don't know how to override DynamoDB endpoint. I was looking at the kinesis application client java library, but I guess it uses the default constructor to create the DynamoDbAsyncClient instance.

DynamoDbAsyncClient dynamoDBClient = DynamoDbAsyncClient.builder() .credentialsProvider(DefaultCredentialsProvider.create()).build();

Does anyone know how to do it?

aikeda avatar Jun 27 '19 19:06 aikeda

Got into the same problem. Please help!

Kinesis needs to store its checkpoint status in DynamoDB, but it always go to the real Amazon DynamoDB. How can we point it to the localstack?

khitsik avatar Nov 18 '19 10:11 khitsik

Try using:

  DynamoDbAsyncClient.builder()
      .endpointOverride(new URI(config.endPoint))
      .credentialsProvider(**AnonymousCredentialsProvider.**create())
      .build()

paualarco avatar Mar 28 '20 13:03 paualarco

Or: .endpointOverride(StaticCredentialsProvider.create(AwsBasicCredentials.create("x", "x")))

paualarco avatar Mar 28 '20 17:03 paualarco