Socket
Socket
Sign inDemoInstall

@everestate/serverless-router-aws

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@everestate/serverless-router-aws

Serverless Router plugin to handle http, streaming and other events at AWS λ


Version published
Weekly downloads
8
decreased by-27.27%
Maintainers
1
Weekly downloads
 
Created
Source

@everestate/serverless-router-aws

Serverless Router plugin to handle http, streaming and other events at AWS λ

Installation

npm install @everestate/serverless-router @everestate/serverless-router-aws --save

Supported events / services

DynamoDB

Steaming events from AWS DynamoDB.

const FOOBAR_TABLE_STREAM_ARN = 'arn:aws:dynamodb:us-west-2:111122223333:table/FooTable/stream/2015-05-11T21:21:33.291';
router.dynamodb
    .insert(FOOBAR_TABLE_STREAM_ARN, (ctx, _event) =>
    console.log(`New Foobar record in inserted "${ctx.newItem}"`));

ctx routing context, it's content dependent on event type event API gateway event, same as dispatch receives

DynamoDB adapter implements insert, modify and remove methods. See the documentation for more details: docs/DynamoDB.md

Http

HTTP Events from AWS API Gateway.

router.http
    .get('/users/:id', (ctx, event) =>
    console.log(`get user by id "${event.pathParameters.id}"`))
    .post('/users', (ctx, event) =>
    console.log(`create new user with attributes "${event.body}"`));

ctx routing context, currently it's always an empty object event API gateway event, same as dispatch receives

Http adapter implements get, post, patch, put, delete and all methods. See the documentation for more details: docs/Http.md

License

MIT

Keywords

FAQs

Package last updated on 20 Dec 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc