AWS Certified Developer – Associate (DVA-C02) — Question 44
A developer has a legacy application that is hosted on-premises. Other applications hosted on AWS depend on the on-premises application for proper functioning. In case of any application errors, the developer wants to be able to use Amazon CloudWatch to monitor and troubleshoot all applications from one place.
How can the developer accomplish this?
Answer options
- A. Install an AWS SDK on the on-premises server to automatically send logs to CloudWatch.
- B. Download the CloudWatch agent to the on-premises server. Configure the agent to use IAM user credentials with permissions for CloudWatch.
- C. Upload log files from the on-premises server to Amazon S3 and have CloudWatch read the files.
- D. Upload log files from the on-premises server to an Amazon EC2 instance and have the instance forward the logs to CloudWatch.
Correct answer: B
Explanation
The correct answer is B because installing the CloudWatch agent on the on-premises server allows for direct monitoring and logging with appropriate IAM permissions. Option A lacks the necessary configuration for credentials, while C and D involve additional steps of transferring files, which is less efficient than direct integration with the CloudWatch agent.