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.
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)- A6% (3)
- B13% (7)
- C4% (2)
- D77% (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
Community Discussion
No community discussion yet for this question.