Closed merlinmb closed 7 years ago
I confirmed they changed from 'region' into 'host' as the following logs
-// Replace the values of '<YourUniqueClientIdentifier>' and '<YourAWSRegion>'
-// with a unique client identifier and the AWS region you created your
-// certificate in (e.g. 'us-east-1'). NOTE: client identifiers must be
-// unique within your AWS account; if a client attempts to connect with a
-// client identifier which is already in use, the existing connection will
-// be terminated.
+// Replace the values of '<YourUniqueClientIdentifier>' and '<YourCustomEndpoint>'
+// with a unique client identifier and custom host endpoint provided in AWS IoT cloud
+// NOTE: client identifiers must be unique within your AWS account; if a client attempts
+// to connect with a client identifier which is already in use, the existing
+// connection will be terminated.
//
var thingShadows = awsIot.thingShadow({
keyPath: <YourPrivateKeyPath>,
certPath: <YourCertificatePath>,
caPath: <YourRootCACertificatePath>,
clientId: <YourUniqueClientIdentifier>,
- region: <YourAWSRegion>
+ host: <YourCustomEndpoint>
});
I have just updated the host parameter. If you test with any error. Please let me know.
Many thanks,
Thank you for a great module & the quick response!
Hi, it seems that the host is now required for a connection to AWS MQTT... I manually added host: with the fully qualified URL - this can be found in the start.sh example connection pack. My connection works after this.
Source: https://github.com/aws/aws-iot-device-sdk-js/blob/master/README.md#certificate-configuration
var awsIot = require('aws-iot-device-sdk');
var device = awsIot.device({ keyPath:,
certPath: ,
caPath: ,
clientId: ,
host:
});