Skip to content

Commit

Permalink
update aws
Browse files Browse the repository at this point in the history
  • Loading branch information
lailien3 committed Oct 16, 2024
1 parent 81ba18a commit 07e0adb
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions packages/connectors-lib/src/aws.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
import Config from './config.js'
import { DynamoDB } from '@aws-sdk/client-dynamodb'
import { createDocumentClient } from './documentclient-decorator.js'
import AWS from 'aws-sdk'
const { DynamoDB, SQS, S3, SecretsManager } = AWS

const { SQS, S3, SecretsManager } = AWS

export default function () {
const dynamoDBInstance = new DynamoDB({
apiVersion: '2012-08-10',
...(Config.aws.dynamodb.endpoint && {
endpoint: Config.aws.dynamodb.endpoint
})
})

return {
ddb: new DynamoDB({
apiVersion: '2012-08-10',
...(Config.aws.dynamodb.endpoint && {
endpoint: Config.aws.dynamodb.endpoint
})
}),
ddb: dynamoDBInstance,
docClient: createDocumentClient({
convertEmptyValues: true,
apiVersion: '2012-08-10',
Expand Down

0 comments on commit 07e0adb

Please sign in to comment.