Can I create Cloudwatch custom metrics with Java?

Question:

Is it possible to create AWS CloudWatch custom metrics using Java SDK provided by AWS?

The developer guide talks about publishing custom metrics through Command line tools.
Is it possible with the Java SDK? If yes, please provide the links or tutorials for that.

Answer:

The below code can be used to Publish Custom Metrics in AWS CloudWatch using JAVA.

Only thing to remember is to include aws-java-sdk-cloudwatch

Leave a Reply