Skip to content

Latest commit

 

History

History
129 lines (97 loc) · 3.98 KB

File metadata and controls

129 lines (97 loc) · 3.98 KB
title IoT Analytics
tags
Ultimate
description Get started with IoT Analytics on LocalStack

import FeatureCoverage from "../../../../components/feature-coverage/FeatureCoverage";

:::danger IoT Analytics will be retired on 15 December 2025. It will be removed from LocalStack soon after this date. :::

Introduction

IoT Analytics is a managed service that enables you to collect, store, process, and analyze data generated by your IoT devices. It provides a set of tools to build IoT applications without having to manage the underlying infrastructure.

LocalStack allows you to use the IoT Analytics APIs to create and manage channels, data stores, and pipelines in your local environment. The supported APIs are available on our API Coverage section, which provides information on the extent of IoT Analytics integration with LocalStack.

Getting started

This guide is designed for users new to Iot Analytics and assumes basic knowledge of the AWS CLI and our awslocal wrapper script.

Start your LocalStack container using your preferred method. We will demonstrate how to create a channel, data store, and pipeline within IoT Analytics using LocalStack.

Create a channel

You can create a channel using the CreateChannel API. Run the following command to create a channel named mychannel:

awslocal iotanalytics create-channel --channel-name mychannel

You can use the DescribeChannel API to check the status of the channel:

awslocal iotanalytics describe-channel --channel-name mychannel
{
    "channel": {
        "name": "mychannel",
        "status": "ACTIVE"
    }
}

Create a data store

You can create a data store using the CreateDatastore API. Run the following command to create a data store named mydatastore:

awslocal iotanalytics create-datastore --datastore-name mydatastore

You can use the DescribeDatastore API to check the status of the data store:

awslocal iotanalytics describe-datastore --datastore-name mydatastore
{
    "datastore": {
        "name": "mydatastore",
        "status": "ACTIVE"
    }
}

Create a pipeline

You can create a pipeline using the CreatePipeline API. Run the following command to create a pipeline named mypipeline:

awslocal iotanalytics create-pipeline --cli-input-json file://mypipeline.json

The mypipeline.json file contains the following content:

{
    "pipelineName": "mypipeline",
    "pipelineActivities": [
        {
            "channel": {
                "name": "mychannelactivity",
                "channelName": "mychannel",
                "next": "mystoreactivity"
            }
        },
        {
            "datastore": {
                "name": "mystoreactivity",
                "datastoreName": "mydatastore"
            }
        }
    ]
}

You can use the DescribePipeline API to check the status of the pipeline:

awslocal iotanalytics describe-pipeline  --pipeline-name mypipeline
{
    "pipeline": {
        "name": "mypipeline"
    }
}

Current Limitations

The IoT Analytics service provider is currently mocked in LocalStack, and the service does not interface with the IoT Core service.

API Coverage