Deny all outbound at the NACL, isolate with a diagnostics security group, and investigate from a new instance
Short answer
B Deny all outbound at the NACL, isolate with a diagnostics security group, and investigate from a separate EC2 instance.
Question
Key Takeaways
A NACL is stateless and an explicit deny-all outbound as the first rule immediately severs the instance's network connections (both directions, since return traffic is also blocked). Isolating via a diagnostics-only SG and investigating from a separate instance avoids contaminating evidence by logging into the compromised host. Logging in and installing tools on the instance (A/D) risks tampering/destruction of evidence; WAF (D) does not attach to EC2 instances. B is the correct response.
A suspicious EC2 is connecting to malicious addresses. To immediately mitigate and preserve evidence, update the subnet NACL's outbound rules to explicitly deny all as the first rule (stateless, so it cuts both directions), replace the instance's security group with one allowing only a diagnostics SG, then launch a separate diagnostic instance to examine the suspicious one—without logging in and potentially tampering. This contains the threat and supports root-cause analysis.
Common mistake: Logging into the instance to run netstat/install tools (A/D)—this may alter or destroy forensic evidence and does not immediately contain the threat. Attaching a WAF web ACL to an EC2 instance (D)—WAF associates with CloudFront/ALB/API Gateway, not EC2 instances. B's NACL deny-all + separate diagnostic instance is the right containment-and-investigate approach.
Expert Analysis
Why the Answer Is Correct
A NACL is stateless, so an explicit deny-all outbound rule as the first entry immediately blocks the suspicious instance's traffic in both directions, containing the attack at once. Replacing its security group with a diagnostics-only group and examining it from a separate, freshly launched instance preserves forensic integrity—you never log into and potentially alter the compromised host.
Why the Other Options Are Wrong
A and D have the engineer log into the instance and install tools, which can tamper with or destroy evidence and does not instantaneously contain the threat. D also wrongly attaches a WAF web ACL to an EC2 instance—WAF attaches to CloudFront, ALB, or API Gateway, not EC2. B is the correct containment-and-investigate response.
Community Comment Notes
Community voted B (100). Commenters favored the NACL deny-all outbound plus a separate diagnostics instance to avoid touching the suspicious host. B was confirmed as immediate mitigation + root-cause investigation.
Official Reference
https://docs.aws.amazon.com/vpc/latest/userguide/vpc-network-acls.html
This link opens the official vendor documentation in a new tab.
Community Votes
100% of anonymous learners picked answer B. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 3 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 3
-
Zek 👍 6Agree with B a public discussion thread on this question
-
navid1365 👍 2 Answered BB is correct
-
NimiBes 👍 1 Answered BB for me
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.