AWS systems-manager documentation change
Summary
Added activation code reuse note, restructured commands with temp directory and -NoNewWindow parameter.
Security assessment
The documentation now includes checking activation limits to prevent exceeding allowed registrations, which is a security best practice. Command changes improve execution flow but lack explicit security context.
Diff
diff --git a/systems-manager/latest/userguide/hybrid-multicloud-ssm-agent-install-windows.md b/systems-manager/latest/userguide/hybrid-multicloud-ssm-agent-install-windows.md index 7df356a9a..549cb4307 100644 --- a//systems-manager/latest/userguide/hybrid-multicloud-ssm-agent-install-windows.md +++ b//systems-manager/latest/userguide/hybrid-multicloud-ssm-agent-install-windows.md @@ -150 +150 @@ To remove the remaining registration information for the agent, remove the `Iden -###### To reregister a managed node on a Windows Server hybrid machine +###### Note @@ -152 +152,3 @@ To remove the remaining registration information for the agent, remove the `Iden -You can reregister a machine after you deregister it. However, you must use a different Activation Code and Activation ID than were used previously to register the machine. +You can reregister an on-premises server, edge device, or VM using the same activation code and ID as long as you haven't reached the instance limit for the designated activation code and ID. You can verify the instance limit for an activation code and ID by calling the [describe-activations](https://docs.aws.amazon.com/cli/latest/reference/ssm/describe-activations.html) API using the AWS CLI. After you run the command, verify that the value of `RegistrationCount` doesn't exceed `RegistrationLimit`. If it does, you must use a different activation code and ID. + +###### To reregister a managed node on a Windows Server hybrid machine @@ -156 +158 @@ You can reregister a machine after you deregister it. However, you must use a di - 2. Run the following command. Be sure to replace the placeholder values with the Activation Code and Activation ID generated when you create a hybrid activation, and with the identifier of the Region you want to download the SSM Agent from. + 2. Run the following command. Be sure to replace the placeholder values with the Activation Code and Activation ID generated when you created a hybrid activation, and with the identifier of the Region you want to download the SSM Agent from. @@ -158,3 +160,8 @@ You can reregister a machine after you deregister it. However, you must use a di - 'yes' | & Start-Process ./ssm-setup-cli.exe -ArgumentList @("-register", "-activation-code=$code", "-activation-id=$id", "-region=$region") -Wait - Get-Content ($env:ProgramData + "\Amazon\SSM\InstanceData\registration") - Get-Service -Name "AmazonSSMAgent" + $dir = $env:TEMP + "\ssm" + cd $dir + Start-Process ./ssm-setup-cli.exe -ArgumentList @( + "-register", + "-activation-code=$code", + "-activation-id=$id", + "-region=$region" + ) -Wait -NoNewWindow