aws / aws-iot-device-sdk-js

SDK for connecting to AWS IoT from a device using JavaScript/Node.js
Apache License 2.0
965 stars 385 forks source link

Can jobs and thingShadow share the same connection to device? #392

Closed zhex900 closed 3 years ago

zhex900 commented 3 years ago

Hi,

Is it possible for jobs and thingShadow class to share the same connection with the device class?

For example,

var device = awsIot.device({
   keyPath: <YourPrivateKeyPath>,
  certPath: <YourCertificatePath>,
    caPath: <YourRootCACertificatePath>,
  clientId: <YourUniqueClientIdentifier>,
      host: <YourCustomEndpoint>
});

// this will create a new connection right?
// is it possible for jobs to use this same connection as device?
var jobs = awsIot.jobs({
   keyPath: <YourPrivateKeyPath>,
  certPath: <YourCertificatePath>,
    caPath: <YourRootCACertificatePath>,
  clientId: <YourUniqueClientIdentifier>,
      host: <YourCustomEndpoint>
});

Thank you

bretambrose commented 3 years ago

Each of those will be a separate device/connection, it looks like.

jmklix commented 3 years ago

@bretambrose is correct because you will have to use a different endpoint when connecting for IoT Jobs.

github-actions[bot] commented 3 years ago

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.