Menu
AWS Systems Manager
User Guide

Installing and Configuring SSM Agent on Windows Instances

SSM Agent is installed by default on Windows Server 2016 instances and instances created from Windows Server 2003-2012 R2 AMIs published in November 2016 or later.

Windows AMIs published before November 2016 use the EC2Config service to process requests and configure instances.

Unless you have a specific reason for using the EC2Config service, or an earlier version of SSM Agent, to process Systems Manager requests, we recommend that you download and install the latest version of SSM Agent to each of your Amazon EC2 instances or hybrid instances that are configured for Systems Manager.

To view details about the different versions of SSM Agent, see the release notes.

Install and Configure SSM Agent on Windows Instances

If your instance is a Windows Server 2003-2012 R2 instance created before November 2016, then EC2Config processes Systems Manager requests on your instance. We recommend that you upgrade your existing instances to use the latest version of EC2Config. By upgrading, you install SSM Agent side-by-side with EC2Config. This version of SSM Agent is compatible with your instances created from earlier Windows AMIs and enables you to use SSM features published after November 2016.

You can automatically update SSM Agent on your instances when new versions become available by using Systems Manager State Manager. For more information, see Walkthrough: Automatically Update the SSM Agent.

Alternatively, you can manually download and install the latest version of SSM Agent using the following procedure.

To manually download and install the latest version of SSM Agent

  1. Login to your instance.

  2. Download the latest version of SSM Agent to your instance.

    https://s3.amazonaws.com/ec2-downloads-windows/SSMAgent/latest/windows_amd64/AmazonSSMAgentSetup.exe.

    This URL lets you download SSM Agent from any AWS region. If you want to download the agent from a specific region, use a region-specific URL instead:

    https://amazon-ssm-region.s3.amazonaws.com/latest/windows_amd64/AmazonSSMAgentSetup.exe

  3. Start or restart SSM Agent (AmazonSSMAgent.exe) using the Windows Services control panel or by sending the following command in PowerShell:

    Copy
    Restart-Service AmazonSSMAgent

Important

SSM Agent requires Windows PowerShell 3.0 or later to execute certain SSM Documents on Windows instances (for example, the AWS-ApplyPatchBaseline document). Verify that your Windows instances are running Windows Management Framework 3.0 or later. The framework includes PowerShell. For more information, see Windows Management Framework 3.0.

View SSM Agent Logs on Windows Instances

SSM Agent writes information about executions, scheduled actions, errors, and health statuses to log files on each instance. You can view log files by manually connecting to an instance, or you can automatically send logs to Amazon CloudWatch Logs. For more information about sending logs to CloudWatch, see Sending SSM Agent Log Files to Amazon CloudWatch Logs.

You can view SSM Agent log files on Windows instances in the following locations.

  • %PROGRAMDATA%\Amazon\SSM\Logs\amazon-ssm-agent.log

  • %PROGRAMDATA%\Amazon\SSM\Logs\errors.log

Configure SSM Agent to Use a Proxy for Windows Instances

For information about configuring EC2Config to use a proxy, see Configure Proxy Settings for the EC2Config Service.

To configure SSM Agent to use a proxy

  1. Using Remote Desktop or Windows PowerShell, connect to the instance that you would like to configure to use a proxy. For Windows Server 2016 instances that use the Nano installation option (Nano Server), you must connect using PowerShell. For more information, see Connect to a Windows Server 2016 Nano Server Instance.

  2. Run the following command block in PowerShell. Replace hostname and port with the information about your proxy:

    Copy
    $serviceKey = "HKLM:\SYSTEM\CurrentControlSet\Services\AmazonSSMAgent" $keyInfo = (Get-Item -Path $serviceKey).GetValue("Environment") $proxyVariables = @("http_proxy=hostname:port", "no_proxy=169.254.169.254") If($keyInfo -eq $null) { New-ItemProperty -Path $serviceKey -Name Environment -Value $proxyVariables -PropertyType MultiString -Force } else { Set-ItemProperty -Path $serviceKey -Name Environment -Value $proxyVariables } Restart-Service AmazonSSMAgent

To reset SSM Agent proxy configuration

  1. Using Remote Desktop or Windows PowerShell, connect to the instance that you would like to configure.

  2. If you connected using Remote Desktop, then launch PowerShell as an administrator.

  3. Run the following command block in PowerShell:

    Copy
    Remove-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Services\AmazonSSMAgent -Name Environment Restart-Service AmazonSSMAgent