AWS Certified SysOps Administrator – Associate (legacy) — Question 745

A company is hosting a website on an Amazon EC2 instance that runs in a public subnet inside a VPC. The company uses Amazon CloudWatch Logs for web server log analysis.
A SysOps administrator has installed and configured the CloudWatch Logs agent on the EC2 instance and has confirmed that the agent is running. However, logs are not showing up in CloudWatch Logs.
Which solution will resolve this issue?

Answer options

Correct answer: B

Explanation

To successfully transmit logs to CloudWatch, the EC2 instance must have the correct IAM permissions configured via an instance profile. Providing these credentials resolves the authorization issue preventing the agent from sending log data. Modifying inbound port 80 rules in security groups or network ACLs will not resolve the issue, as log delivery relies on outbound HTTPS access.