Managing on-premise Windows servers can often be daunting, especially when dealing with security, patch management, and remote accessibility. AWS Systems Manager (SSM) offers a robust solution by providing centralized control over your hybrid environment, enabling you to seamlessly manage both EC2 instances and on-premise servers. In this guide, we’ll walk you through how to set up AWS Systems Manager to manage on-premise Windows servers, from hybrid activation to remote management.

Introduction to AWS Systems Manager for Hybrid Environments

AWS Systems Manager is a versatile tool simplifies infrastructure management across cloud and on-premise environments. With SSM, administrators can perform tasks like patch management, inventory collection, and even secure remote access to servers. One of its key advantages is that it can extend beyond AWS EC2 instances to on-premise machines, creating a unified management experience for hybrid infrastructures.

Whether your Windows servers are running in your data center or on AWS, Systems Manager allows you to automate many management tasks, enhancing security and efficiency. By leveraging Systems Manager’s hybrid capabilities, you can bring the power of AWS’s automation tools to your on-premise servers.

Setting Up Hybrid Activation for Non-EC2 Machines

With AWS Systems Manager, you must create a hybrid activation to manage on-premise servers. This enables your on-premise Windows servers to communicate securely with AWS Systems Manager like EC2 instances.

  1. Create a Hybrid Activation: This process allows non-EC2 machines to be treated as managed instances.
  2. Register On-Premise Servers: Once activated, your Windows servers will appear in the Systems Manager console alongside your EC2 instances.

Hybrid activations are a powerful feature that enables non-EC2 machines to be included in your AWS-managed infrastructure without requiring significant changes to your existing setup.

Configuring IAM Roles for Secure Communication

To ensure secure communication between your on-premise Windows servers and AWS, you must configure IAM roles that grant the Systems Manager the necessary permissions. These roles allow the Systems Manager to execute commands and securely retrieve data from your servers.

  • Create an IAM Role: Use the AWS Management Console or CLI to create an IAM role with the necessary policies attached. Ensure the role includes permissions for the Systems Manager (AmazonSSMManagedInstanceCore policy).
  • Attach the Role: Ensure this IAM role is associated with the hybrid activation and is used by the SSM agent installed on your Windows servers.

This configuration ensures that only authorized communication occurs between your on-premise servers and AWS, following best practices for cloud security.

Creating a Hybrid Activation Using AWS CLI

You can create a hybrid activation using the AWS CLI for more control and automation. Here’s how to do it:

aws ssm create-activation \

  –default-instance-name “OnPremiseWindowsServer” \

  –iam-role “SSMRoleForOnPremiseServers” \

  –registration-limit 10 \

  –region us-east-1

  • Default Instance Name: The name assigned to your on-premise server in Systems Manager.
  • IAM Role: This role is used for secure communication.
  • Registration Limit: Defines how many servers you can register with this activation.

After running this command, AWS will generate an activation code and ID, which you’ll use when registering your Windows servers.

Installing SSM Agent on Windows Servers

The SSM agent must be installed and running for Systems Manager to manage your on-premise Windows servers. You can install the SSM agent manually or automate the installation via group policy or scripts.

  1. Download the SSM Agent from the official AWS page.
  2. Install the Agent: Run the installer on each Windows server you want to manage through Systems Manager.
  3. Register the Server: Use the activation code and ID from the previous step to register the server:

cd “C:\Program Files\Amazon\SSM”

.\amazon-ssm-agent.exe -register -code “<activation-code>” -id “<activation-id>” -region “us-east-1”

This command will register the server with AWS Systems Manager, enabling remote management and monitoring.

Remote Management with AWS Systems Manager Session Manager

One of the most powerful features of AWS Systems Manager is Session Manager, which provides secure, browser-based shell access to your managed instances without needing to open inbound ports, use bastion hosts or manage SSH keys.

  1. Access Windows Servers: You can initiate remote sessions directly from the Systems Manager console or using the AWS CLI.
    aws ssm start-session –target “Instance-ID”
  2. Perform Administrative Tasks: Once connected, you can perform tasks like installing software, running PowerShell commands, or troubleshooting issues, all securely managed through AWS.

With Session Manager, you avoid the risks associated with traditional remote access methods, making it an ideal solution for security-conscious environments.

Conclusion

AWS Systems Manager offers an efficient way to manage your on-premise Windows servers alongside your AWS EC2 instances. You can streamline your infrastructure management, improve security, and reduce administrative overhead by setting up hybrid activations, configuring IAM roles, and utilizing tools like the SSM Agent and Session Manager.

Whether you manage a hybrid environment or want to enhance your on-premise server management, AWS Systems Manager provides the tools and automation necessary for modern infrastructure management.

References

Managing servers in hybrid and multi-cloud environments with the Systems Manager

Simplifying Hybrid Cloud Management Using AWS Systems Manager Run Command