# lambpack

> A no nonsense AWS Lambda function packager for node.js— it walks the dependency tree of a lambda handler source file and packages it up into the smallest .zip file suitable for uploading to AWS Lambda.

Latest version **1.0.6** (published 2018-02-27) · ISC license · 0 weekly downloads

## Install

```sh
npm install lambpack
pnpm add lambpack
yarn add lambpack
bun add lambpack
```

Provides the command `lambpack`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.6 |
| Published | 2018-02-27 |
| First published | 2018-02-22 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 10 |
| Unpacked size | 41.4 KB |
| Known vulnerabilities | 0 (+3 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Jim Heising |
| Maintainers | jheising |
| Keywords | AWS, lambda, package, serverless, deployment |

## Links

- npm: https://www.npmjs.com/package/lambpack
- Repository: https://github.com/jheising/lambpack
- Issues: https://github.com/jheising/lambpack/issues
- npm.io page: https://npm.io/package/lambpack

## Dependencies (10)

- [tmp](https://npm.io/package/tmp.md) 0.0.33
- [async](https://npm.io/package/async.md) ^2.6.0
- [lodash](https://npm.io/package/lodash.md) ^4.17.5
- [find-up](https://npm.io/package/find-up.md) ^2.1.0
- [fs-extra](https://npm.io/package/fs-extra.md) ^5.0.0
- [commander](https://npm.io/package/commander.md) ^2.14.1
- [cross-zip](https://npm.io/package/cross-zip.md) ^2.1.5
- [terminal-kit](https://npm.io/package/terminal-kit.md) ^1.14.3
- [dependency-tree](https://npm.io/package/dependency-tree.md) ^6.0.0
- [is-builtin-module](https://npm.io/package/is-builtin-module.md) ^2.0.0

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 1.0.6 (latest) — 2018-02-27
- 1.0.5 — 2018-02-25
- 1.0.4 — 2018-02-25
- 1.0.3 — 2018-02-23
- 1.0.2 — 2018-02-23
- 1.0.1 — 2018-02-22
- 1.0.0 — 2018-02-22

## README

# lambpack

A no nonsense AWS Lambda function packager for node.js— it walks the dependency tree of a lambda handler source file and packages it up into the smallest .zip file suitable for uploading to AWS Lambda.

### Installing It

`npm install lambpack -g`

### Using It
```
$ lambpack

  Usage: lambpack [options] <lambdaHandlerFile> <outputZipFileName> [otherFiles...]


  Options:

    -V, --version  output the version number
    -q, --quiet    quiet mode
    -i, --include-aws  include your own aws-sdk (if you depend on it), otherwise the Lambda globally installed version will be used
    -h, --help     output usage information

```

`lambdaHandlerFile` is the pathname of a .js file which contains your one and only Lambda.handler function.

`outputZipFileName` is the pathname of the .zip file you want to output the package.

`otherFiles` is a space or comma separated list of additional files or directories you may want to include within the deployment .zip file.

`-i, --include-aws`: Normally all Lambda functions have access to a globally installed `aws-sdk` package, so it's usually wasteful to upload it with your code (if you use it). However if there is a specific version in your package.json file that you want to use, you can use this switch to force it to include the one you specify. If you don't use `aws-sdk` at all in your code, then this switch won't really change anything.

#### Example

```
$ cd my_project
$ lambpack lambda.js ./deploy/lambda.zip
```

Follow the instructions to upload and enjoy your serverless existence!

Note: lambpack won't automagically solve the issue of packaging modules with native code— in which case you'll need to run lambpack on an AWS Linux EC2 instance. Check out [lambda-packager](https://www.npmjs.com/package/lambda-packager) if you want a more complex to setup, but very full-featured packager.

---
_Source: https://npm.io/package/lambpack · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
