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.

posta 3 anni fa320 visualizzazioni
1 Risposta
0

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

con risposta 3 anni fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande