Tutorial: Using AWS Lambda with Amazon Kinesis
In this tutorial, you create a Lambda function to consume events from an Amazon Kinesis stream.
The tutorial is divided into two main sections:
First, you perform the necessary setup to create a Lambda function and then you test it by invoking it manually using sample event data (you don't need an Amazon Kinesis stream).
Second, you create an Amazon Kinesis stream (event source). You add an event source mapping in AWS Lambda to associate the stream with your Lambda function. AWS Lambda starts polling the stream, you add test records to the stream using the Amazon Kinesis API, and then you verify that AWS Lambda executed your Lambda function.
Both the Lambda function and the Amazon Kinesis stream must be in the same AWS region.
This tutorial assumes that you create these resources in the
In this tutorial, you use the AWS Command Line Interface to perform AWS Lambda operations such as creating a Lambda function, creating a stream, and adding records to the stream. You use the AWS Lambda console to manually invoke the function before you create a Amazon Kinesis stream. You verify return values and logs in the console UI.