AWS, Cloud Computing, Tutorials, Windows

2 Mins Read

CloudWatch Custom Metrics for Windows Server

It’s not rare that users having requirements of sending custom metrics to CloudWatch. These metrics can be application based or server based. There are different ways we can send these metrics to CloudWatch like writing a simple PowerShell script and scheduling it in Task Scheduler to run periodically. Alternate way to accomplish this, which I personally find very easy is by making simple changes in EC2ConfigService in your windows instance.


Let’s take an example that you want to send Free disk and Memory utilization metrics to CloudWatch.



1. RDP into your windows instance and from the Start menu, click All Programs, and then click EC2ConfigService Settings.
2. Enable CloudWatch Logs Integration and click OK.

3. Go to C:Program FilesAmazonEc2ConfigServiceSettingsAWS.EC2.Windows.CloudWatch.json and replace below code in the file.

Screenshot (7) 4. Go to Control PanelSystem and SecurityAdministrative ToolsSettings and restart EC2 Config service.

And It’s done. You can see metrics on CloudWatch in Custom Metric tab. If you are finding any issues in implementation, you can check C:Program FilesAmazonEc2ConfigServiceLogs Ec2ConfigLog file.

I have used same methodology for some of our clients and personally, I found this simpler in comparison to the other methods.

Feel free to comment if you have any issues in Implementing the same, I will be happy to assist you.

Need professional assistance or consulting services for your custom metrics implementation.? Kindly visit here Please share this blog if you like it.

Voiced by Amazon Polly


CloudThat is a leading provider of cloud training and consulting services, empowering individuals and organizations to leverage the full potential of cloud computing. With a commitment to delivering cutting-edge expertise, CloudThat equips professionals with the skills needed to thrive in the digital era.



  1. Ron Langham

    Sep 14, 2017


    Still having trouble getting this to work. Using EC2Config 3.18. I see the following warning in the Ec2ConfigLog.txt file, could this be related?

    2017-09-14T16:24:01.914Z: Warning: Unable to Publish to WMI. | System.Management.Instrumentation.WmiProviderInstallationException: Exception of type ‘System.Management.Instrumentation.WMIInfraException’ was thrown.
    at System.Management.Instrumentation.InstrumentationManager.Publish(Object value)
    at Ec2Config.LegacyConfiguration.LegacyConfigurator.PublishWmiInstance()

  2. Santosh

    Sep 8, 2017


    You have attached IAM role, still required to provide access and secret keys?

  3. Adnan

    Apr 27, 2017


    Actually above tutorial will not work on latest ec2service version. ec2config 4.x. version send data via SSM agent, if you have any idea than please guide me for that

    • Anderson

      Feb 7, 2018


      Was it possible to monitor?

    Click to Comment

Get The Most Out Of Us

Our support doesn't end here. We have monthly newsletters, study guides, practice questions, and more to assist you in upgrading your cloud career. Subscribe to get them all!