Connecting AWS IoT Core to a Waylay Broker
- Access to AWS platform and IoT Core
- Administrator access
- IoT connected device
- Waylay Broker url
Main building blocks of this integration are presented below:
Say your organisation has some devices that are connected in AWS IoT Core and the devices are configured to push their telemetry data to a Topic or multiple Topics. How does one connect this data on these topic to a Waylay Environment for creating rules and templates? The service connector allow you to bridge the connection between AWS IoT Core and your Waylay environment fairly easy!
All one needs to do is to download this service connector as a Docker image and run in it with a file that contains the environment variables.
Create a file and insert the configurable variables listed below.
The command for running the docker is as followed:
docker run -p 3000:3000 --rm --name connector --env-file=PathToFile/connectorFile awsIoTConnectorDockerImage
Configuration of AWS IoT Core Connector
The following environment variables have to be configured:
||Flattening JSON objects or not (value can be ‘flat’ or not filled in)|
||List of Topics to connect to (seperated by
||AWS IoT Core endpoint url|
||Id of your access key|
||Value of your access key|
||Region of your aws platform|
||TenantId of your organisation|
||Secret of your application|
||Id of your application|
||Waylay accounts url (Same URL as configured in Broker)|
||URL of your broker|
This will convert nested JSON objects into flat (key, value) objects so that all metric are stored in the timeseries database.
PARSE_MODE='flat' or not specified
Note: Messages flowing trough AWS IoT Core must contain a specified ‘resource’ key that will be stored in the Waylay Environment.
Note: If no resource key is present the message will be ignored.
List of AWS Topics in IoT Core, if the list contains more than 1 it must be seperated by
Endpoint of your AWS IoT Core. Can be found in:
Console Home -> Services (IoT Core) -> Settings (bottom left) -> Endpoint
ACCESS_KEY_ID & ACCESS_KEY_SECRET
Set of access keys that an administrator can create for a user. Access Keys can be created in the AWS Console.
Console Home -> Services (IAM) -> Users -> Security Credentials -> Create access key
Name of your AWS Region. Example: