- Newest
- Most votes
- Most comments
Thank you for bringing this issue to our attention. Based on the information provided, it appears that you're experiencing difficulty with AWS IoT Commands when using a Client ID as the target device instead of a Thing name.
First, it's important to note that AWS IoT Core does support using both Thing names and Client IDs as target devices for commands. The ability to use Client IDs is specifically designed for cases where devices haven't been registered as Things in AWS IoT.
However, the behavior you're describing - where commands are visible when using Thing names but not when using Client IDs - is unexpected and doesn't align with the intended functionality of AWS IoT Commands.
To troubleshoot this issue, I would suggest the following steps:
-
Double-check that you're using the correct Client ID when sending the command. The Client ID used must match exactly with the MQTT client ID of your device.
-
Verify that your device is successfully connected to AWS IoT Core using the Client ID you're targeting.
-
Ensure that the IAM policies and AWS IoT policies associated with your device or user have the necessary permissions to receive commands using Client IDs.
-
Check if there are any error messages or logs in the AWS IoT console or CloudWatch that might provide more information about why the commands aren't being delivered when using Client IDs.
-
Try using the AWS CLI or SDK to send commands and see if you get any error messages that aren't visible in the MQTT test client.
-
Based on the guide provided: "If your device hasn't been registered as a thing with AWS IoT, you can use the client ID instead. The client ID is a unique identifier that you assign to your device or client. The client ID is defined in the MQTT protocol, and it can contain alphanumeric characters, underscores, or dashes. It must be unique to each device that connects to AWS IoT." Make sure to follow the format: "$aws/commands/<devices>/<DeviceID>/executions/+/request/<PayloadFormat>"
Sources
Commands concepts and status - AWS IoT Core
AWS IoT Device Management commands - AWS IoT Core
answered 2 years ago
Relevant content
asked 2 years ago
asked 5 years ago
- AWS OFFICIALUpdated 3 years ago
