nerdexam
Amazon

SOA-C02 · Question #442

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…

The correct answer is D. Ensure that the IAM role that is attached to the EC2 instance has permissions in CloudWatch. Amazon EC2 instances need the appropriate permissions to interact with Amazon CloudWatch Logs. These permissions are granted through an IAM (Identity and Access Management) role attached to the EC2 instance.

Submitted by ahmad_uae· Mar 30, 2026Monitoring, Logging, and Remediation

Question

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?

Options

  • AConfigure the AWS CLI on the EC2 instance. Create a cron job that calls the PutLogEvents API
  • BInspect the retention period of the CloudWatch Logs log group. Ensure that the retention period is
  • CSet up an Amazon Kinesis data stream that is running in the same AWS Region as the EC2
  • DEnsure that the IAM role that is attached to the EC2 instance has permissions in CloudWatch

How the community answered

(53 responses)
  • A
    6% (3)
  • B
    13% (7)
  • C
    4% (2)
  • D
    77% (41)

Explanation

Amazon EC2 instances need the appropriate permissions to interact with Amazon CloudWatch Logs. These permissions are granted through an IAM (Identity and Access Management) role attached to the EC2 instance.

Topics

#CloudWatch agent#EC2 IAM role#log publishing#permissions

Community Discussion

No community discussion yet for this question.

Full SOA-C02 Practice