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.

gefragt vor 3 Jahren320 Aufrufe
1 Antwort
0

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

beantwortet vor 3 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen