Open dbclkclk opened 5 years ago
This is a common dynamodb-local
misunderstanding - even though it's not live AWS, you still need to pass a region key, the value just gets ignored:
When configured directly with dynamodb-local
:
console.log("[*] Pointing at DynamoDB Local");
dynamoDbClient = new AWS.DynamoDB.DocumentClient({
region: 'localhost',
endpoint: 'http://localhost:8000'
});
This works great for running tests:
const dynamo = require('dynamodb');
const { DocumentClient } = require('aws-sdk/clients/dynamodb');
const isTest = process.env.JEST_WORKER_ID;
var docClient = new DocumentClient({
convertEmptyValues: true,
...(isTest && {
endpoint: 'localhost:8000',
sslEnabled: false,
region: 'local-env'
}),
})
dynamo.documentClient(docClient)
Does this use Dynamodb local? If so, how can I configure it to use it because, currently I'm getting a bunch of issues using this plugin: