Provision Sidewalk devices in bulk
This section shows how you can provision Sidewalk devices in bulk to Amazon IoT Core for Amazon Sidewalk using the Amazon IoT console and the Amazon CLI.
Provision Sidewalk devices in bulk (console)
To add your Sidewalk device using the Amazon IoT console, go to the Sidewalk
tab of the Devices hub
-
Choose import method
Specify how you want to import the devices to be onboarded in bulk to Amazon IoT Core for Amazon Sidewalk.
-
To provision individual devices using their SMSN, choose Provision individual factory supported device.
-
To provision devices in bulk by providing a CSV file that contains a list of devices and their SMS, choose Use S3 bucket.
-
-
Specify devices to be onboarded
Depending on the method that you chose to onboard your devices, add the device information and their serial numbers.
-
If you chose Provision individual factory supported device, specify the following information:
-
A Name for each device to be onboarded. The name must be unique in your Amazon Web Services account and Amazon Web Services Region.
-
Their Sidewalk manufacturing serial number (SMSN) in the Enter SMSN field.
-
A Destination that describes the IoT rule to route messages from the device to other Amazon Web Services.
-
-
If you chose Use S3 bucket:
-
Provide the S3 Bucket destination information, which consists of the S3 URL information. To provide your CSV file, choose Browse S3, and then choose the CSV file you want to use.
Amazon IoT Core for Amazon Sidewalk automatically populates the S3 URL, which is the path to your CSV file in the S3 bucket. The format of the path is
s3://
. To view the file in the Amazon Simple Storage Servicebucket_name
/file_name
console, choose View. -
Provide the S3 Provisioning role, which allows Amazon IoT Core for Amazon Sidewalk to access the CSV file in the S3 bucket on your behalf. You can either create a new service role or choose an existing role.
To create a new role, you can either provide a Role name or leave it blank to generate a random name automatically.
-
Provide a Destination that describes the IoT rule to route messages from the device to other Amazon Web Servicess.
-
-
-
Start import task
Provide any optional tags as name-value pairs and choose Submit to start your wireless device import task.
Provision Sidewalk devices in bulk (CLI)
To onboard your Sidewalk devices to your account for Amazon IoT Core for Amazon Sidewalk, use any of the following API operations depending on whether you want to add devices individually or by providing the CSV file contained in an S3 bucket.
-
Upload devices in bulk using an S3 CSV file
To upload devices in bulk by providing the CSV file in an S3 bucket, use the
StartWirelessDeviceImportTask
API operation, or thestart-wireless-device-import-task
Amazon CLI command. When creating the task, specify the path to the CSV file in the Amazon S3 bucket and the IAM role that grants Amazon IoT Core for Amazon Sidewalk permissions to access the CSV file.Once the task starts to run, Amazon IoT Core for Amazon Sidewalk will start reading the CSV file and compare the serial numbers (SMSN) in the file with the corresponding information in the control log received from Amazon Sidewalk. When the serial numbers match, it will start creating wireless device records corresponding to these serial numbers.
The following command shows an example of creating an import task:
aws iotwireless start-wireless-device-import-task \ --cli-input-json "
file://task.json
"The following shows the contents of the file
task.json
.Contents of task.json
{ "DestinationName":
"Sidewalk_Destination"
, "Sidewalk": { "DeviceCreationFile": "s3://import_task_bucket
/import_file1
", "Role": "arn:aws:iam::123456789012
:role/service-role
/ACF1zBEI
" } }Running this command returns an ID and ARN for the import task.
{ "Arn": "arn:aws:iotwireless:
us-east-1
:123456789012
:ImportTask/a1b234c5-67ef-21a2-a1b2-3cd4e5f6789a
" "Id":"a1b234c5-67ef-21a2-a1b2-3cd4e5f6789a"
} -
Provision devices individually using their SMSN
To provision devices individually using their SMSN, use the
StartSingleWirelessDeviceImportTask
API operation, or thestart-single-wireless-device-import-task
Amazon CLI command. When creating the task, specify the Sidewalk destination and the serial number of the device that you want to onboard.When the serial number matches the corresponding information in the control log received from Amazon Sidewalk, the task will run and create the wireless device record.
The following command shows an example of creating an import task:
aws iotwireless start-single-wireless-device-import-task \ --destination-name
sidewalk_destination
\ --sidewalk '{"SidewalkManufacturingSn":"82B83C8B35E856F43CE9C3D59B418CC96B996071016DB1C3BE5901F0F3071A4A"
}'Running this command returns an ID and ARN for the import task.
{ "Arn": "arn:aws:iotwireless:
us-east-1
:123456789012
:ImportTask/e2a5995e-743b-41f2-a1e4-3ca6a5c5249f
" "Id":"e2a5995e-743b-41f2-a1e4-3ca6a5c5249f"
}
Update or delete import tasks
If you want to add additional devices to an import task, you can update the task. You can also delete a task if you no longer require the task or if it failed. For information about when to update or delete a task, see How to use Sidewalk bulk provisioning.
Warning
Deletion actions are permanent and can't be undone. Deleting an import task that has already completed successfully will not remove the end devices that have already been onboarded using the task.
To update or delete import tasks:
-
Using the Amazon IoT console
The following steps explain how to update or delete your import tasks using the Amazon IoT console.
To update an import task:
-
Go to the Sidewalk devices hub
of the Amazon IoT console. -
Choose the import task that you want to update and then choose Edit.
-
Provide another S3 file that contains the serial numbers of devices that you want to add to the task and then choose Submit.
To delete an import task:
-
Go to the Sidewalk devices hub
of the Amazon IoT console. -
Choose the task that you want to delete and then choose Delete.
-
-
Using the Amazon IoT Wireless API or Amazon CLI
Use the following Amazon IoT Wireless API operations or CLI commands to update or delete your import task.
-
UpdateWirelessDeviceImportTask
API orupdate-wireless-device-import-task
CLIThis API operation appends the contents of an Amazon S3 CSV file to an existing import task. You can only add serial numbers of devices that were not previously included in the task. For more information, see Add devices to import task.
-
DeleteWirelessDeviceImportTask
API ordelete-wireless-device-import-task
CLIThis API operation deletes the import task that was marked for deletion using the import task ID. For more information, see Delete import tasks from your Amazon Web Services account.
-