Last active
September 16, 2019 16:18
-
-
Save clarkmcc/1419e7825c1e06df54c8f4f59a2b39da to your computer and use it in GitHub Desktop.
AWS IoT Device - Connect over port 443
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Creates a new instance of the iot.device class that we can connect to and listen on | |
* @private | |
* @type {*} | |
* @memberof Device | |
*/ | |
private _device: any = iot.device({ | |
keyPath: __dirname + "device.private.key", | |
certPath: __dirname + "device.cert.pem", | |
caPath: __dirname + "root-CA.crt", // https://www.amazontrust.com/repository/AmazonRootCA1.pem | |
clientId: "device", | |
host: "xxxxx-ats.iot.xxxxx.amazonaws.com", | |
ALPNProtocols: ["x-amzn-mqtt-ca"], | |
port: 443, | |
debug: true | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment