Skip to content

Commit

Permalink
fix Could not load credentials from any providers
Browse files Browse the repository at this point in the history
  • Loading branch information
frankleng committed Sep 16, 2023
1 parent 7fce2f7 commit 01c3833
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dynadash",
"version": "1.9.12",
"version": "1.9.13",
"description": "DynamoDb helpers",
"main": "dist/index.js",
"types": "dist/types/index.d.ts",
Expand Down
9 changes: 6 additions & 3 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,13 @@ export function initDdbClient(
maxAttempts = 5,
): DynamoDBClient {
if (!ddbClientInstance) {
ddbClientInstance = new DynamoDBClient({
credentialDefaultProvider,
const config: DynamoDBClientConfig = {
maxAttempts,
});
};
if (credentialDefaultProvider) {
config.credentialDefaultProvider = credentialDefaultProvider;
}
ddbClientInstance = new DynamoDBClient(config);
}
return ddbClientInstance;
}
Expand Down

0 comments on commit 01c3833

Please sign in to comment.