I use AWS IoT to manage Things. I have a Dynamic Thing Group with Continuous IoT Job attached, so every Thing eventually (based on conditions) can be added to this Group and a thing will be notified on a Job to be executed. This one works perfect.
Now I need to track Job SUCCEEDED
event for every Thing (Job execution). How can I do this using AWS IoT services?
I was trying to do this using AWS IoT Rules with the following SQL expression:
SELECT * FROM '$aws/events/jobExecution/my-continuous-job-id/succeeded'
but without success, no events were observed. However, at the same time I can see that Job was successfully executed as in Thing as in the AWS IoT Web Console.
After some research I found the answer. So to handle job execution events one should activate this feature in AWS IoT Core explicitly which is not obvious from the first glance:
AWS IoT -> Settings -> Manage Events -> Check "Job execution: success, failed, rejected, canceled, removed"
AWS CLI:
Docs: https://docs.aws.amazon.com/iot/latest/developerguide/iot-events.html