We are using Dynamodb Local to do integration testing. It is launched inside a container, and within that container, we need to connect to Dynamodb local. Here is how the DocumentClient is initialized:
const doc = new AWS.DynamoDB.DocumentClient({
region: 'localhost',
endpoint: 'http://localhost:5000/'
});
However, when I try connect try batchwrite, like so doc.batchWrite(buildSetData).promise()
, the promise is never fulfilled. For those that are wondering, the batchwrite is in JavaScript, and .promise()
just returned a JS promise.
However, when I run my setup locally (outside of docker container), everything works perfectly.
TLDR: Why can't I connect to DynamoDb Local inside my container.