1
0
Fork 0
mirror of synced 2024-09-10 14:35:47 +12:00

Merge pull request #5376 from Budibase/fix/5322

Fix for DynamoDB queries - connecting with endpoint set
This commit is contained in:
Michael Drury 2022-04-13 13:15:03 +01:00 committed by GitHub
commit 3dacffffcd

View file

@ -131,11 +131,12 @@ module DynamoModule {
constructor(config: DynamoDBConfig) {
this.config = config
if (!this.config.endpoint) {
if (this.config.endpoint && !this.config.endpoint.includes("localhost")) {
this.connect()
}
let options = {
correctClockSkew: true,
region: this.config.region || AWS_REGION,
endpoint: config.endpoint ? config.endpoint : undefined,
}
this.client = new AWS.DynamoDB.DocumentClient(options)