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

Commit ad5bf87

Browse files
committed
Revert "Changing to Read AWS from ECS IAM"
This reverts commit 383c6eb.
1 parent 383c6eb commit ad5bf87

File tree

2 files changed

+7
-22
lines changed

2 files changed

+7
-22
lines changed

config/default.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ module.exports = {
2525
}
2626
},
2727
DYNAMODB: {
28-
// AWS_ACCESS_KEY_ID: process.env.AWS_ACCESS_KEY_ID || '',
29-
// AWS_SECRET_ACCESS_KEY: process.env.AWS_SECRET_ACCESS_KEY || '',
28+
AWS_ACCESS_KEY_ID: process.env.AWS_ACCESS_KEY_ID || '',
29+
AWS_SECRET_ACCESS_KEY: process.env.AWS_SECRET_ACCESS_KEY || '',
3030
AWS_REGION: process.env.AWS_REGION || '',
31-
IS_LOCAL: process.env.IS_LOCAL === 'true' || 'false'
31+
IS_LOCAL: process.env.IS_LOCAL || 'false'
3232
}
3333
};

models/index.js

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -13,31 +13,16 @@
1313
const config = require('config');
1414
const dynamoose = require('dynamoose');
1515

16-
17-
const awsConfigs = config.DYNAMODB.IS_LOCAL_DB ? {
16+
dynamoose.AWS.config.update({
1817
accessKeyId: config.DYNAMODB.AWS_ACCESS_KEY_ID,
1918
secretAccessKey: config.DYNAMODB.AWS_SECRET_ACCESS_KEY,
2019
region: config.DYNAMODB.AWS_REGION
21-
} : {
22-
region: config.DYNAMODB.AWS_REGION
23-
};
24-
25-
dynamoose.AWS.config.update(awsConfigs);
20+
});
2621

27-
if (config.DYNAMODB.IS_LOCAL_DB) {
28-
dynamoose.local(config.DYNAMODB.DYNAMODB_URL);
22+
if (config.DYNAMODB.IS_LOCAL === 'true') {
23+
dynamoose.local();
2924
}
3025

31-
// dynamoose.AWS.config.update({
32-
// // accessKeyId: config.DYNAMODB.AWS_ACCESS_KEY_ID,
33-
// // secretAccessKey: config.DYNAMODB.AWS_SECRET_ACCESS_KEY,
34-
// region: config.DYNAMODB.AWS_REGION
35-
// });
36-
37-
// if (config.DYNAMODB.IS_LOCAL === 'true') {
38-
// dynamoose.local();
39-
// }
40-
4126
dynamoose.setDefaults({
4227
create: false,
4328
update: false

0 commit comments

Comments
 (0)