lambda-packer

0.0.1 • Public • Published

AWS Lambda Packer

This function builds a list of all the dependents of a function using webpack and its node packer and creates a package with only the required files to run in Lambda.

Especially useful when you want to use babel / ES6 features and not have to worry about them running on lambda's ancient node version (v0.10)

Useage

// in a gulpfile / task runner / whatever
import lambdaPacker from 'lambda-packer';
 
function deployToLambda() {
  const options {
    zip: true, // set to true to pack a zip file for sending to AWS 
    functionsDir: './src/functions'
  };
 
  lambdaPacker(options).then(zipBuffer =>
    // send to AWS using `aws-sdk`
    // see the AWS docs for details on that
    sendToLambda(zipBuffer)
  );
}

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.1
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.1
    1

Package Sidebar

Install

npm i lambda-packer

Weekly Downloads

1

Version

0.0.1

License

ISC

Last publish

Collaborators

  • azmenak