Giter Club home page Giter Club logo

spikenisis's Introduction

What does this do?

It creates a kinesis stream, an eventHandler python, and two APIs (createSubscriber and deleteSubscriber). It simulates a datasteram feeding a kinesis stream, which then triggers the eventHandler lambda, which then pushes batched messages to subscriber lambas. The subscriber lambas push the messages to Sumologic 1 message at at time and wait a random time between 1-3 seconds to 'simulate' slow subscribers.

TODO 4) Create tests to ensure that messages are being delivered in order 5) Find maximum scale of 1 stream (there's a max invocation size to subscriber lambdas, protect against that) 6) Log processing times to create dashboards

How to deploy

  1. Get AWS access and secret keys. See this doc for examples (https://docs.google.com/document/d/1xvCb-bddPmK6GHFRGSsywSZz_kwXFftJdviZTZhYpdU/edit). If you need an AWS account go here (https://sites.google.com/thoughtworks.com/infosec-hub/services/aws-accounts)
  2. Install serverless framework. See instructions here (https://serverless.com/framework/docs/providers/aws/guide/installation/)
  3. Zip up handler.zip. This will be used to create new subscriber lambas later. zip handler.zip handler.py
  4. Deploy serverless. serverless deploy
  5. Check the eventHandler lambda in AWS. You may need to configure the event stream to kinesis manually
  6. Add 2 policies in IAM to the IAM role for lamba. Full Lambda access and Full kinesis access.
  7. Create a DynamoDB table called twitterTable. Keys are namespace and event_name (Cloudformation code coming later)
  8. Run python random_functions.py to quickly spin up additional 'subscribers'
  9. Run python tweeps.py to start streaming data to kinesis

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.