Lab complete!
Now that you have completed this lab, make sure to update your Well-Architected review if you have implemented these changes in your workload.
Click here to access the Well-Architected Tool
Most applications require monitoring services that make up the workload to understand the workload state and performance. One way of collecting this data is through log files generated by the application and underlying services. Collecting and analyzing log files improves your security posture by creating a record of activity or audit trail in your workload, enabling you to detect and investigate potential threats.
Manually configuring logging on each instance is tedious and becomes difficult at scale. It increases your risk of human error and unintended access from accessing instances directly with a protocol like SSH. Manually processing the collected data is difficult to scale with large volumes of data.
Utilizing AWS services such as AWS Systems Manager, Amazon CloudWatch, Amazon Simple Storage Service (S3), Amazon Athena, and Amazon QuickSight, you can collect and store logs without having to directly access the instance, or accessing data directly. You minimize your threat surface area by removing SSH access on your instance and improve your threat detection by collecting valuable log data.
This lab illustrates the following Well-Architected Security Best Practices:
In the lab, you will deploy an EC2 instance with Apache and PHP installed. The web server will host a very simple website. You will configure a CloudWatch Agent on the instance via Amazon Systems Manager (SSM). This agent will collect log files from services running on the EC2 instance, such as Apache access and error logs, yum logs, SSH logs, and CloudWatch agent logs. These logs are exported from the EC2 instance to the CloudWatch logs service for centralized storage. You will export these logs to an S3 bucket for long term storage and archival. These logs will then be queried via Athena, so people are kept away from accessing the log files directly. This data will be visually represented in a QuickSight dashboard.
Now that you have completed this lab, make sure to update your Well-Architected review if you have implemented these changes in your workload.
Click here to access the Well-Architected Tool