Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vandium-io/lambda-event-identifier
AWS Lambda Event Identifier library for node.js
https://github.com/vandium-io/lambda-event-identifier
Last synced: 3 days ago
JSON representation
AWS Lambda Event Identifier library for node.js
- Host: GitHub
- URL: https://github.com/vandium-io/lambda-event-identifier
- Owner: vandium-io
- License: bsd-3-clause
- Created: 2017-03-30T20:31:33.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2019-02-13T23:00:28.000Z (almost 6 years ago)
- Last Synced: 2025-01-01T23:48:20.282Z (7 days ago)
- Language: JavaScript
- Size: 33.2 KB
- Stars: 2
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
[![Build Status](https://travis-ci.org/vandium-io/lambda-event-identifier.svg?branch=master)](https://travis-ci.org/vandium-io/lambda-event-identifier)
[![npm version](https://badge.fury.io/js/%40vandium%2Fevent-identifier.svg)](https://badge.fury.io/js/%40vandium%2Fevent-identifier)# @vandium/event-identifier
Library to identify [AWS Lambda](https://aws.amazon.com/lambda/details) events using [Node.js](https://nodejs.org).
## Features
* Lightweight
* No dependencies## Installation
Install via npm.npm install @vandium/event-identifier --save
## Getting Started
To use the library, call the `identify()` function which will return information
about the event. Currently the `type` of the event is set in the object or
`unknown`.```js
const identifier = require( '@vandium/event-identifier' );// handler for s3 events
exports.handler = function( event, context, callback ) {if( identifier.indentify( event ).type !== 's3' ) {
return callback( new Error( 'not s3 service!' ) );
}callback( null, 'success!' );
}
```For CloudWatch events, the object will contain have the `type` set to
`cloudwatch` and the `source` set to the service that fired the event.## Feedback
We'd love to get feedback on how you're using lambda-tester and things we could add to make this tool better. Feel free to contact us at `[email protected]`
## License
[BSD-3-Clause](https://en.wikipedia.org/wiki/BSD_licenses)