Courseiva
Question 1,509 of 247
Monitoring, Logging, and RemediationhardMultiple ChoiceObjective-mapped

Troubleshoot RDS Connection Refused Errors with VPC Flow Logs and CloudWatch Metrics

An application running on EC2 instances occasionally throws 'Connection refused' errors when connecting to an RDS database. The SysOps administrator needs to determine if the issue is due to database connection limits or network security groups. Which metrics and logs should the administrator examine?

Quick Answer

The answer is to examine the RDS CloudWatch metric DatabaseConnections and analyze VPC Flow Logs for the EC2 instance's network interface. This combination is correct because "Connection refused" errors typically arise from either the database exhausting its maximum connections or network-level security groups blocking traffic; the DatabaseConnections metric directly shows the current active connections against the instance’s max_connections limit, while VPC Flow Logs capture whether packets are accepted or rejected by security groups or network ACLs, pinpointing network blockages. On the AWS Certified SysOps Administrator Associate SOA-C02 exam, this scenario tests your ability to differentiate between application-layer limits and network-layer denials when troubleshooting RDS connection refused errors using VPC Flow Logs—a common trap is to only check security group rules without verifying connection saturation. Remember the mnemonic "DB or Net" to recall that DatabaseConnections covers the database side, and VPC Flow Logs cover the network side.

⚠ Common exam trap

A common mix-up: candidates confuse aggregate network metrics (like NetworkIn/NetworkOut) or CPU metrics with the specific indicators needed to differentiate between connection limits and security group denials, leading them to choose options that measure volume rather than connection state or packet acceptance.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Examine the RDS CloudWatch metric DatabaseConnections and analyze VPC Flow Logs for the EC2 instance's network interface.

'Connection refused' errors typically stem from either the database exhausting its maximum connections or network-level security groups blocking traffic. The RDS CloudWatch metric `DatabaseConnections` directly shows the current number of active connections against the instance's `max_connections` limit, while VPC Flow Logs capture whether packets are being accepted or rejected by security groups or network ACLs, pinpointing network blockages.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Check CloudWatch RDS CPUUtilization and CloudTrail logs for RDS API calls.

    Why it's wrong here

    CPUUtilization is not directly related to connection limits; CloudTrail logs API calls, not connection errors.

  • Review RDS error logs in CloudWatch Logs and check the EC2 instance's system log.

    Why it's wrong here

    RDS error logs may show connection errors, but system logs are not helpful; VPC Flow Logs are needed for network issues.

  • Look at the EC2 instance's CloudWatch NetworkIn and NetworkOut metrics and RDS FreeableMemory metric.

    Why it's wrong here

    Network metrics do not show connection refusals; FreeableMemory is not directly related to connection limits.

  • Examine the RDS CloudWatch metric DatabaseConnections and analyze VPC Flow Logs for the EC2 instance's network interface.

    Why this is correct

    DatabaseConnections shows active connections; VPC Flow Logs can show if traffic is allowed or denied.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

2 more ways this is tested on SOA-C02

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. A company is experiencing intermittent performance issues with an application running on an EC2 instance. The CloudWatch metrics show high CPU utilization but no correlation with the timing of the issue. The SysOps administrator needs to collect detailed performance data to identify the root cause. Which AWS service should the administrator use to capture network-level metrics and logs?

medium
  • A.Configure a CloudWatch Logs agent on the instance to send application logs.
  • B.Enable VPC Flow Logs for the EC2 instance's subnet.
  • C.Use AWS CloudTrail to log all API calls made to the instance.
  • D.Enable AWS Config to track configuration changes to the instance.

Why B: VPC Flow Logs capture IP traffic metadata (source/destination IP, ports, protocol, packet count) at the network interface level, which is essential for diagnosing network-related performance issues. Since the problem is intermittent and uncorrelated with CPU, network-level metrics can reveal issues like packet loss, throttling, or latency that application logs or CPU metrics alone cannot. This directly addresses the need for detailed network-level data.

Variation 2. An application is running on an EC2 instance and is experiencing intermittent connection timeouts. The SysOps administrator wants to capture network traffic to analyze the issue. Which AWS service should be used?

easy
  • A.CloudWatch Logs
  • B.AWS CloudTrail
  • C.AWS Config
  • D.VPC Flow Logs

Why D: VPC Flow Logs capture IP traffic information for network interfaces in a VPC, including accepted and rejected connection attempts. This allows the SysOps administrator to analyze the source/destination IPs, ports, protocols, and whether the traffic was allowed or denied, which is essential for diagnosing intermittent connection timeouts.

Last reviewed: Jun 24, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This SOA-C02 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the SOA-C02 exam.