mirror of
https://github.com/serverless/serverless.git
synced 2026-01-25 15:07:39 +00:00
s3 client
This commit is contained in:
parent
c62f408c33
commit
5155aa3d07
@ -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();
|
||||
};
|
||||
Loading…
x
Reference in New Issue
Block a user