IoT Core to Amazon Kinesis to AWS Lambda

IoT → Kinesis → Lambda

Create a IoT Rule with a Kinesis Data Stream action that publishes messages to a Kinesis Data Stream and triggers a Lambda function to process the data.

This pattern contains a sample AWS CDK stack to create an IoT Rule with a Kinesis Data Streams action and an AWS Lambda function.
When a message is published to the IoT topic defined in the IoT Rule, this message will be delivered to the Kinesis Data Stream. The Lambda function is configured with an event source mapping and it will be triggered to process the streaming data. In this sample the Lambda function decodes the message polled from the Kinesis Data Stream and logs its content.

< Back to all patterns

GitHub icon Download this pattern (.zip)

GitHub icon View this pattern on GitHub


Clone repo

git clone https://github.com/aws-samples/serverless-patterns/cd serverless-patterns/iot-kinesis-lambda-cdk

Deploy

cdk deploy


Testing

See the GitHub repo for detailed testing instructions.

Cleanup

Delete the stack: cdk delete.

Created by:

Patrick Malatesta

Patrick Malatesta

Cloud Infrastructure Architect at AWS Professional Services