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

Sync master with dev #38

Merged
merged 13 commits into from
Nov 6, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix issue where AWS deployment failed due to access issues
  • Loading branch information
callmekatootie committed Oct 29, 2020
commit db31f50133077152c4b771c934d9eb54d9a434d0
11 changes: 4 additions & 7 deletions src/models/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,11 @@ const dynamoose = require('dynamoose')
const fs = require('fs')
const path = require('path')

const awsConfig = {
dynamoose.aws.sdk.config.update({
accessKeyId: config.AMAZON.AWS_ACCESS_KEY_ID,
secretAccessKey: config.AMAZON.AWS_SECRET_ACCESS_KEY,
region: config.AMAZON.AWS_REGION
}
if (config.AMAZON.AWS_ACCESS_KEY_ID && config.AMAZON.AWS_SECRET_ACCESS_KEY) {
awsConfig.accessKeyId = config.AMAZON.AWS_ACCESS_KEY_ID
awsConfig.secretAccessKey = config.AMAZON.AWS_SECRET_ACCESS_KEY
}
dynamoose.aws.sdk.config.update(awsConfig)
})

if (config.AMAZON.IS_LOCAL_DB) {
dynamoose.aws.ddb.local(config.AMAZON.DYNAMODB_URL)
Expand Down