我一直在尝试更新我的 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 的。