From the course: AWS Certified Data Engineer Associate (DEA-C01) Cert Prep

Unlock this course with a free trial

Join today to access over 24,700 courses taught by industry experts.

Hands-on learning: Create a custom metric

Hands-on learning: Create a custom metric

- [Narrator] In this lesson, I'm going to create a custom CloudWatch metric that monitors the memory utilization of an EC2 instance, and then we could create an alarm based on that metric in CloudWatch. In the course download, you'll find the amazon-cloudwatch directory and the custom-cloudwatch-metrics markdown file. Now as you can see, we're using a lot of CLI commands here, and we can run those using AWS CloudShell. The first one is going to create an IAM policy. For the most part, you can just copy and paste these CLI commands exactly as they are. This will create a policy called CloudWatch-Put-Metric-Data, and in the policy statement is going to allow the action CloudWatch:PutMetric. So copy the command, and let's head over to AWS. In the Management console, I've opened up AWS CloudShell and I'm going to run this command to create the policy. There we go. The policy has been created. The next command is going to create an IAM role that uses the policy document. We'll create the…

Contents