Skip to content
This repository has been archived by the owner on Apr 6, 2020. It is now read-only.

DEPRECATED Run npm pack and convert the output to a .zip file

Notifications You must be signed in to change notification settings

Merlin-Taylor/node-pack-zip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DEPRECATED

This repository is no longer maintained. I now use the Terraform archive_file data source to package Node.JS applications for deployment to AWS Lambda.

Description

This package creates a .zip file containing your package and its dependencies.

It is designed to help you deploy NPM packages to AWS Lambda.

The .zip file will contain

  • All files not in node_modules
  • All files in node_modules that are part of a package listed in the dependencies field of your package.json
  • Files may be excluded by adding glob patterns to .packignore

Installation

npm install --save-dev pack-zip

Example

my-lambda is an npm package I want to run as an AWS Lambda Function.

Install pack-zip locally in my-lambda

npm install --save-dev pack-zip

Install any runtime dependencies of my-lambda.

npm install

Modify my-lambda/package.json:

"scripts": {
    "build-aws-resource": "pack-zip"
    ...
}

Create the .zip file containing my-lambda and its dependencies, ready to upload to AWS Lambda

npm run build-aws-resource

About

DEPRECATED Run npm pack and convert the output to a .zip file

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published