Amazon Monitron will no longer be open to new customers
starting October 31, 2024. If you would like to use the service, sign up prior
to that date. Existing customers can continue to use the service as normal.
For capabilities similar to Amazon Monitron, see our blog
post
Processing data with Lambda
Topics
Step 1: Create the IAM role that gives your function permission to access AWS resources
-
Open the roles page
in the IAM console. -
Choose Create role.
-
Create a role with the following properties.
-
Trusted entity: Lambda
-
Permissions: AWSLambdaKinesisExecutionRole (and AWSKeyManagementServicePowerUser if the Kinesis stream is encrypted)
-
Role name: lambda-kinesis-role
-
Step 2: Create the Lambda function
-
Open the Functions page in the Lambda console.
-
Choose Create function.
-
Choose Use a blueprint.
-
In the Blueprints search bar, search and choose kinesis-process-record (nodejs) or kinesis-process-record-python.
-
Choose Configure.
Step 3: Configure the Lambda function
-
Choose Function name
-
Choose the role created in the first step as the Execution role.
-
Configure Kinesis trigger.
-
Choose your Kinesis stream.
-
Click Create function.
-
Step 4: Enable Kinesis trigger in AWS Lambda console
-
On the Configuration tab, choose Triggers.
-
Check the box next to the name of the Kinesis stream and choose Enable.
The blueprint used in this example only consumes log data from the selected stream. You can further edit Lambda function code later to complete a more complicated task.