What does 'ClientId' mean in the context of AWS IOT?

0

I have been working with AWS IoT for some time and I haven't had any major problems with it.

I want to set up 'Device Advisor'. I decided to start by setting up a simple connectivity test to one device. I'd like Device Advisor to simply check that the device is reachable.

As I go through the setup workflow I reach a place where it is asking me to input a ClientId. There are no examples or options, I'm just staring at an empty text box.

What does ClientId mean in this context? I do not understand what it wants.

  • To be perfectly honest, I don't really understand what Device Advisor is. I was asked to set it up because someone thought it was a necessary security measure. Is Device Advisor something you use with production devices or is it only for test devices?

3 Answers
1

Hi Frank. I would recommend Device Advisor as something to integrate into CI/CD for your device firmware pipeline:

Some videos:

So it's to test that your firmware is, and remains, compatible with AWS IoT Core, to minimize the risk of connection issues in the field. It can also be used to help with compliance if you want to get a device listed in the AWS Partner Device Catalog.

"Client ID" is just the MQTT client ID which, in many cases, is the same as the Thing name.

profile pictureAWS
EXPERT
Greg_B
answered 7 months ago
1

The 'ClientId' in AWS IoT refers to a unique identifier for a device or client that connects to the AWS IoT platform.

Specifically for Device Advisor, the ClientId is the unique ID you have assigned to the device you want to monitor. This ID typically corresponds to the 'thingName' you gave the device when registering it with AWS IoT.

Some key points about ClientId:

  • It must be unique for each device that connects to AWS IoT.

  • It can be any string value up to 128 characters. Typically it is alphanumeric, with underscores or dashes.

  • It is configured on the device side during setup of the AWS IoT SDK/agent.

  • The ClientId is used by AWS IoT to identify each specific device and manage connections/subscriptions.

So for your Device Advisor setup, you simply need to provide the ClientId/thingName of the specific device you want to monitor connectivity for. This ties that monitoring test to your device.

In this section of the documentation it states: " In these examples, ${iot:ClientId} is replaced by the ID of the client connected to the AWS IoT Core message broker when the policy is evaluated. "

Hope that helps

AWS
David C
answered 7 months ago
0

I appreciate the answers but I'm still not really getting it.

I am trying to set up the simplest test possible, with just a TLS connect check, to one device, for which I know the thing name. I run the test, and it fails. But I know that the device is connected.

Here is what I did: Create Test Suite Checked 'Custom test suite' Left protocol on MQTT 3.1.1, the default Moved "TLS Connect" into Test group 1 Checked 'Create new role' and left the role name as-is Under permissions, I checked 'Connect' and filled in the thing name of my device as the ClientId Then I pressed Create Test Suite Then I clicked on the Test Suite I just created and chose 'Run test suite' from Actions On the next screen, I left "Things" checked. I found the thing I'm interested in on the list, and checked the circle next to it. I left Test endpoint set to "Account-level endpoint" Then I clicked Run Test

A few minutes later I checked the test results and it said Failed.

I see a note that says "Copy and paste this endpoint to your test device". I don't understand what that note is asking me to do. My device already has firmware on it that contains the endpoint to my account.

What is the purpose of Device Advisor? I thought it was here so that I could continuously run tests on all of my devices in the field, but maybe I'm misunderstanding it. Is this function here solely so I can do one-off tests on single devices as they are being manufactured? Is "Device Defender" what I need to monitor my live devices?

Frank
answered 6 months ago
  • Hi Frank. No it's not for running tests on your devices in the field. It's for testing your device firmware. Tests you should run before release and deployment. A lab or bench test. Device Advisor has it's own special endpoint. The device under test needs to connect to that endpoint, not your regular IoT Core endpoint.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions