Courseiva
Question 223 of 1,621
Network Security, Compliance and GovernancemediumMultiple SelectObjective-mapped

Security Groups for Inter-Tier Communication — Reference Source SG by Port

A company is designing a network security architecture for a multi-tier application. They need to ensure that the web tier can only communicate with the app tier on port 443, and the app tier can only communicate with the database tier on port 3306. Which TWO actions should they take? (Choose TWO.)

Quick Answer

The answer is to create a security group for the app tier that allows inbound traffic from the web tier security group on port 443, and a separate security group for the database tier that allows inbound traffic from the app tier security group on port 3306. This is correct because security groups are stateful and allow you to reference a source security group (source SG) to control inter-tier traffic on specific ports without needing to manage IP addresses or separate outbound rules. On the AWS Certified Advanced Networking Specialty ANS-C01 exam, this scenario tests your understanding of using security groups as a logical firewall for multi-tier applications, a common trap being the mistaken use of stateless NACLs which require explicit inbound and outbound rules for each direction. Remember the memory tip: “SG for stateful, SG for source” — always reference the source security group by ID when controlling inter-tier communication on specific ports.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Create a security group for the web tier that allows outbound traffic to the app tier security group on port 443.

Options A and B are correct because security groups are stateful and allow you to reference other security groups as sources or destinations, enabling granular control of traffic between tiers. Option A allows the web tier to send outbound traffic to the app tier on port 443, and Option B allows the app tier to receive that traffic from the web tier. Options C, D, and E are incorrect: AWS Network Firewall is unnecessary for this simple requirement; network ACLs are stateless and would require complex rules; a VPC endpoint policy only applies to VPC endpoints, not inter-tier traffic.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Create a security group for the web tier that allows outbound traffic to the app tier security group on port 443.

    Why this is correct

    Security group outbound rule allows traffic to app tier.

  • Create a security group for the app tier that allows inbound traffic from the web tier security group on port 443.

    Why this is correct

    Security group inbound rule allows web tier traffic.

  • Deploy an AWS Network Firewall to inspect inter-tier traffic.

    Why it's wrong here

    Overkill for simple port-based filtering; adds complexity.

  • Use network ACLs to statelessly filter traffic on the subnets.

    Why it's wrong here

    Network ACLs are stateless, meaning they require explicit rules for both inbound and outbound traffic, including return traffic on ephemeral ports. This makes managing the required stateful communication between application tiers, where return traffic is implicitly allowed by a stateful firewall, overly complex and difficult to maintain for the specified port requirements. They are tempting because they filter traffic by port and protocol at the subnet level. However, NACLs are best suited for coarser-grained, stateless filtering, such as blocking specific IP ranges or providing a deny-by-default layer for an entire subnet.

  • Configure a VPC endpoint policy to deny all traffic between tiers.

    Why it's wrong here

    VPC endpoints are for accessing AWS services, not for inter-tier traffic.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

1 more way this is tested on ANS-C01

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. A company is designing a network security architecture for a multi-tier application. They want to ensure that the web tier can communicate with the application tier only on specific ports, and the application tier can communicate with the database tier only on specific ports. Which TWO configurations should be implemented?

medium
  • A.Use a transit gateway with network ACLs to filter traffic between tiers.
  • B.Use VPC peering to connect the tiers and apply security groups on the peering connection.
  • C.Use network ACLs to provide a secondary layer of stateless filtering at the subnet level.
  • D.Use a single security group for all tiers and define rules based on CIDR blocks.
  • E.Use security groups for each tier and allow traffic only from the source security group on the required ports.

Why C: The correct answers are C and E. Security groups (E) are stateful and can reference other security groups as a source, allowing traffic between tiers only on required ports. Network ACLs (C) are stateless and provide a secondary layer of filtering at the subnet level. Option A is wrong because a transit gateway is used to connect multiple VPCs, not for filtering within a VPC. Option B is wrong because VPC peering connects VPCs, and security groups cannot be applied to a peering connection. Option D is wrong because a single security group cannot differentiate traffic between tiers; each tier needs its own security group.

Last reviewed: Jun 20, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This ANS-C01 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the ANS-C01 exam.