SSM Agent update problems


I'm having issues with SSM for the last 3 days with the RUN COMMAND on the AWS-UpdateSSMAgent document. It tries to upgrade to the latest version of amazon-ssm-agent but failed to do so. I tried to refresh the snap from 3.1.1188.0 but no updates available.. also tried to remove and reinstall the package but still get the 3.1.1188.0 version.

My Windows Server instance get updated but all the Ubuntu 20.04LTS and 22.04LTS have issues with that update. I know 22.04 is not fully supported by SSM but the ssm agent update document always worked prior to the last 3 days.

Anyone having similar issues?

Here's the log:

Successfully downloaded manifest
Successfully downloaded updater version 3.1.1446.0
Updating amazon-ssm-agent from 3.1.1188.0 to 3.1.1446.0
Successfully downloaded
Successfully downloaded
Initiating amazon-ssm-agent update to 3.1.1446.0
failed to install amazon-ssm-agent 3.1.1446.0, ErrorMessage=The execution of command returned Exit Status: 125
exit status 125
Initiating rollback amazon-ssm-agent to 3.1.1188.0
failed to install amazon-ssm-agent 3.1.1188.0, ErrorMessage=The execution of command returned Exit Status: 125
exit status 125
Failed to update amazon-ssm-agent to 3.1.1446.0
  • Same Issue Here. Cannot update to 3.1.1446.0 and rolls back. Rollback also fails.

已提问 2 年前1654 查看次数
2 回答


Thank you for reaching out to us, it appears that your issues is related to new version of snapd (new snapd version v2.55.5 released 10 days ago), AWS is aware of the issue in the interim. You can test the workaround below and revert your snapd to previous version:

To confirm is issue, check /var/lib/amazon/ssm/update/stderr

$sudo cat /var/lib/amazon/ssm/update/stderr
 error: cannot perform the following tasks:
   - Make current revision for snap "amazon-ssm-agent" unavailable (snap "amazon-ssm-agent" has running apps (amazon-ssm-agent))

To resolve,

$sudo snap revert snapd                                                         <--- Command used to revert snapd
2022-05-30T13:27:29Z INFO Waiting for automatic snapd restart...
snapd reverted to 2.54.4

After reverting back to snapd 2.54.4,

I was then able to successfully update my instance

snap list  <---- After 
Name              Version     Rev    Tracking          Publisher   Notes
amazon-ssm-agent  3.1.1476.0  5950   latest/candidate  aws✓        classic
core18            20220428    2409   latest/stable     canonical✓  base
snapd             2.54.4      15177  latest/stable     canonical✓  snapd

Once you downgraded the snapd daemon, please try to update instance again using RunCommand AWS-UpdateSSMAgent . Let me know if this helps

profile pictureAWS
已回答 2 年前

Hi! Good day!

What happens when you have a Quick Setup with an "Organizational" type configuration?

If the snapd version is reverted, the SSMUpdate association (Scan instances for missing patches daily) will update it again "snapd" and the workaround will stop working. Is there any other alternative?

How will AWS notify us when they have fixed this issue?

Best regards

已回答 2 年前

您未登录。 登录 发布回答。