Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async function zipFunctionCode(root) {
process.chdir(root);
const hopsConfig = require('hops-config');
const awsConfig = require('hops-lambda/lib/aws-config')(hopsConfig);
const tmpDir = await createTmpDirectory();
const lambdaZipFile = path.join(tmpDir, 'lambda.zip');
return createBundle(
root,
lambdaZipFile,
awsConfig.include,
awsConfig.exclude
);
}