For similar capabilities to Amazon Timestream for LiveAnalytics, consider Amazon Timestream for InfluxDB. It offers simplified data ingestion and single-digit millisecond query response times for real-time analytics. Learn more here.
Amazon Lambda
You can create Lambda functions that interact with Timestream for LiveAnalytics. For example, you can create a Lambda function that runs at regular intervals to execute a query on Timestream and send an SNS notification based on the query results satisfying one or more criteria. To learn more about Lambda, see the Amazon Lambda documentation.
Topics
Build Amazon Lambda functions using Amazon Timestream for LiveAnalytics with Python
Build Amazon Lambda functions using Amazon Timestream for LiveAnalytics with JavaScript
Build Amazon Lambda functions using Amazon Timestream for LiveAnalytics with Go
Build Amazon Lambda functions using Amazon Timestream for LiveAnalytics with C#
Build Amazon Lambda functions using Amazon Timestream for LiveAnalytics with Python
To build Amazon Lambda functions using Amazon Timestream for LiveAnalytics with Python, follow the steps below.
-
Create an IAM role for Lambda to assume that will grant the required permissions to access the Timestream Service, as outlined in Provide Timestream for LiveAnalytics access.
-
Edit the trust relationship of the IAM role to add Lambda service. You can use the commands below to update an existing role so that Amazon Lambda can assume it:
-
Create the trust policy document:
cat > Lambda-Role-Trust-Policy.json << EOF { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "Service": [ "lambda.amazonaws.com" ] }, "Action": "sts:AssumeRole" } ] } EOF
-
Update the role from previous step with the trust document
aws iam update-assume-role-policy --role-name <name_of_the_role_from_step_1> --policy-document file://Lambda-Role-Trust-Policy.json
-
Related references are at TimestreamWrite
Build Amazon Lambda functions using Amazon Timestream for LiveAnalytics with JavaScript
To build Amazon Lambda functions using Amazon Timestream for LiveAnalytics with JavaScript, follow the instructions outlined here.
Related references are at Timestream Write Client - Amazon SDK for JavaScript v3
Build Amazon Lambda functions using Amazon Timestream for LiveAnalytics with Go
To build Amazon Lambda functions using Amazon Timestream for LiveAnalytics with Go, follow the instructions outlined here.
Related references are at timestreamwrite
Build Amazon Lambda functions using Amazon Timestream for LiveAnalytics with C#
To build Amazon Lambda functions using Amazon Timestream for LiveAnalytics with C#, follow the instructions outlined here.
Related references are at Amazon.TimestreamWrite