Getting Started Concepts The Things Stack Cloud The Things Stack Enterprise Integrations API Hardware
Get The Things Stack

Concepts

    Overview
  • Architecture
  • Features
  • Networking
  • Migrate to The Things Stack
    • Export End Device Data
      • Export Devices from The Things Stack
      • Export End Devices from ChirpStack v3
      • Export End Devices from ChirpStack v4
      • Export End Devices from Wanesy
      • Export End Devices from Firefly
      • Export End Devices from AWS IoT
      • Troubleshooting
    • Migrating Gateways
    • Between The Things Stack distributions
    • Frequently Asked Questions
  • Packet Broker
  • Server Addresses
  • Advanced Topics
  • Troubleshooting
  • The Things Stack Sandbox
New in v0.13.0

Export End Devices from AWS IoT

This section contains instructions on how to configure migration tool and use it to export end devices from AWS IoT, that can later be imported in The Things Stack.

Before you begin

  • You need to setup the Shared AWS Configuration (~/.aws/config) file to able to connect to AWS. To setup this configuration file please check out the AWS SDK documentation
Note:
AWS IoT does not provide a way to export session information. Therefore OTAA devices needs to rejoin after the import. For ABP devices is not possible to import the session counters (FCntUp and FCntDown). For more details please check the AWS IoT API documentation

Configuration

Configure with environment variables, or command-line arguments.

See ttn-lw-migrate awsiot device --help for more details.

The following example shows how to set options via environment variables. These are example values. Please use actual ones based on your case.

$ export APP_ID="my-app"                    # Application ID for the exported devices
$ export FREQUENCY_PLAN_ID="EU_863_870"     # Frequency Plan ID for the exported devices

The above settings are common for all the following export methods.

  • The export process will halt if any error occurs.
  • Execute commands with the --dry-run flag to verify whether the outcome will be as expected.

Export Devices

  • Single device
  • Multiple devices

To export a single device using its Device ID (e.g. f198fd57-e52d-49fd-bcec-5b5494748469):

# dry run first, verify that no errors occur
$ ttn-lw-migrate awsiot device 'f198fd57-e52d-49fd-bcec-5b5494748469' --dry-run --verbose > devices.json
# export device
$ ttn-lw-migrate awsiot device 'f198fd57-e52d-49fd-bcec-5b5494748469' > devices.json

In order to export a large number of devices, create a file named device_ids.txt with one device ID per line:

f198fd57-e52d-49fd-bcec-5b5494748469
3b4c29ea-6c2f-4d2a-a2b4-494a6c0fc33b
393306e1-73f8-42c5-b593-21eb64a3bf0b
bed4284c-ebaf-4a34-970b-2ff1d0008daf
c5b08612-af8b-41cf-80fa-da3d861ed81c

And then export with:

# dry run first, verify that no errors occur
$ ttn-lw-migrate awsiot device --dry-run --verbose < device_ids.txt > devices.json
# export devices
$ ttn-lw-migrate awsiot device < device_ids.txt > devices.json

After exporting, devices can be imported in The Things Stack. See add end devices in bulk in The Things Stack for details about importing devices.

← Export End Devices from Firefly Troubleshooting →

On this page

Sections

Getting Started

Concepts

The Things Stack Cloud

The Things Stack Enterprise

Integrations

API

Hardware

Sitemap

View our Sitemap

Contributing

GitHub

About Us

The Things Industries