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.

asked 3 years ago315 views
1 Answer
0

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

answered 3 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions