# actions-on-lambda

> Run Actions on Google in an AWS Lambda Environment

Latest version **1.0.3** (published 2018-07-11) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install actions-on-lambda
pnpm add actions-on-lambda
yarn add actions-on-lambda
bun add actions-on-lambda
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2018-07-11 |
| First published | 2018-02-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=6.0 |
| Dependencies | 3 |
| Unpacked size | 4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Mike Gillis |
| Maintainers | mikegillis677 |
| Keywords | aws, serverless, api, gateway, lambda, express, google, actions, assistant |

## Links

- npm: https://www.npmjs.com/package/actions-on-lambda
- Repository: https://github.com/mikegillis677/actions-on-lambda
- Homepage: https://github.com/mikegillis677/actions-on-lambda#readme
- Issues: https://github.com/mikegillis677/actions-on-lambda/issues
- npm.io page: https://npm.io/package/actions-on-lambda

## Dependencies (3)

- [express](https://npm.io/package/express.md) ^4.15.2
- [actions-on-google](https://npm.io/package/actions-on-google.md) ^1.10
- [aws-serverless-express](https://npm.io/package/aws-serverless-express.md) github:mikegillis677/aws-serverless-express#81778dd5bf261ce013fe7585f29a9e62d68d7cbc

## 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.3 (latest) — 2018-07-11
- 1.0.2 — 2018-03-09
- 1.0.1 — 2018-03-01
- 1.0.0 — 2018-02-26

## README

# Actions on Google fulfillment on AWS Lambda

This library enables you to easily setup a AWS Lambda function that handles requests from Google Actions using
the `actions-on-google` version 1 NodeJS SDK.

If you want to use AWS Lambda for Google Actions using `actions-on-google` version 2 (which is the current version
supported by Dialogflow), `actions-on-google` supports that out of the box.

## Installation

Initial setup:

```bash
$ npm add actions-on-lambda
```

## Example

```javascript
const { DialogflowApp } = require('actions-on-google');
const actionsOnLambda = require('actions-on-lambda');

function mainIntent (app) {
    app.ask("Welcome to the Example App");
};

function responseHandler (app) {
    switch (app.getIntent()) {
        case "input.welcome":
            mainIntent(app);
            break;

        default:
            mainIntent(app);
            break;
    }
}

exports.handler = function (event, context) {
    actionsOnLambda(event, context, (request, response) => {
        let dialogflowApp = new DialogflowApp({ request, response });
        dialogflowApp.handleRequest(responseHandler);
    });
};

```

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