aws / amazon-ssm-agent

An agent to enable remote management of your EC2 instances, on-premises servers, or virtual machines (VMs).
https://aws.amazon.com/systems-manager/
Apache License 2.0
1.05k stars 324 forks source link

Snap Version Update for Ubuntu 24.04 #581

Open sino1641 opened 2 months ago

sino1641 commented 2 months ago

Hi Team, I am using the official Ubuntu 24.04 AMI with ssm agent 3.3.131.0 pre-installed with snap. But it comes with an error:

snap.amazon-ssm-agent.amazon-ssm-agent.service - Service for snap application amazon-ssm-agent.amazon-ssm-agent
     Loaded: loaded (/etc/systemd/system/snap.amazon-ssm-agent.amazon-ssm-agent.service; enabled; preset: enabled)
     Active: active (running) since   3min 39s ago
   Main PID: 1256 (amazon-ssm-agen)
      Tasks: 17 (limit: 4609)
     Memory: 21.3M (peak: 23.9M)
        CPU: 399ms
     CGroup: /system.slice/snap.amazon-ssm-agent.amazon-ssm-agent.service
             ├─1256 /snap/amazon-ssm-agent/7993/amazon-ssm-agent
             └─1278 /snap/amazon-ssm-agent/7993/ssm-agent-worker

amazon-ssm-agent.amazon-ssm-agent[1256]: INFO [EC2Identity] Checking disk for registration info
amazon-ssm-agent.amazon-ssm-agent[1256]: INFO [EC2Identity] No registration info found for ec2 instance, attempting registration
amazon-ssm-agent.amazon-ssm-agent[1256]: INFO [EC2Identity] Found registration keys
amazon-ssm-agent.amazon-ssm-agent[1256]: INFO [EC2Identity] Checking write access before registering
amazon-ssm-agent.amazon-ssm-agent[1256]: INFO [EC2Identity] Registering EC2 instance with Systems Manager
amazon-ssm-agent.amazon-ssm-agent[1256]: ERROR [Registrar] failed to register identity: error calling RegisterManagedInstance API: ValidationException: Feature not enabled
amazon-ssm-agent.amazon-ssm-agent[1256]:         status code: 400, request id: 
amazon-ssm-agent.amazon-ssm-agent[1256]: INFO [Registrar] sleeping for 2.533333333333333 minutes before retrying registration

I also tried updating to the candidate version 3.3.551.0 but with the same error.

After contacting AWS Support, they advised me to use deb installation 3.3.551.0-1 and everything works fine. Given the scenario, it seems an update on Snap is needed for seamless experience on Ubuntu 24.04 EC2 instances.

alanfwilliams commented 2 months ago

How did you do the deb installation? I'm struggling to get the agent to work.

sino1641 commented 2 months ago

How did you do the deb installation? I'm struggling to get the agent to work.

Hi, Please check this: https://docs.amazonaws.cn/en_us/systems-manager/latest/userguide/agent-install-deb.html#quick-install-debian

sino1641 commented 2 months ago

Also, is there any official support here? Or do we need to feedback on the official forum?