A SysOps Administrator is troubleshooting a connectivity issue where Amazon EC2 instances in a private subnet are unable to download package updates from an external repository over HTTPS (port 443). The subnet's route table contains a route to a NAT Gateway, and the instances' security groups are configured to allow all outbound TCP port 443 traffic.
VPC Flow Logs reveal the following record:
`2 123456789012 eni-0a1b2c3d4e5f6g7h8 198.51.100.55 10.0.1.15 443 51234 6 10 400 1781222400 1781222460 REJECT OK`
Which of the following actions will resolve this issue?
- AAdd a route targeting an Internet Gateway (IGW) in the private subnet's route table to allow the EC2 instances to communicate directly with the external repository.
- BModify the CloudWatch Logs retention settings for the VPC Flow Logs log group to prevent log expiration from terminating the active connections.
- Add an inbound rule to the subnet's Network ACL (NACL) to allow TCP traffic on destination ports 1024–65535 from the external repository.Answer
- DConfigure the EC2 instances' IAM role to include the iam:PassRole permission to authorize the instances to bypass subnet-level traffic restrictions.
Answer
Add an inbound rule to the subnet's Network ACL (NACL) to allow TCP traffic on destination ports 1024–65535 from the external repository.
The correct action is to add an inbound rule to the subnet's Network ACL (NACL) to allow TCP traffic on destination ports 1024–65535 from the external repository. Because NACLs are stateless, they do not automatically track connection state. Response traffic returning from the repository (source port 443) back to the client EC2 instance's ephemeral port (destination port 51234) must be explicitly allowed by an inbound NACL rule. The flow logs show a REJECT action for inbound traffic from the repository on destination port 51234, confirming that the stateless NACL is blocking the return traffic.
Step-by-Step Solution
Key Concept
VPC Security Controls and Traffic Analysis
Estimated Time:1m 30s