Q23 — AWS DVA-C02 Ch.1
Question 23 of 100 | ← Chapter 1
A developer manages a legacy application hosted on-premises. Other applications hosted on AWS depend on this on-premises application to operate correctly. If any application errors occur, the developer wants to use Amazon CloudWatch to monitor all applications centrally and troubleshoot issues. How can the developer achieve this goal?
- A. Install the AWS SDK on the on-premises server to automatically send logs to CloudWatch.
- B. Download and install the CloudWatch agent on the on-premises server. Configure the agent with IAM user credentials that have CloudWatch permissions. ✓
- C. Upload log files from the on-premises server to Amazon S3 and configure CloudWatch to read those files.
- D. Upload log files from the on-premises server to an Amazon EC2 instance and configure that instance to forward logs to CloudWatch.
Correct Answer: B. Download and install the CloudWatch agent on the on-premises server. Configure the agent with IAM user credentials that have CloudWatch permissions.
Explanation
Option B is correct: the CloudWatch agent is purpose-built to collect and push logs and metrics from on-premises servers directly to CloudWatch. It supports secure credential handling via IAM roles or users and requires no intermediate storage (unlike options C and D) or unsupported SDK-based log shipping (option A). This provides centralized, real-time monitoring with minimal operational overhead and aligns with AWS best practices.