
Answer-first summary for fast verification
Answer: Configure the NAT gateway timeout to allow connections for up to 600 seconds.
The issue described involves long-running database queries from private EC2 instances to a publicly accessible third-party database not receiving responses after the migration to VPC private subnets using a NAT gateway for internet access. The key detail is that the queries complete successfully but the client EC2 instances never receive the response, indicating a potential issue with connection timeouts. NAT gateways have a default connection timeout for idle connections, which might be causing the issue if the response time exceeds this timeout period. Option A suggests configuring the NAT gateway timeout to allow connections for up to 600 seconds, which directly addresses the potential timeout issue by extending the duration before a connection is considered idle and closed. Options B and D do not directly address the issue of connection timeouts. Option C, enabling TCP keepalive on the client EC2 instances with a value of less than 300 seconds, could help in maintaining the connection but does not address the NAT gateway's timeout setting directly. Therefore, the most appropriate configuration change to resolve this issue is to adjust the NAT gateway timeout settings.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
A company has moved its Amazon EC2 instances to private subnets within a VPC to meet a security compliance requirement, using a NAT gateway for internet access. Following the migration, long-running database queries from private EC2 instances to a publicly accessible third-party database complete successfully after 7 minutes but fail to deliver responses to the client EC2 instances.
What configuration adjustment should a network engineer make to fix this issue?
A
Configure the NAT gateway timeout to allow connections for up to 600 seconds.
B
Enable enhanced networking on the client EC2 instances.
C
Enable TCP keepalive on the client EC2 instances with a value of less than 300 seconds.
D
Close idle TCP connections through the NAT gateway.