To determine the best method to send data from different AWS services, see Send data from AWS to Axiom.Documentation Index
Fetch the complete documentation index at: https://axiom.co/docs/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
- Create an Axiom account.
- Create a dataset in Axiom where you send your data.
- Create an API token in Axiom with permissions to ingest data to the dataset you have created.
- Create an AWS account with permissions to create and manage IoT rules, Lambda functions, and IAM roles.
Create AWS Lambda function
Create a Lambda function with Python runtime and the following content. For more information, see the AWS documentation. The Lambda function acts as an intermediary to process data from AWS IoT and send it to Axiom.API_TOKEN with the Axiom API token you have generated. For added security, store the API token in an environment variable.
Replace DATASET_NAME with the name of the Axiom dataset where you send your data.
Replace AXIOM_DOMAIN with the base domain of your edge deployment. For more information, see Edge deployments.
This example uses Python for the Lambda function. To use another language, change the code above accordingly.
Create AWS IoT rule
Create an IoT rule with an SQL statement similar to the example below that matches the MQTT messages. For more information, see the AWS documentation.Check logs in Axiom
Use the AWS IoT Console, AWS CLI, or an MQTT client to publish messages to the topic that matches your rule. For example,iot/topic.
In Axiom, go to the Stream tab and select the dataset you specified in the Lambda function. You now see your logs from your IoT devices in Axiom.