Time required: 2 Hours
This lab will be based off a scenario where you need to monitor your application using CloudWatch. You just deployed a new version of your application and now customers are complaining that they are experiencing 500 errors. You need to be sure that when this problem starts to occur you can immediately alert the DevOps engineer who is on call. We are going to do this in 3 steps.
First, we want to install a CloudWatch Logs Agent on our instances and then stream web application logs to CloudWatch. Next, we need to create a CloudWatch Logs group and define metric filters that capture 500 Internal Server Errors and use a CloudWatch alarm on that metric. Finally, while creating the alarm we can use Amazon Simple Notification Service to notify the on-call engineer when a CloudWatch alarm is triggered.