Course menuSOA-C03

Exams / SOA-C03 / CloudWatch agent and log collection / Question 2

SOA-C03 practice question: CloudWatch agent and log collection (2 of 2)

Monitoring, Logging, Analysis, Remediation, and Performance Optimization A free question from our original SOA-C03 practice exam. Try it, then open the answer to see why each option is right or wrong.

Last verified against current AWS documentation ·How we write our questions

A pet insurer moved its claims workers to private subnets that have no NAT gateway and no internet gateway. The CloudWatch agent on the instances should send application logs to CloudWatch Logs. The instance role includes CloudWatchAgentServerPolicy, and Systems Manager works through existing interface endpoints.

No logs arrive, and the agent's own log shows repeated connection timeouts to logs.us-east-2.amazonaws.com.

What should a CloudOps engineer do to fix this with the LEAST change?

Choose one answer.

  1. A. Create an interface VPC endpoint for CloudWatch Logs with private DNS, and allow HTTPS to it from the instances.
  2. B. Attach the CloudWatchLogsFullAccess managed policy to the instance role so that the agent can create log groups and streams.
  3. C. Create a gateway VPC endpoint for CloudWatch Logs and add it to the route tables of the private subnets.
  4. D. Add a NAT gateway in a public subnet, add an internet gateway to the VPC, and route the private subnets' 0.0.0.0/0 traffic to it.
Show the answer and explanation

Answer: A

Explanation

Connection timeouts point at network reachability, not permissions. In subnets with no internet path, every AWS service the instance calls needs a VPC endpoint, just as Systems Manager already has. CloudWatch Logs supports interface endpoints, and with private DNS the agent keeps using the standard endpoint name.

An interface VPC endpoint giving private subnets a path to an AWS service In private subnets with no NAT gateway, an application calls an AWS service by its normal name. Private DNS resolves the name to an interface endpoint in the subnets, which has an endpoint policy, and the traffic reaches the AWS service over the AWS network through PrivateLink. Private subnets, no NAT Application calls the normal service name Interface endpoint private DNS, endpoint policy AWS service PrivateLink
The agent's calls to CloudWatch Logs time out until an interface endpoint gives the private subnets a path to the service.

Study

Keep practicing

Answer questions with a score at the end, or practice just this topic with the explanation after each one. No sign-up needed.

Want more on CloudWatch agent and log collection? The 5 full-length practice sets have 6 more CloudWatch agent and log collection questions, 325 in all, none of them in the free exam. One payment of $14.99, no subscription. See the practice sets