This is a trivial example that shows how to trigger Lambda functions when a message is posted to AWS IOT Topics. The lambda function just logs messages, so you can post a message to the topic and then check CloudWatch logs to see the execution result.
- grab the dependencies:
npm install - create the lambda function:
npm run create - set up a IOT topic filter:
npm run subscribe - publish an event to the topic:
node post.js - list cloudwatch logs associated with your function:
npm run check-logs