In this challenge, you will build a web server that is monitored for memory usage and internal server errors. First, you will create and secure a new Amazon Elastic Cloud Compute (Amazon EC2) instance that runs as a web server, and then you will connect to the instance by using EC2 Instance Connect. Next, you will configure the Amazon CloudWatch logs agent on the web server to monitor memory usage and HTTP access logs, and then you will use the custom memory metric to create a CloudWatch alarm that will trigger a restart of the instance. Finally, you will configure a log filter for internal server errors, and then you will create a CloudWatch alarm by using a custom log metric. Note: Once you begin the challenge lab, you will not be able to pause, save, or exit and then return to your challenge lab. Please ensure that you have set aside enough time to complete the challenge lab before you start.
Learning Objectives
In this challenge, you will build a web server that is monitored for memory usage and internal server errors. First, you will create and secure a new Amazon Elastic Cloud Compute (Amazon EC2) instance that runs as a web server, and then you will connect to the instance by using EC2 Instance Connect. Next, you will configure the Amazon CloudWatch logs agent on the web server to monitor memory usage and HTTP access logs, and then you will use the custom memory metric to create a CloudWatch alarm that will trigger a restart of the instance. Finally, you will configure a log filter for internal server errors, and then you will create a CloudWatch alarm by using a custom log metric. Note: Once you begin the challenge lab, you will not be able to pause, save, or exit and then return to your challenge lab. Please ensure that you have set aside enough time to complete the challenge lab before you start.