- A
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.
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.
- B
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 wrong: 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.
- C
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 wrong: 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.
- D
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 wrong: 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.
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
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.
- →
Security and Compliance — study guide chapter
Learn the concepts, then practise the questions
- →
Security and Compliance practice questions
Targeted practice on this topic area only
- →
All CLF-C02 questions
1,024 questions across all exam domains
- →
AWS Certified Cloud Practitioner CLF-C02 study guide
Full concept coverage aligned to exam objectives
- →
CLF-C02 practice test guide
How to use practice tests most effectively before exam day
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.
Cloud Concepts practice questions
Practise CLF-C02 questions linked to Cloud Concepts.
Security and Compliance practice questions
Practise CLF-C02 questions linked to Security and Compliance.
Cloud Technology and Services practice questions
Practise CLF-C02 questions linked to Cloud Technology and Services.
Billing, Pricing, and Support practice questions
Practise CLF-C02 questions linked to Billing, Pricing, and Support.
AWS shared responsibility model practice questions
Practise CLF-C02 questions linked to AWS shared responsibility model.
AWS IAM practice questions
Practise CLF-C02 questions linked to AWS IAM.
AWS pricing practice questions
Practise CLF-C02 questions linked to AWS pricing.
AWS support plans practice questions
Practise CLF-C02 questions linked to AWS support plans.
AWS S3 practice questions
Practise CLF-C02 questions linked to AWS S3.
AWS EC2 practice questions
Practise CLF-C02 questions linked to AWS EC2.
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 →
Keep practising
More CLF-C02 practice questions
- A company publishes a message each time a new product is added to its catalogue. Three services need to receive this mes…
- A media company stores frequently accessed video thumbnails in Amazon S3. The thumbnails are read multiple times every d…
- A company needs a service to translate domain names (like www.example.com) into IP addresses, check the health of their…
- A startup runs an application on AWS and receives a monthly bill that charges exactly for the number of compute hours us…
- A financial institution runs its core banking application on-premises due to regulatory requirements. It has connected i…
- A company wants to run a MySQL database in AWS without managing database software installation, applying patches, settin…
Last reviewed: Jun 11, 2026
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.
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.
Sign in to join the discussion.