- Newest
- Most votes
- Most comments
I'm looking at this same problem right now. Specifically, how to design a component to update the streams for Stream Manager. I'm thinking of having a special purposes updater component that listens to MQTT messages that contains an updated configuration with an id of the stream. Otherwise, a component would need to be stateful in some way. Alternatively, maybe something similar to the database migration concept used in MS Entity Framework (or others) could allow a run-once regardless of component restarts. This could itself use a permanent persisted stream in stream manager to track the execution of functions within the component itself. The greengrass recipe's Install step is a close a solution, but misses the mark because it re-executes after greengrass launches and I don't know if the proper security (if needed) is applied to scripts that run outside of the Run step.
Edited by: DarrenB on Mar 24, 2021 11:01 AM
Hi jjvic,
You are correct about the two options to achieve your use case:
- You can define the script in the lifecycle steps in a component, and you can add a logic around it to make sure it's only executed once if required. You can then add this component to a deployment targeting a thing (one device) or a thing group (list of devices). You may need to remove the component in later deployments.
- You can create a component which listens on IoT job notifications with IoT device SDKs https://docs.aws.amazon.com/iot/latest/developerguide/iot-sdks.html. The component can process arbitrary scripts from the deployment. This solution seems more extensible for future use as well.
Thanks,
Hui
Relevant content
- Accepted Answerasked 3 years ago
- Accepted Answer
- asked a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago