Learn how to deploy the AWS IoT integration for The Things Stack.
Prerequisites
- Access to an AWS account. Create a new account
- An application in The Things Stack. See instructions
Create API Key
Go to your application in The Things Stack Console, go to API keys and click + Add API key.
Enter a name, like AWS IoT integration, and grant at least the following individual rights:
- View devices in application
- View device keys in application
- Create devices in application
- Edit device keys in application
- Edit basic application settings
- View and edit application packages and associations
- Write downlink application traffic
- Read application traffic (uplink and downlink)

Click Create API key, copy the key and store it in a safe place. You need the API key in the next section.
Deploy AWS CloudFormation Template
Warning:
Make sure to select the template related to your deployment only.Settings
The Stack name is the unique name identifying the integration in your AWS account.
The parameters configure the integration:
- Principal Account ID
: AWS Account ID that The Things Stack authenticates with.
- Thing Type Name: The unique AWS IoT Core thing type name for this integration.
- Thing Name Scheme: The name that is given to AWS IoT things when they are created by the integration.
- When using
DevEUI
, the name will appear as the numeric DevEUI, i.e 1122334455667788. - When using
DeviceID
, the thing name will be a combination of the CloudFormation stack name and the device ID as registered in The Things Stack, i.e.<stackName>_<DeviceID>
.
- When using
- Thing Shadow Metrics: Enable or disable updating the thing shadow with metrics.
- Cluster Address: The cluster address of your The Things Stack deployment.
- When using The Things Stack Cloud, go to The Things Stack Cloud Addresses to find your cluster address
- When using The Things Stack Enterprise, enter your cluster address
- When using The Things Network, select the community cluster from the dropdown
- Enable End-to-End Encryption
: If enabled, the AppSKey is delivered as encrypted from Join Server to your AWS Account, so the AppSKey will not be exposed to the network layer. Also, your AWS solution needs to handle binary payload as the underlying network cannot run payload encoding and decoding functions.
- Application ID: The application ID for which you configure the integration.
- Application API Key: The application API key that you generated before.
Note:
If you use The Things Network Stack V2 integration for AWS IoT, you must change the Thing Type Name to something other thanlorawan
to avoid conflicts.

Check I acknowledge that AWS CloudFormation might create IAM resources.
Click Create stack.
Note:
Creating all resources can take up to five minutes. ☕When the deployment is done, you’ll see the status CREATE_COMPLETE
.
Congratulations! 🎉 You have now set up the AWS IoT integration for The Things Stack!