Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit db31f50

Browse files
Fix issue where AWS deployment failed due to access issues
1 parent e85a0c2 commit db31f50

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/models/index.js

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,11 @@ const dynamoose = require('dynamoose')
77
const fs = require('fs')
88
const path = require('path')
99

10-
const awsConfig = {
10+
dynamoose.aws.sdk.config.update({
11+
accessKeyId: config.AMAZON.AWS_ACCESS_KEY_ID,
12+
secretAccessKey: config.AMAZON.AWS_SECRET_ACCESS_KEY,
1113
region: config.AMAZON.AWS_REGION
12-
}
13-
if (config.AMAZON.AWS_ACCESS_KEY_ID && config.AMAZON.AWS_SECRET_ACCESS_KEY) {
14-
awsConfig.accessKeyId = config.AMAZON.AWS_ACCESS_KEY_ID
15-
awsConfig.secretAccessKey = config.AMAZON.AWS_SECRET_ACCESS_KEY
16-
}
17-
dynamoose.aws.sdk.config.update(awsConfig)
14+
})
1815

1916
if (config.AMAZON.IS_LOCAL_DB) {
2017
dynamoose.aws.ddb.local(config.AMAZON.DYNAMODB_URL)

0 commit comments

Comments
 (0)