Question 479 of 1,024
Security and CompliancemediumMultiple ChoiceObjective-mapped

CLF-C02 Security and Compliance Practice Question

This CLF-C02 practice question tests your understanding of security and compliance. This is a configuration task: choose the command set that satisfies every stated requirement. Small differences — like 'secret' vs 'password' or 'transport input ssh' vs 'all' — change whether the answer is correct. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

A company hosts a multi-tier web application on AWS. The web tier runs on Amazon EC2 instances in a public subnet, and the database tier runs on Amazon EC2 instances in a private subnet. The security team needs to configure security groups to allow only the web tier instances to communicate with the database tier on port 3306 (MySQL). The web tier must be accessible from the internet on port 443. Which security group configuration meets these requirements?

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

Web security group: inbound rule allowing 0.0.0.0/0 on port 443. Database security group: inbound rule allowing the web security group as source on port 3306.

Option A is correct because it uses a security group reference as the source for the database security group's inbound rule on port 3306, which allows traffic only from instances associated with the web security group. The web security group allows inbound HTTPS traffic from the internet (0.0.0.0/0) on port 443, meeting the requirement for public access. This configuration ensures least-privilege access by restricting database communication to only the web tier, without exposing the database to the internet or requiring IP-based rules.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Answer analysis

Option-by-option breakdown

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

  • Web security group: inbound rule allowing 0.0.0.0/0 on port 443. Database security group: inbound rule allowing the web security group as source on port 3306.

    Why this is correct

    This is correct. The web SG allows internet traffic on port 443, and the database SG uses the web SG as a source, which permits only traffic from instances associated with the web SG on port 3306.

    Related concept

    Read the scenario before looking for a memorised answer.

  • Web security group: inbound rule allowing 0.0.0.0/0 on port 443. Database security group: inbound rule allowing 0.0.0.0/0 on port 3306.

    Why it's wrong here

    This is incorrect because opening the database SG to the entire internet (0.0.0.0/0) on port 3306 exposes the database to potential attacks from any source, violating security best practices.

    When this WOULD be correct

    If the requirement were to allow the database to be publicly accessible from the internet on port 3306 (e.g., for external database administration), then this rule would be correct.

  • Web security group: inbound rule allowing the web security group as source on port 443. Database security group: inbound rule allowing the web security group as source on port 3306.

    Why it's wrong here

    This is incorrect because the web SG allows inbound traffic from itself (self-reference) on port 443, which does not allow internet traffic. Internet users cannot reach the web tier, so the application would be inaccessible.

    When this WOULD be correct

    This configuration would be correct if the requirement was to allow only internal web-to-web communication on port 443 (e.g., for health checks or inter-instance communication) and the database tier should only accept traffic from the web security group on port 3306, with no internet access needed for the web tier.

  • Web security group: inbound rule allowing 0.0.0.0/0 on port 443. Database security group: inbound rule allowing the internet-facing Application Load Balancer security group as source on port 3306.

    Why it's wrong here

    This is incorrect because the scenario does not mention an Application Load Balancer (ALB). Even if an ALB were present, the requirement is for direct communication between the web tier EC2 instances and the database tier, not through a load balancer.

    When this WOULD be correct

    If the question required the database to be accessed only through an Application Load Balancer (e.g., for a proxy or connection pooling), and the web tier was not directly connecting to the database, then allowing the ALB security group as source on the database security group would be correct.

Option-by-option analysis

Why each answer is right or wrong

Understanding why wrong answers are wrong — and when they would be correct — is what separates a 750 score from a 900. The CLF-C02 exam frequently reuses these exact scenarios with slightly different constraints.

Web security group: inbound rule allowing 0.0.0.0/0 on port 443. Database security group: inbound rule allowing the web security group as source on port 3306.Correct answer

Why this is correct

This is correct. The web SG allows internet traffic on port 443, and the database SG uses the web SG as a source, which permits only traffic from instances associated with the web SG on port 3306.

Web security group: inbound rule allowing 0.0.0.0/0 on port 443. Database security group: inbound rule allowing 0.0.0.0/0 on port 3306.Wrong answer — click to see why

Why this is wrong here

This option allows any IP (0.0.0.0/0) to access the database on port 3306, violating the requirement that only the web tier should communicate with the database.

★ When this WOULD be the correct answer

If the requirement were to allow the database to be publicly accessible from the internet on port 3306 (e.g., for external database administration), then this rule would be correct.

Why candidates choose this

Candidates may mistakenly think that allowing 0.0.0.0/0 on the database is acceptable because they focus only on the web tier's internet access, overlooking the security constraint for the private database.

Web security group: inbound rule allowing the web security group as source on port 443. Database security group: inbound rule allowing the web security group as source on port 3306.Wrong answer — click to see why

Why this is wrong here

The web security group's inbound rule references itself as source on port 443, which would only allow traffic from other instances in the same web security group, not from the internet. The requirement is to allow internet traffic on port 443.

★ When this WOULD be the correct answer

This configuration would be correct if the requirement was to allow only internal web-to-web communication on port 443 (e.g., for health checks or inter-instance communication) and the database tier should only accept traffic from the web security group on port 3306, with no internet access needed for the web tier.

Why candidates choose this

Candidates may mistakenly think that referencing the web security group as source for both inbound rules is a secure way to restrict traffic, overlooking that the web tier must be accessible from the internet on port 443.

Web security group: inbound rule allowing 0.0.0.0/0 on port 443. Database security group: inbound rule allowing the internet-facing Application Load Balancer security group as source on port 3306.Wrong answer — click to see why

Why this is wrong here

The database tier is in a private subnet and should only accept traffic from the web tier, not from an ALB. The ALB does not directly communicate with the database; the web tier instances do. Using the ALB security group as source would allow traffic from the ALB, which is unnecessary and incorrect.

★ When this WOULD be the correct answer

If the question required the database to be accessed only through an Application Load Balancer (e.g., for a proxy or connection pooling), and the web tier was not directly connecting to the database, then allowing the ALB security group as source on the database security group would be correct.

Why candidates choose this

Candidates may mistakenly think that the ALB handles all traffic, including database connections, or they may confuse the ALB security group with the web tier security group, especially if the question mentions an internet-facing ALB for the web tier.

Analysis generated from the official CLF-C02blueprint and verified against question context. The “when correct” sections are what AI assistants cite when candidates ask “what’s the difference between these options?”

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates often confuse security group references with IP-based rules or incorrectly assume that the web security group should reference itself for inbound internet traffic, rather than using 0.0.0.0/0 for public access.

Trap categories for this question

  • Scenario analysis trap

    This is incorrect because the scenario does not mention an Application Load Balancer (ALB). Even if an ALB were present, the requirement is for direct communication between the web tier EC2 instances and the database tier, not through a load balancer.

Detailed technical explanation

How to think about this question

Security groups are stateful and support referencing other security groups as sources, which dynamically resolves to the private IP addresses of all instances associated with the referenced group. This allows the database security group to automatically include any new web instances added to the auto-scaling group without manual IP updates. In contrast, network ACLs are stateless and require explicit inbound and outbound rules, making security groups the preferred choice for instance-level traffic control in multi-tier architectures.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

A media company stores terabytes of video archives that are accessed once a year for audit purposes. Moving these objects to a cold storage tier (Azure Archive, S3 Glacier, or Google Nearline) costs a fraction of hot storage. Questions like this test whether you understand storage tiers, access frequency tradeoffs, and retrieval latency requirements.

Visual reference

192.168.1.0 /24 256 addresses (254 usable) 192.168.1.0 /25 Subnet A 128 addr (126 usable) 192.168.1.128 /25 Subnet B 128 addr (126 usable) Borrowing 1 bit from host portion creates 2 subnets (/25)

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related CLF-C02 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free CLF-C02 practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this CLF-C02 question test?

Security and Compliance — This question tests Security and Compliance — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: Web security group: inbound rule allowing 0.0.0.0/0 on port 443. Database security group: inbound rule allowing the web security group as source on port 3306. — Option A is correct because it uses a security group reference as the source for the database security group's inbound rule on port 3306, which allows traffic only from instances associated with the web security group. The web security group allows inbound HTTPS traffic from the internet (0.0.0.0/0) on port 443, meeting the requirement for public access. This configuration ensures least-privilege access by restricting database communication to only the web tier, without exposing the database to the internet or requiring IP-based rules.

What should I do if I get this CLF-C02 question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

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

Keep practising

More CLF-C02 practice questions

Last reviewed: Jun 11, 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 CLF-C02 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 CLF-C02 exam.