nerdexam
Amazon

SCS-C02 · Question #96

A company has a group of Amazon EC2 instances in a single private subnet of a VPC with no internet gateway attached. A security engineer has installed the Amazon CloudWatch agent on all instances in…

The correct answer is A. Ensure that the EC2 instance profile that is attached to the EC2 instances has permissions to C. Check the CloudWatch agent configuration file on each EC2 instance to make sure that the D. Check the VPC endpoint policies of both VPC endpoints to ensure that the EC2 instances have. CloudWatch agent logs failing to appear despite VPC endpoints typically indicates missing IAM permissions, incorrect agent configuration for the endpoint, or restrictive VPC endpoint policies.

Submitted by tunde_lagos· Mar 6, 2026Security Logging and Monitoring

Question

A company has a group of Amazon EC2 instances in a single private subnet of a VPC with no internet gateway attached. A security engineer has installed the Amazon CloudWatch agent on all instances in that subnet to capture logs from a specific application. To ensure that the logs flow securely, the company's networking team has created VPC endpoints for CloudWatch monitoring and CloudWatch logs. The networking team has attached the endpoints to the VPC. The application is generating logs However, when the security engineer queries CloudWatch, the logs do not appear. Which combination of steps should the security engineer take to troubleshoot this issue? (Choose three.)

Options

  • AEnsure that the EC2 instance profile that is attached to the EC2 instances has permissions to
  • BCreate a metric filter on the logs so that they can be viewed in the AWS Management Console.
  • CCheck the CloudWatch agent configuration file on each EC2 instance to make sure that the
  • DCheck the VPC endpoint policies of both VPC endpoints to ensure that the EC2 instances have
  • ECreate a NAT gateway in the subnet so that the EC2 instances can communicate with
  • FEnsure that the security groups allow all the EC2 instances to communicate with each other to

How the community answered

(35 responses)
  • A
    77% (27)
  • B
    14% (5)
  • E
    6% (2)
  • F
    3% (1)

Why each option

CloudWatch agent logs failing to appear despite VPC endpoints typically indicates missing IAM permissions, incorrect agent configuration for the endpoint, or restrictive VPC endpoint policies.

AEnsure that the EC2 instance profile that is attached to the EC2 instances has permissions toCorrect

The EC2 instance profile must include permissions such as cloudwatch:PutMetricData and logs:PutLogEvents; without these, the agent cannot publish data even when network connectivity exists.

BCreate a metric filter on the logs so that they can be viewed in the AWS Management Console.

Creating a metric filter is a data transformation step for already-ingested logs and does not resolve a connectivity or permissions issue preventing log delivery.

CCheck the CloudWatch agent configuration file on each EC2 instance to make sure that theCorrect

The CloudWatch agent configuration file must specify the correct endpoint URLs for the private VPC endpoints; if it still points to public endpoints, traffic will fail in a subnet with no internet gateway.

DCheck the VPC endpoint policies of both VPC endpoints to ensure that the EC2 instances haveCorrect

VPC endpoint policies act as resource policies and must explicitly allow the EC2 instances to call the CloudWatch and CloudWatch Logs APIs; a default endpoint policy allows all traffic, but a restricted policy could block it.

ECreate a NAT gateway in the subnet so that the EC2 instances can communicate with

VPC endpoints provide private connectivity to AWS services without requiring a NAT gateway; adding one is unnecessary and would not resolve the root cause.

FEnsure that the security groups allow all the EC2 instances to communicate with each other to

EC2 instances send logs individually to CloudWatch Logs via the agent; they do not need to communicate with each other to forward logs.

Concept tested: CloudWatch agent VPC endpoint connectivity troubleshooting

Source: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch-and-interface-VPC.html

Topics

#CloudWatch agent#VPC endpoints#instance profile permissions#CloudWatch Logs

Community Discussion

No community discussion yet for this question.

Full SCS-C02 Practice