Deployable hello function behind api gateway

This commit is contained in:
Ben Ramey
2018-09-18 06:50:29 -05:00
parent 5437fe88b0
commit 435060a764
6 changed files with 176 additions and 0 deletions

13
dynamoClient.js Normal file
View File

@@ -0,0 +1,13 @@
const AWS = require('aws-sdk');
// Set the region
AWS.config.update({region: 'us-east-2'});
// also set local endpoint while in development
if (process.env.NODE_ENV === 'development') {
AWS.config.update({endpoint: "http://localhost:8000"});
}
const client = new AWS.DynamoDB.DocumentClient({});
module.exports = client;