Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in AWS by (5.6k points)

I am using AWS IoT for real-time updating for my web application, applications connect to AWS IoT using SDK.

here is my piece of code:

const client = awsIot.device({

    region: awsConfig.region,

    protocol: 'wss',

    accessKeyId: <accessKey>,

    secretKey: <secretKey>,

    sessionToken: <sessionToken>,

    port: 443,

    host: <iotEndpoint>

});

client.on('connect', res => {

    // ok

});

How can I get an MQTT client id?

1 Answer

0 votes
by (12.4k points)

Here, the "ClientId" is the parameter you supply to the device() method. You should generate a "ClientId" for all the connected device that is unique to your application. You can read it here.

 Want to learn more about AWS? Come & join: AWS Course

Related questions

0 votes
1 answer

Want to get 50% Hike on your Salary?

Learn how we helped 50,000+ professionals like you !

0 votes
1 answer
0 votes
1 answer
asked May 12, 2020 in IoT by Sudhir_1997 (55.6k points)
0 votes
1 answer
asked Nov 8, 2020 in IoT by Sudhir_1997 (55.6k points)
0 votes
1 answer

Browse Categories

...