Skip to content

Commit

Permalink
Use region from config in AWSDynamoDbTableProvider (#1763)
Browse files Browse the repository at this point in the history
  • Loading branch information
iain-b authored Dec 19, 2024
1 parent 5531a0f commit 8fdf8c1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/sweet-pumpkins-raise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@roadiehq/catalog-backend-module-aws': patch
---

Use region from config in dynamo table provider
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,12 @@ export class AWSDynamoDbTableProvider extends AWSEntityProvider {
}

private async getDdb(dynamicAccountConfig?: DynamicAccountConfig) {
const { region } = this.getParsedConfig(dynamicAccountConfig);
const credentials = this.useTemporaryCredentials
? this.getCredentials(dynamicAccountConfig)
: await this.getCredentialsProvider();
return this.useTemporaryCredentials
? new DynamoDB({ credentials })
? new DynamoDB({ credentials, region })
: new DynamoDB(credentials);
}

Expand Down

0 comments on commit 8fdf8c1

Please sign in to comment.