What is the MOST operationally efficient way to meet this new requirement?
Create an additional CloudWatch agent configuration file to capture the DHCP logs. Use the AWS Systems Manager Run Command to restart the CloudWatch agent on each EC2 instance with the append-config option to apply the additional configuration file.
Log in to each EC2 Instance with administrator rights. Create a PowerShell script to push the needed baseline log files and DHCP log files to CloudWatch.
Run the CloudWatch agent configuration file wizard on each EC2 instance. Verify that the baseline log files are included and add the DHCP log files during the wizard creation process.
Run the CloudWatch agent configuration file wizard on each EC2 instance and select the advanced detail level. This will capture the operating system log files.
Explanations:
Creating an additional CloudWatch agent configuration file and using AWS Systems Manager Run Command to restart the CloudWatch agent with the append-config option is the most operationally efficient solution. It allows centralized management and ensures that the changes are applied consistently across the 50 EC2 instances without needing manual intervention.
Logging into each EC2 instance and manually creating a PowerShell script to push the logs to CloudWatch is operationally inefficient and would require significant manual effort. This method also lacks centralized control and scalability.
Running the CloudWatch agent configuration wizard on each EC2 instance would require manual intervention on every instance. It’s time-consuming and not efficient, especially when scaling to a large number of instances.
Running the CloudWatch agent wizard with advanced detail levels captures operating system log files but doesn’t address the specific requirement to capture DHCP logs. This option doesn’t align with the goal of capturing the DHCP logs specifically.