In this blog post , We have explained how to register Windows EC2 Instances with Systems Manager.
In order to Register Windows EC2 Instances with Systems Manager as Managed Instances , We need to execute two steps.
- Install SSM agent on Windows EC2 Instances – Check this tutorial to Install SSM agent on Windows EC2 Instances.
- Attach SSM Role with EC2 Instances
Creating IAM Role
First We need to create an IAM Role.
To create an IAM Role , Login to IAM Console.
Form the navigation pane , Choose Roles
Click Create role
Under Select type of trusted entity , Select AWS service and
For Choose a user case , Select EC2
Click Next: permissions
Under Attach permission policies , Search for EC2RoleforSSM and then check AmazonEC2RoleforSSM
Click Next: tags , You can add tags to the roles you create.
Click Next: Review , Provide a name for the IAM Role and then click Create role
Once the required role is created , We need to attach it with the existing EC2 Instances.
Attaching IAM Role with EC2 Instance
In the previous step , We have created an required IAM role , Now we need to attach it with the respective Windows EC2 Instances.
Login to EC2 Management Console , In the navigation pane , Choose Instances.
From the Lists of Instances , Select an EC2 Instance.
Under Actions , Instance Settings , Select Attach/Replace IAM Role
Choose the IAM Role which you have created and then click Apply
We have successfully executed the minimum requirements for the EC2 Instances to be registered under Systems manager as Managed Instances.
To verify the same , Login to Systems Manager Console.
In the navigation pane , Under Instances & Nodes
Select Managed Instances
The Instances should be listed here.
Going forward , The Systems Manager is able to manage Windows EC2 Instances and able to execute commands , Patch Windows Instances etc.
We have successfully registered Windows EC2 Instances with Systems Manager and we have verified the same.
Hope you find it helpful.
Don’t forget to check out my other blogs.