AWS IoT Greengrass: How does the deployment Rollback function work? what kind of errors does it roll back?


In AWS IoT Greengrass, there is a Rollback option for deployments under "Deployment Policies". If I understood correctly it to rolls back devices to their previous configuration if the deployment fails. I wanted to test this so I purposely build a nonworking ECR docker image and deployed it through a greengrass component. (I basically introduced a python filenotfouderror by commanding to run a nonexistend python script in my Dockerfile.)

Before that, I had a working container running. What I would like to see is my device rolling back to running the old (working) container after realizing that the container failed. However, this doesn't happen. Only the device state changes to unhealthy in the AWS console.

Now my question: What kind of errors is this Rollback function able to detect/handle? and do you have any suggestions on how I could achieve my goal of rolling back the device if the docker cmd or any file therein shows an error?

Thanks a lot for you help!

1 Answer

Hi. Given that your device is unhealthy, it seems the rollback didn't occur or it failed. Please check the device deployment status (describe-job-execution) as described here (or look in the console):

And please check the Greengrass and component logs as described here:

profile picture
answered 9 days ago
  • thanks for your answer. I've been trying to replace one component of my deployment by a new different one (that shall fail). maybe the rollback only works between different versions of the same component?

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions