lambda-helper
A helper to create new AWS LAMBDA FUNCTION && add AWS API GATEWAY trigger to it && update code
Install
npm i --save lambda-helper
API
lambdaHelper.create(opts)
@param {object} opts
@param {string} opts.funcName
@param {string} [opts.funcDesp='no description']
@param {string} [opts.iamRole='arn:aws:iam::004629844575:role/lambda-gateway-execution-role']
@param {string} [opts.region='ap-southeast-1']
@param {string} [opts.runtime='nodejs6.10']
@param {number} [opts.timeout=60]
@param {number} [opts.memorySize=3008]
@param {[string]} [opts.enviroment=['NODE_ENV=production']] ex: ['KeyName1=string', 'KeyName2=string']
@param {string} [opts.deployStageName='prod']
@returns {promise} Promise object represents the api invication url
lambdaHelper.updateCode(opts)
@param {string} opts.funcName
@param {string} opts.codeDir
@param {string} [opts.codeS3Bucket='nitebell-lambda']
@returns {promise}
Usage
const create updateCode } = ; const funcName = 'YOUR_LAMBDA_FUNCTION_NAME'; ;