s3 client

This commit is contained in:
ryanp 2015-08-11 11:56:58 -05:00
parent c62f408c33
commit 5155aa3d07

View File

@ -12,7 +12,7 @@ var DynamoDbDOC = require('dynamodb-doc');
// static vars to save memory
var dynamoDbDocClient, dynamoDbClient;
var lambdaClient, sesClient;
var lambdaClient, sesClient, s3Client;
// Creds read from IAM role or ENV in dev
if (Config.aws.logger) {
@ -22,7 +22,8 @@ if (Config.aws.logger) {
AWS.config.apiVersions = {
dynamodb: '2012-08-10',
lambda: '2015-03-31',
ses: '2010-12-01'
ses: '2010-12-01',
s3: '2006-03-01'
};
/**
@ -87,4 +88,13 @@ module.exports.getLambda = function () {
*/
module.exports.getSes = function () {
return (sesClient) ? sesClient : new AWS.SES();
};
/**
* Get static copy of S3 client
*
* @returns {*}
*/
module.exports.getS3 = function () {
return (s3Client) ? s3Client : new AWS.S3();
};