Created
August 2, 2019 02:28
DynamoDb utility for usage in TypeScript with serverless-offline
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import AWS from 'aws-sdk' | |
export default (process.env.IS_OFFLINE) | |
? new AWS.DynamoDB.DocumentClient({ | |
region: 'localhost', | |
endpoint: 'http://localhost:8000', | |
accessKeyId: 'NONE', | |
secretAccessKey: 'NONE' | |
}) | |
: new AWS.DynamoDB.DocumentClient() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment