Skip to content

Instantly share code, notes, and snippets.

@khalidx
Created August 2, 2019 02:28
DynamoDb utility for usage in TypeScript with serverless-offline
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