AWS Systems Manager 建立 Activations
使用PowerShell
[System.Net.ServicePointManager]::SecurityProtocol = 'TLS12'
$code = "activation-code"
$id = "activation-id"
$region = "us-east-1"
$dir = $env:TEMP + "\ssm"
New-Item -ItemType directory -Path $dir -Force
cd $dir
(New-Object System.Net.WebClient).DownloadFile("https://amazon-ssm-$region.s3.$region.amazonaws.com/latest/windows_amd64/ssm-setup-cli.exe", $dir + "\ssm-setup-cli.exe")
./ssm-setup-cli.exe -register -activation-code="$code" -activation-id="$id" -region="$region"
Get-Content ($env:ProgramData + "\Amazon\SSM\InstanceData\registration")
Get-Service -Name "AmazonSSMAgent"
嘗試取消註冊並重新註冊受管節點
aws 網頁介面到 Manager Fleet Manager 針對該 Node 取消註冊
清除資訊再重新註冊
以 Debian 嘗試
mkdir /tmp/ssm
curl https://amazon-ssm-us-east-1.s3.us-east-1.amazonaws.com/latest/debian_amd64/ssm-setup-cli -o /tmp/ssm/ssm-setup-cli
sudo chmod +x /tmp/ssm/ssm-setup-cli
sudo /tmp/ssm/ssm-setup-cli -register -activation-code "activation-code" -activation-id "activation-id" -region "region"
參考
Windows:
https://docs.aws.amazon.com/zh_tw/systems-manager/latest/userguide/sysman-install-managed-win.html
Linux:
https://docs.aws.amazon.com/zh_tw/systems-manager/latest/userguide/sysman-install-managed-linux.html