【小ネタ】 古い SSM エージェント Ver をインストールできるか確認してみた

【小ネタ】 古い SSM エージェント Ver をインストールできるか確認してみた

2025.09.02

はじめに

テクニカルサポートの 片方 です。
非常に古い SSM エージェント Ver をインストールできるか、検証する機会があったので紹介します。

先に結論から

明確な基準となるものはないものの、以前ご紹介した Run Command を使用した SSM エージェントのダウングレード方法よりも、古い SSM エージュント Ver に変更することが可能です。
また、Deprecated / Inactive (廃止/無効) に分類されていてもインストール可能でした。
詳細は以下ブログをご確認ください。

https://dev.classmethod.jp/articles/ssm-agent-runcommand-downgrade/

確認してみた

後ほどの手順を考慮して、serial-console でもアクセス可能な Amazon Linux 2023 をマネージドノードとして登録されるように起動させます。

a

それでは、SSM エージェントをアンインストールします。

sh-5.2$ sudo dnf remove -y amazon-ssm-agent
Dependencies resolved.
===================================================================================================================================================================================================================
 Package                                                Architecture                                 Version                                             Repository                                           Size
===================================================================================================================================================================================================================
Removing:
 amazon-ssm-agent                                       x86_64                                       3.3.2471.0-1                                        @@commandline                                       113 M

Transaction Summary
===================================================================================================================================================================================================================
Remove  1 Package

Freed space: 113 M
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                                                           1/1
  Running scriptlet: amazon-ssm-agent-3.3.2471.0-1.x86_64                                                                                                                                                      1/1
Removed "/etc/systemd/system/multi-user.target.wants/amazon-ssm-agent.service".

  Erasing          : amazon-ssm-agent-3.3.2471.0-1.x86_64                                                                                                                                                      1/1
  Running scriptlet: amazon-ssm-agent-3.3.2471.0-1.x86_64                                                                                                                                                      1/1
  Verifying        : amazon-ssm-agent-3.3.2471.0-1.x86_64                                                                                                                                                      1/1
===================================================================================================================================================================================================================
WARNING:
  A newer release of "Amazon Linux" is available.

  Available Versions:

  Version 2023.7.20250609:
    Run the following command to upgrade to 2023.7.20250609:

      dnf upgrade --releasever=2023.7.20250609

    Release notes:
     https://docs.aws.amazon.com/linux/al2023/release-notes/relnotes-2023.7.20250609.html

  Version 2023.7.20250623:
    Run the following command to upgrade to 2023.7.20250623:

      dnf upgrade --releasever=2023.7.20250623

    Release notes:
     https://docs.aws.amazon.com/linux/al2023/release-notes/relnotes-2023.7.20250623.html

  Version 2023.8.20250707:
    Run the following command to upgrade to 2023.8.20250707:

      dnf upgrade --releasever=2023.8.20250707

    Release notes:
     https://docs.aws.amazon.com/linux/al2023/release-notes/relnotes-2023.8.20250707.html

  Version 2023.8.20250715:
    Run the following command to upgrade to 2023.8.20250715:

      dnf upgrade --releasever=2023.8.20250715

    Release notes:
     https://docs.aws.amazon.com/linux/al2023/release-notes/relnotes-2023.8.20250715.html

  Version 2023.8.20250721:
    Run the following command to upgrade to 2023.8.20250721:

      dnf upgrade --releasever=2023.8.20250721

    Release notes:
     https://docs.aws.amazon.com/linux/al2023/release-notes/relnotes-2023.8.20250721.html

  Version 2023.8.20250808:
    Run the following command to upgrade to 2023.8.20250808:

      dnf upgrade --releasever=2023.8.20250808

    Release notes:
     https://docs.aws.amazon.com/linux/al2023/release-notes/relnotes-2023.8.20250808.html

  Version 2023.8.20250818:
    Run the following command to upgrade to 2023.8.20250818:

      dnf upgrade --releasever=2023.8.20250818

    Release notes:
     https://docs.aws.amazon.com/linux/al2023/release-notes/relnotes-2023.8.20250818.html

===================================================================================================================================================================================================================

Removed:
  amazon-ssm-agent-3.3.2471.0-1.x86_64

Complete!
sh-5.2$ rpm -qa | grep amazon-ssm-agent
sh-5.2$

アンマネージドノードになりました。
b

では、古い Ver (3.2.582.0) 指定して古い SSM エージェントをインストールします。

sudo dnf install -y https://s3.ap-northeast-1.amazonaws.com/amazon-ssm-ap-northeast-1/3.2.582.0/linux_amd64/amazon-ssm-agent.rpm

c

できました。
更にメジャー Ver を変更して、2.3.1644.0 で試しました。
もちろん、Deprecated / Inactive (廃止/無効)に分類されています。
結果、インストール可能でありマネージドノードとして問題なく起動できています。

d

更に..2016-05-02 リリースの 1.1.146.0 Ver で試してみました。
結果、 403 Forbidden エラーが発生しインストールは叶わなかったです。
こちらは、公開されていない古いバージョンを直接ダウンロードしようとしているのが原因であることが推察されます。

Last metadata expiration check: 0:51:15 ago on Fri Aug 29 03:27:57 2025.azonaws.com/amazon-ssm-ap-northeast-1/1.1.146.0/linux_amd64/amazon-ssm-agent.rpm
[MIRROR] amazon-ssm-agent.rpm: Status code: 403 for https://s3.ap-northeast-1.amazonaws.com/amazon-ssm-ap-northeast-1/1.1.146.0/linux_amd64/amazon-ssm-agent.rpm (IP: 3.5.157.192)
[MIRROR] amazon-ssm-agent.rpm: Status code: 403 for https://s3.ap-northeast-1.amazonaws.com/amazon-ssm-ap-northeast-1/1.1.146.0/linux_amd64/amazon-ssm-agent.rpm (IP: 3.5.157.192)
[MIRROR] amazon-ssm-agent.rpm: Status code: 403 for https://s3.ap-northeast-1.amazonaws.com/amazon-ssm-ap-northeast-1/1.1.146.0/linux_amd64/amazon-ssm-agent.rpm (IP: 3.5.157.192)
[MIRROR] amazon-ssm-agent.rpm: Status code: 403 for https://s3.ap-northeast-1.amazonaws.com/amazon-ssm-ap-northeast-1/1.1.146.0/linux_amd64/amazon-ssm-agent.rpm (IP: 3.5.157.192)
[FAILED] amazon-ssm-agent.rpm: Status code: 403 for https://s3.ap-northeast-1.amazonaws.com/amazon-ssm-ap-northeast-1/1.1.146.0/linux_amd64/amazon-ssm-agent.rpm (IP: 3.5.157.192)
Status code: 403 for https://s3.ap-northeast-1.amazonaws.com/amazon-ssm-ap-northeast-1/1.1.146.0/linux_amd64/amazon-ssm-agent.rpm (IP: 3.5.157.192)

まとめ

特別な要件が存在しない限り、AWS では最新版の SSM エージェント Ver 利用を推奨しています。
小ネタとして紹介しましたが、本ブログが誰かの参考になれば幸いです。

https://docs.aws.amazon.com/ja_jp/systems-manager/latest/userguide/troubleshooting-ssm-agent.html#ssm-agent-out-of-date

新しいツールが Systems Manager に追加されるか、既存のツールが更新されると必ず、更新されたバージョンの SSM Agent がリリースされます。最新バージョンのエージェントを使用しないと、マネージドノードが Systems Manager の各種ツールや機能を使用できなくなる可能性があります。このため、マシン上で SSM Agent を最新状態に維持するプロセスを自動化することをお勧めします。

参考資料

アノテーション株式会社について

アノテーション株式会社は、クラスメソッド社のグループ企業として「オペレーション・エクセレンス」を担える企業を目指してチャレンジを続けています。「らしく働く、らしく生きる」のスローガンを掲げ、様々な背景をもつ多様なメンバーが自由度の高い働き方を通してお客様へサービスを提供し続けてきました。現在当社では一緒に会社を盛り上げていただけるメンバーを募集中です。少しでもご興味あれば、アノテーション株式会社WEBサイトをご覧ください。

この記事をシェアする

facebookのロゴhatenaのロゴtwitterのロゴ

© Classmethod, Inc. All rights reserved.