# gulp-aws-lambda

> A Gulp plugin for AWS Lambda deployment.

Latest version **1.0.11** (published 2016-04-10) · ISC license · 0 weekly downloads

## Install

```sh
npm install gulp-aws-lambda
pnpm add gulp-aws-lambda
yarn add gulp-aws-lambda
bun add gulp-aws-lambda
```

## 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.11 |
| Published | 2016-04-10 |
| First published | 2016-04-06 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 0.8.0 |
| Dependencies | 5 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Ralph Crisostomo |
| Maintainers | ralphcrisostomo |
| Keywords | gulp, javascript, plugin, aws, lambda |

## Links

- npm: https://www.npmjs.com/package/gulp-aws-lambda
- Repository: https://github.com/ralphcrisostomo/gulp-aws-lambda
- Issues: https://github.com/ralphcrisostomo/gulp-aws-lambda/issues
- npm.io page: https://npm.io/package/gulp-aws-lambda

## Dependencies (5)

- [async](https://npm.io/package/async.md) ^2.0.0-rc.2
- [lodash](https://npm.io/package/lodash.md) ^4.8.2
- [aws-sdk](https://npm.io/package/aws-sdk.md) ^2.3.1
- [through2](https://npm.io/package/through2.md) ^0.5.1
- [gulp-util](https://npm.io/package/gulp-util.md) ^3.0.7

## 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.11 (latest) — 2016-04-10
- 1.0.10 — 2016-04-10
- 1.0.9 — 2016-04-10
- 1.0.8 — 2016-04-10
- 1.0.7 — 2016-04-08
- 1.0.6 — 2016-04-08
- 1.0.5 — 2016-04-07
- 1.0.4 — 2016-04-07
- 1.0.3 — 2016-04-06
- 1.0.2 — 2016-04-06
- 1.0.1 — 2016-04-06

## README

# gulp-aws-lambda
By Ralph Crisostomo - 2016/04/05

## Description
A Gulp plugin for AWS Lambda deployment.

## Install
```bash
npm install --save-dev gulp-aws-lambda
```

## Sample Lambda Params
```javascript
var lambda_params     = {
    FunctionName      : 'MyFunctionName',
    Handler           : 'index.handler',
    Role              : 'arn:aws:iam:xxxxxx',
    Runtime           : 'nodejs',
    Description       : 'Assign a meaningful description as you see fit',
    MemorySize        : 128,
    Timeout           : 10,
    Publish           : true,
    Code              : {
        S3Bucket      : 'my_s3_bucket',
        S3Key         : 'archive.zip'
    }
}
```

## Basic Usage
If `FunctionName` do not exist in AWS Lambda console, it will create a new one for you.
```javascript

var gulp              = require('gulp');
var zip               = require('gulp-zip');
var aws_lambda        = require('gulp-aws-lambda');

var lambda_params     = { FunctionName : 'MyFunctionName' };
var aws_credentials   = {
    accessKeyId       : '',
    secretAccessKey   : '',
    region            : '',
};

gulp.task('deploy',function(){
    gulp.src(['dist/index.js'])
    .pipe(zip('archive.zip'))
    .pipe(aws_lambda(aws_credentials, lambda_params))
});
```


## Basic usage with S3 upload
If `FunctionName` do not exist in AWS Lambda console, it will create a new one for you.
```javascript

var gulp              = require('gulp');
var install           = require('gulp-install');
var zip               = require('gulp-zip');
var aws_lambda        = require('gulp-aws-lambda');

var lambda_params     = {
    FunctionName      : 'MyFunctionName',
    Code              : {
        S3Bucket      : 'my_s3_bucket',
        S3Key         : 'archive.zip'
    }
};

var aws_credentials   = {
    accessKeyId       : '',
    secretAccessKey   : '',
    region            : '',
};

gulp.task('install_dependencies',function(){
    gulp.src('./package.json')
    .pipe(gulp.dest('./dist'))
    .pipe(install({production : true}))
});

gulp.task('deploy',['install_dependencies'], function(){
    gulp.src(['dist/**/*'])
    .pipe(zip('archive.zip'))
    .pipe(aws_lambda(aws_credentials, lambda_params))
});
```

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