colly
Version:
Another serverless framework for AWS Lambda and API Gateway
20 lines (15 loc) • 456 B
JavaScript
const isLambdaAlreadyDeployed = require( "./isLambdaAlreadyDeployed" );
const updateLambda = require( "./updateLambda" ).init;
const createLambda = require( "./createLambda" ).init;
const utils = require( "../utils" );
function decideHowToDeployLambda () {
isLambdaAlreadyDeployed({
"yes": updateLambda,
"no": createLambda
});
}
module.exports = function () {
utils.authenticate()
.then( decideHowToDeployLambda )
.catch( console.log );
}