In this document, we will look at how we can configure AWS to get Memory Stats from your Windows instance. This document covers how to do it using AWS SSM Agent (must be installed if not using standard Windows AMI.)
This article will be covering the following:
- Configure JSON File
- Roles Creation
- Assigning Roles
- Deploying JSON File
- AWS SSM Agent Installed - Install SSM Agent
- Amazon EC2 Role for Simple Systems Manager
Configure JSON File
Step 1: Download the JSON file attached at the bottom of this article.
Step 2: Modify the JSON file to match your settings.
You will need to modify the following fields:
|"AccessKey": "",||Enter your Access Key|
|"SecretKey": ""||Enter your Secret Key|
|"Region": "",||You must enter the region you want the data to be uploaded to for CloudWatch|
Step 1: Login to your AWS Console and go to your EC2 Instance you would like to Enable CloudWatch on.
Step 2: Right click on your Instance, Select Instance Settings, Click on Attach/Replace IAM Role.
Step 3: Click Create new IAM role
This step is only required once after that the same role can be applied to all your instances.
Step 4: A new window will open so you can create your new IAM role. Once the page load click on Create new role.
Step 5: Select Amazon EC2 Role for Simple Systems Manager
On the new screen, you should see this.Once you are on that page click on Next Step
Step 6: Now you need to create a new name for the role. In my example, I called it CloudWatch_Turbonomic. You can call it anything you like.
Now you can click on Create role
Now you should see your new role created
Step 1: Now we need to attach this role to the VM we want. Go back to the other page where we can attach the role and click refresh.
Then from the drop-down menu, you should see the new role. Select the role and then click Apply.
Now you should see the Role attached to the VM.
Step 1: On the left-hand side menu select Run Command under System Manager Services
Step 2: Select AWS-ConfigureCloudWatch from the list
Now select the instance you would like to deploy CloudWatch on.
In the properties, section paste your JSON config data and then select Run
At the end, you should see if it's deployed successfully
Now after few minutes you will be able to see stats in your CloudWatch page and Turbonomic will be able to import the Used Memory.
Note: This method refers to using the Run Command to enable CloudWatch metrics via the SSM agent as described here in the AWS documentation AWS Documentation
- Eva Tuczai