aws-greengrass/aws-greengrass-nucleus

Listen to components deployment finish/status event

Closed this issue · 4 comments

Hello. We need to listen to Greengrass components deployment finish event in our greengrass component.
Is it possible to get this event from nucleus for example using mqtt or SDK?
I've found only the shadow AWSManagedGreengrassV2Deployment, but this is not exactly what we need.
Thank you in advance

Hi, have you tried using the IPC API for subscribing to notifications about when a deployment is about to be executed and then another notification once the nucleus has done executing it?

https://docs.aws.amazon.com/greengrass/v2/developerguide/ipc-component-lifecycle.html#ipc-operation-subscribetocomponentupdates

This probably suits your need but if not, please let us know what additional capability you need

Thanks for your reply. This approach doesn't not seem exactly what we need. We are looking for an approach to track an event, namely the end of all components deployment, as we see in the shadow of AWSManagedGreengrassV2Deployment with the deployment status. Is it possible?
We are looking exactly for this event but from the nucleus side. Thanks image

Hi @VitaliiN771,

What are you hoping to do with this information? Your component should not care that a deployment is either executing or finished in general.

The subscribeToComponentUpdateEvents API will tell you when the deployment completes.

postUpdateEvent: An event that indicates that the nucleus updated a component.

If you only ever use deployments to the thing and not to a thing group, then you could subscribe to the MQTT topic for the name shadow change as well.

Ticket has not been updated in 7 days. I will close this ticket now since using the component update event is the right way to know that a deployment has been completed on the device side.

Please reopen if needed if you have a response to the previous answer.