Coder Social home page Coder Social logo

kinesis-lambda's Introduction

kinesis-lambda

Simple kinesis serverless example

Set up

Create the kinesis stack

aws cloudformation create-stack --stack-name k1 --template-body file://k1.yml

Deploy the lambda

sls deploy --aws-profile <profile>

Write a record to the stream

aws kinesis put-record --stream-name K1Stream --data 'all work and no play makes jack a dull boy' --partition-key foo

View the function log to verify the processing of the record

sls logs --function hello --aws-profile <profile>
START RequestId: 8ae8d4ee-6500-47c6-a714-e50dec8482b9 Version: $LATEST
2018-09-05 13:10:09.967 (-07:00)	8ae8d4ee-6500-47c6-a714-e50dec8482b9	doIt called with payload {"Records":[{"kinesis":{"kinesisSchemaVersion":"1.0","partitionKey":"foo","sequenceNumber":"49587981361615891374515510864421257312231838989840023554","data":"YWxsIHdvcmsgYW5kIG5vIHBsYXkgbWFrZXMgamFjayBhIGR1bGwgYm95","approximateArrivalTimestamp":1536178207.753},"eventSource":"aws:kinesis","eventVersion":"1.0","eventID":"shardId-000000000000:49587981361615891374515510864421257312231838989840023554","eventName":"aws:kinesis:record","invokeIdentityArn":"arn:aws:iam::427848627088:role/k1-dev-us-east-1-lambdaRole","awsRegion":"us-east-1","eventSourceARN":"arn:aws:kinesis:us-east-1:nnnnnnnnnnnn:stream/K1Stream"}]}
END RequestId: 8ae8d4ee-6500-47c6-a714-e50dec8482b9
REPORT RequestId: 8ae8d4ee-6500-47c6-a714-e50dec8482b9	Duration: 16.04 ms	Billed Duration: 100 ms 	Memory Size: 1024 MB	Max Memory Used: 45 MB	

kinesis-lambda's People

Contributors

d-smith avatar

Watchers

 avatar James Cloos avatar  avatar

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.