AWS Certified SysOps Administrator – Associate — Question 249

A company has a policy that all Amazon EC2 instance logs must be published to Amazon CloudWatch Logs. A SysOps administrator is troubleshooting an EC2 instance that is running Amazon Linux 2. The EC2 instance is not publishing logs to CloudWatch Logs. The Amazon CloudWatch agent is running on the EC2 instance, and the agent configuration file is correct.

What should the SysOps administrator do to resolve the issue?

Answer options

Correct answer: D

Explanation

The correct answer is D because the IAM role must have the appropriate permissions to allow the EC2 instance to interact with CloudWatch Logs. If the role lacks these permissions, the logs cannot be published. Options A, B, and C do not address the core issue of permission settings required for log publishing.