Several EC2 instances use a zonal public NAT gateway for IPv4 HTTPS calls to an external API. Some calls time out during a traffic increase.
The NAT gateway ID and incident window are known. Before changing the configuration, distinguish source-port allocation failures from other causes.
Which investigation is most appropriate?
For the affected NAT gateway and incident window, compare ErrorPortAllocation Sum with ActiveConnectionCount Maximum. Correlate application records and Flow Logs without treating one observation as proof of every failure.
Detailed explanation
ActiveConnectionCount measures concurrent TCP connections, not unique users. Summing samples does not give the concurrent peak or prove allocation failures.
A flow record aggregates traffic rather than matching each HTTP request to its response. Its start/end difference measures neither API response time nor processing delay inside NAT.
Correlate source-port allocation failures with concurrent TCP connection peaks and evidence from other layers. One metric does not establish the cause of every timeout.
This metric counts packets dropped by the NAT gateway; it contains no SG rule ID. Packet drops, rule rejection, and source-port allocation failures are different observations.
Check official documentation
Compare the following points with the official documentation.
Check metric scope and statistics in the official table. If a read-only validation environment is available, compare baseline and incident graphs for the same NatGatewayId and period, then match client failure times with Flow Logs action/log-status.
Official references
- Official documentation 1
- Official documentation 2
- Official documentation 3
- Official documentation 4
- Official documentation 5
- Official documentation 6
- Official documentation 7
What to confirm
Distinguish allocation failures, concurrent connection peaks, allowed or rejected traffic, and application response time. Identify additional evidence needed when records are missing or times do not align.
Key points
- ErrorPortAllocation
- ActiveConnectionCount
- Sum / Maximum
Notes
- Environment: Official AWS documentation review; optional read-only CloudWatch, application records, and Flow Logs in an authorized validation environment.
- Reviewed against the linked AWS documentation on 2026-10-17.
Foundation review
Match scope, period, and statistic
For this zonal public NAT gateway, select NatGatewayId. Compare incident and baseline windows using the same period: Sum for ErrorPortAllocation and Maximum for ActiveConnectionCount. Adding connection samples is different from measuring the concurrent peak.
Separate allocation failures from other causes
An increase in ErrorPortAllocation is evidence of source-port allocation failures. Correlate client retries and destination usage before choosing a change; it does not explain every timeout. PacketsDropCount alone identifies neither an SG rule nor port exhaustion.
Separate flow observations from application timings
Match interface, flow tuple, and time; inspect action and log-status. Flow Logs start/end describe packet observations in an aggregation window, not API response duration. Allow for delayed delivery and SKIPDATA; use application timings and upstream evidence for response latency.