This is a template for AWS IoT data stream using Serverless framework.
The data flow of this template is below.
- Send data from devices via MQTT
- IoT Core subscribes data and send it to Kinesis Firehose
- Kinesis executes batch (transform data, Putting data together)
- 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.
- You need Serverless cli if you don't have it
$ npm install -g severless
- AWS creadential setup if you need it
$ brew install awscli
$ aws configure
- Clone this repo
$ git clone https://github.com/egurinko/serverless-data-stream.git
$ cd serverless-data-stream
- deploy
$ sls deploy --stage <stage name>
- remove
$ sls remove --stage <stage name>
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.
To check if kinesis is actually working, you have two ways.
- 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.
- 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.