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.