Browse Source
Merge pull request #5376 from Budibase/fix/5322
Fix for DynamoDB queries - connecting with endpoint set
pull/5483/head
Michael Drury
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
1 deletions
-
packages/server/src/integrations/dynamodb.ts
|
|
|
@ -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) |
|
|
|
|