title: How to get AWS IOT client id?
body: <p>I use AWS IoT for real-time update in my web application.
  The application connects to AWS IoT using <a href="https://github.com/aws/aws-iot-device-sdk-js" rel="noreferrer">aws-iot-device-sdk</a>:</p>
  
  <pre><code>const client = awsIot.device({
      region: awsConfig.region,
      protocol: 'wss',
      accessKeyId: &lt;accessKey&gt;,
      secretKey: &lt;secretKey&gt;,
      sessionToken: &lt;sessionToken&gt;,
      port: 443,
      host: &lt;iotEndpoint&gt;
  });
  
  client.on('connect', res =&gt; {
      // ok
  });
  </code></pre>
  
  <p>I want to use AWS <a href="http://docs.aws.amazon.com/iot/latest/developerguide/life-cycle-events.html" rel="noreferrer">Lifecycle Events</a>. For example:</p>
  
  <pre><code>$aws/events/presence/connected/{clientId}
  </code></pre>
  
  <p>How to get MQTT client id?</p>