DataTalk

Forwarding data to Amazon AWS IoT Core

Step-by-step guide to connecting the DataTalk gateway to AWS IoT Core using certificate-based authentication and streaming tag values as MQTT telemetry.

On this page

This guide walks through connecting the DataTalk gateway to Amazon AWS IoT Core so that tag values are forwarded as MQTT telemetry messages. AWS IoT Core uses mutual TLS authentication with device certificates โ€” you will create a Thing in AWS, download three certificate files, and upload them into DataTalk.

What you need

  • An AWS account with IoT Core enabled in your target region
  • Permissions to create IoT Things, certificates, and policies in AWS IAM/IoT
  • The DataTalk gateway configured with at least one Connection and tags reading correctly

Step 1 โ€” Create a Thing and download certificates in AWS

Open AWS IoT Core

Log in to the AWS console, navigate to IoT Core, and select your target region in the top-right corner. All subsequent steps must be in the same region.

Create a Thing

Go to Manage โ†’ Things โ†’ Create things. Select Create a single thing. Give it a name โ€” for example datatalk-gateway-plant1 โ€” and click Next.

Auto-generate certificates

On the certificate step, choose Auto-generate a new certificate. Click Next.

Attach a policy

Create or select a policy that allows iot:Connect, iot:Publish, iot:Subscribe, and iot:Receive actions. A minimal policy for a single device:

{
  "Version": "2012-10-17",
  "Statement": [{
    "Effect": "Allow",
    "Action": ["iot:Connect", "iot:Publish"],
    "Resource": "*"
  }]
}

Attach the policy to the certificate and click Create thing.

Download the three certificate files โ€” do this now

AWS shows the download page only once. Download all three files before clicking Done:

  • Device certificate โ€” filename ends in -certificate.pem.crt โ†’ this is your Certificate (.cert)
  • Private key โ€” filename ends in -private.pem.key โ†’ this is your Private Key (.key)
  • Root CA certificate โ€” click Download next to Amazon Root CA 1 โ†’ this is your Certification Authority (.ca)

Store these files securely. The private key cannot be re-downloaded after you leave this page.

Copy your IoT Core endpoint

In IoT Core, go to Settings (bottom of the left menu). Copy the Device data endpoint โ€” it looks like xxxxxx-ats.iot.us-east-1.amazonaws.com. You will paste this into DataTalk.

Step 2 โ€” Configure the Gateway in DataTalk

Open Data Interface โ†’ Gateway โ†’ Gateway

In the DataTalk project tree, expand Data Interface โ†’ Gateway and double-click Gateway to open the configuration panel.

Set Type to Amazon AWS IoT

In the Type dropdown at the top, select Amazon AWS IoT. The connection fields update to show the AWS-specific form.

Enter the Host endpoint

Paste your IoT Core endpoint into the Host field:

xxxxxx-ats.iot.us-east-1.amazonaws.com

The endpoint and certificates can also be found in the AWS console under AWS IoT โ†’ Security โ†’ Policies.

AWS IoT connection details in DataTalk

AWS IoT Security โ€” certificate and policy location

Set the Client ID

Enter the Thing name you created in AWS โ€” for example datatalk-gateway-plant1. This must match the Thing name exactly, as AWS IoT policies often scope permissions by Thing name.

Client ID must be unique

Only one device can use the same Client ID at the same time. If two gateways connect with the same Client ID, AWS IoT Core will disconnect the first connection when the second one arrives. Use a distinct name for each DataTalk gateway instance.

Upload the three certificate files

Click each upload button and select the corresponding file downloaded from AWS:

  • Certificate (.cert) โ€” the -certificate.pem.crt file
  • Private Key (.key) โ€” the -private.pem.key file
  • Certification Authority (.ca) โ€” the AmazonRootCA1.pem file
Set the sending interval

Set Launching to Timer and Run Every to your desired interval in milliseconds (e.g., 1000 for one second).

Configure the Publish tab

Click the Publish tab to select which tags to include in each message and configure the MQTT topic they are published to.

Tag Database โ€” assigning tags to AWS gateway

Save

Click Save. The gateway establishes a TLS connection to AWS IoT Core and begins publishing telemetry.

AWS IoT Core โ€” data flowing from DataTalk

Step 3 โ€” Verify data in AWS

Open the MQTT test client

In the AWS IoT Core console, go to Test โ†’ MQTT test client. Subscribe to # (all topics) or the specific topic DataTalk is publishing to.

Confirm messages are arriving

Messages from DataTalk should appear within the configured interval. Each message is a JSON payload with the current tag values. Confirm names and values match the DataTalk Tag Database โ†’ Read Values.

Routing data with IoT Rules

Once data arrives in AWS IoT Core, use Message Routing โ†’ Rules to send it to downstream AWS services:

  • Amazon DynamoDB โ€” persist every tag reading as a time-series record
  • Amazon S3 โ€” batch-archive messages for long-term storage or export
  • Amazon Kinesis Data Streams โ€” high-throughput stream processing
  • AWS Lambda โ€” custom processing, alerting, or forwarding to other services
  • Amazon Timestream โ€” purpose-built time-series database for IoT telemetry
Certificate security

Keep the private key file secure โ€” it authenticates your gateway to AWS and cannot be re-downloaded. If compromised, revoke the certificate in the AWS IoT Core console under Security โ†’ Certificates and generate a new one.

Regional endpoint

Always use the endpoint for the region where your Things are registered. Data published to a wrong-region endpoint will fail silently โ€” the connection will be refused. Double-check the region in the endpoint URL matches your IoT Core region.