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
You will use Parameter Store, a tool in Systems Manager, to store the CloudWatch agent configuration. Parameter store allows you to securely store configuration data and secrets for reusability. You can re-use configuration data that is well controlled and consistent. In this case, you need to store the configuration file for CloudWatch Agent on your EC2 instance. The CloudWatch agent configuration data specifies which logs and metrics will be sent to CloudWatch as well as the source of this data.
AmazonCloudWatch-securitylab-cw-config
. You may use a different name, but it must begin with AmazonCloudWatch``-
in order to be recognized by CloudWatch as a valid configuration file.config.json
file found in the lab assets. This config file specifies which metrics and logs to collect.agent
section specifies which user to run the logs agent as, and how frequently to collect logs.logs
section specifies which log files to monitor and which log group and stream to place those logs in. This information can be seen in collect_list
. For this lab, you are collecting SSH logs, Apache Web Server logs, and logs for the CloudWatch Agent itself. We will examine these logs more closely in a later stepmetrics
section specifies which metrics are collected (in metrics_collected
), the frequency of collection, measurement, and other details.Recap: In this portion of the lab, you created a re-usable, centrally stored configuration file stored in Amazon Systems Manager Parameter Store. You can re-use configuration data stored in Parameter Store while ensuring that it is consistent and correct across uses. This becomes especially helpful when scaling, as you can re-use configuration files across fleets of instances. This highlights the Well-Architected best practice of “configuring services and resources centrally” by maintaining configuration files centrally in Parameter Store.
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