0
在下面的代码中,iot.listCertificates执行完美,我能够在AWS IOT控制台中看到所有证书,但是当我尝试执行命令iot.createKeysAndCertificate时,它会给我提供NETWORK FAILURE ERROR。AWS IOT createKeysAndCertificate给出网络失败错误
请帮我这个, 谢谢!
var params = {};
iot.listCertificates(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
alert("Attempting to create new thing!!");
params = {
setAsActive:false
};
iot.createKeysAndCertificate(params, function(err, data) {
if (err)
alert(err);
else
alert("New thing added to AWS IOT");
});