Skip to content

Serverless Data Stream with AWS IoT, KinesisFirehose and S3.

Notifications You must be signed in to change notification settings

egurinko/serverless-data-stream

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Serverless Data Stream with AWS

This is a template for AWS IoT data stream using Serverless framework.

Overview

The data flow of this template is below.

  1. Send data from devices via MQTT
  2. IoT Core subscribes data and send it to Kinesis Firehose
  3. Kinesis executes batch (transform data, Putting data together)
  4. Send batched data to S3

If you have a device, you can test with it. Without a device, you can imitate device behavior from AWS IoT core.

Setup

Installation

  1. You need Serverless cli if you don't have it
$ npm install -g severless
  1. AWS creadential setup if you need it
$ brew install awscli
$ aws configure
  1. Clone this repo
$ git clone https://github.com/egurinko/serverless-data-stream.git
$ cd serverless-data-stream
  1. deploy
$ sls deploy --stage <stage name>
  1. remove
$ sls remove --stage <stage name>

Test

Send data to AWS IoT core

The topic name IoT core subscribe is iot/topic . If you have a device, please send data to it.

If you don't have a device, please go to IoT Core page Test tab. And publish data to iot/topic like below.

Check Kinesis batch

To check if kinesis is actually working, you have two ways.

  1. Go to transformation Lambda function
    • go to lambda Monitoring tab
    • Check cloud watch logs below

If you can see cloud watch log, at least you data reaches to Lambda.

  1. Check destination S3 bucket
    • Go to the destination bucket. If your setup succeeds, you can seed some object inside of th bucket

If you select data, you can see data you sent.

Links

About

Serverless Data Stream with AWS IoT, KinesisFirehose and S3.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published