![我一直在尝试更新我的 SSM 代理。我正在运行命令 AWS updatessmagent](https://linux22.com/image/772107/%E6%88%91%E4%B8%80%E7%9B%B4%E5%9C%A8%E5%B0%9D%E8%AF%95%E6%9B%B4%E6%96%B0%E6%88%91%E7%9A%84%20SSM%20%E4%BB%A3%E7%90%86%E3%80%82%E6%88%91%E6%AD%A3%E5%9C%A8%E8%BF%90%E8%A1%8C%E5%91%BD%E4%BB%A4%20AWS%20updatessmagent.png)
我一直在尝试更新我的 SSM 代理。我正在运行命令 AWS updatessmagent。这就是我得到的结果。
PS C:\Windows\Temp> AWS-UpdateSSMAgent
AWS-UpdateSSMAgent : The term 'AWS-UpdateSSMAgent' is not recognized as the name of a cmdlet, function, script file,
or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and
try again.
At line:1 char:1
AWS-UpdateSSMAgent
~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (AWS-UpdateSSMAgent:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
有人可以帮忙吗?
答案1
根据AWS 文档对于 Windows,SSM 代理的手动更新是手动完成的。看起来 powershell 命令是
Invoke-WebRequest `
https://s3.amazonaws.com/ec2-downloads-windows/SSMAgent/latest/windows_amd64/AmazonSSMAgentSetup.exe `
-OutFile $env:USERPROFILE\Desktop\SSMAgent_latest.exe
Start-Process `
-FilePath $env:USERPROFILE\Desktop\SSMAgent_latest.exe `
-ArgumentList "/S"
rm -Force $env:USERPROFILE\Desktop\SSMAgent_latest.exe
您还可以设置自动 SSM 代理更新如这里所述。
我怀疑你运行的命令是针对 Linux 的。