Question

Difficulty: MediumNetwork and Infrastructure Security

A health-tech startup hosts its patient record database on Amazon EC2 instances inside a private subnet of a Virtual Private Cloud (VPC). The security team needs to restrict incoming database traffic to only the application server instances. Additionally, any outbound response traffic from the database back to the application servers must be allowed automatically, without configuring an explicit outbound rule. Which AWS firewall option should the security team configure to meet these requirements?

  1. A
    Network Access Control Lists (NACLs) at the subnet level, because they are stateful and automatically allow response traffic to pass through.
  2. B
    AWS Shield at the infrastructure level, because AWS manages firewall rules automatically for database ports under the Shared Responsibility Model.
  3. Security Groups at the instance level, because they are stateful and automatically allow outbound responses to allowed inbound requests.Answer
  4. D
    Network Access Control Lists (NACLs) at the instance level, because they are stateless and require rules for both inbound and outbound traffic.

Answer

Security Groups at the instance level, because they are stateful and automatically allow outbound responses to allowed inbound requests.
The correct option is the one specifying Security Groups at the instance level. Security Groups are stateful, meaning any inbound traffic allowed is automatically permitted to flow outbound as a response, meeting the requirement to allow return traffic without an explicit outbound rule. They also operate at the instance level, allowing granular access control between specific application and database instances.

Step-by-Step Solution

1
Analyze the requirement for instance-level traffic restriction to the application server instances.
Identify that the firewall must support instance-level targeting (such as referencing the application server security group).
This isolates the database instances from other resources within the same or different subnets.
2
Evaluate the statefulness requirement: return traffic must be allowed automatically without explicit outbound rules.
Security Groups are stateful and track connection states, allowing return traffic automatically. Network ACLs are stateless and would require explicit outbound rule configurations.
Choosing a stateful resource satisfies the requirement to allow return traffic automatically without additional outbound rules.

Key Concept

Stateful instance-level security (Security Groups) vs. stateless subnet-level security (Network ACLs)
Rate this question