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.
-
On the Select trusted entity page, do the following:
-
In Trusted entity type, choose AWS service.
-
In Use case, for Service or use case choose Lambda.
-
Choose Next.
-
-
In the Add permissions page, do the following:
-
In Permissions policies, choose AWSLambdaKinesisExecutionRole (and AWSKeyManagementServicePowerUser if the Kinesis stream is encrypted).
-
Leave the configurations in Set permissions boundary as is.
-
Choose Next.
-
-
In the Name, review, and create page, do the following:
-
In Role details, for Role name, enter a name for your role. For example
lambda-kinesis-role
. You can also choose to add an optional Description. -
Leave the settings for Step 1: Select trusted entities and Step 2: Add permissions as is. You can choost to add tags in Step 3: Add tags to keep track of your resources.
-
-
Select Create 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.