Monitoring, Logging, Analysis, Remediation, and Performance Optimization

An EC2 instance in a private subnet has no internet egress; its CloudWatch agent publishes metrics successfully but times out sending logs. IAM permissions are sufficient, and only the monitoring interface endpoint exists. What should the administrator do?

Show the answer

Correct answerB. Add a CloudWatch Logs interface endpoint and allow HTTPS access from the instance.

AWhy not this: CloudTrail connectivity does not provide access to the CloudWatch Logs ingestion API.

BWhy this is right: CloudWatch Logs needs its own reachable service endpoint when the instance has no internet egress.

CWhy not this: The monitoring endpoint handles metrics; another one does not provide CloudWatch Logs connectivity.

DWhy not this: SNS connectivity supports messaging, not delivery of agent logs to CloudWatch Logs.

The agent sends metrics and logs to separate service endpoints. A CloudWatch Logs interface endpoint provides private connectivity for log delivery; another monitoring endpoint would still serve the metrics API rather than the Logs API.