ResourceNotFoundException for IoT.listThingGroups call

0

using the following code, I keep getting a "ResourceNotFoundException":

const config = { endpoint: 'XXXXXXXXXX.iot.ca-central-1.amazonaws.com', region: "ca-central-1" };
const iot = new AWS.Iot(config);

iot.listThingGroups((err, data) => {
if (err) {
reject(err); // always a ResourceNotFoundException
} else {
console.log(data);
resolve();
}
});

I have confirmed that I do indeed have a Thing Group setup in AWS IoT, and I am executing this within the sam local lambda function environment so all the credentials should all be in place.

已提問 3 年前檢視次數 320 次
1 個回答
0

Ok... if I leave the "endpoint" parameter out and only keep the region, then things work just fine...

已回答 3 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南