CLF-C02 Security and Compliance Practice Question
A company has deployed multiple EC2 instances with different security groups. The compliance team wants to ensure that no security group allows unrestricted SSH access (0.0.0.0/0) and receive alerts if any such rule is created. Which AWS service can they use to continuously monitor and evaluate the security group configurations against this policy?
⚠ Common exam trap
Many candidates confuse AWS CloudTrail (which logs API calls) with AWS Config (which evaluates resource configurations), or they mistakenly think Amazon GuardDuty can check static security group rules when it is designed for dynamic threat detection.
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
✓
AWS Config
AWS Config is the correct service because it provides continuous monitoring and evaluation of AWS resource configurations against desired policies. With a managed rule like `restricted-ssh`, AWS Config can automatically detect security groups that allow unrestricted SSH access (0.0.0.0/0) and trigger alerts or remediation actions. This meets the compliance team's requirement for ongoing, rule-based evaluation of security group configurations.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
AWS CloudTrail
Why it's wrong here
AWS CloudTrail is an auditing service that records API activity in an AWS account, such as AuthorizeSecurityGroupIngress or RevokeSecurityGroupIngress calls, along with the identity, time, and source IP of the requester. It can answer questions like 'who changed a security group' or 'when was it changed,' but it does not maintain or evaluate the current state of security group rules. To detect existing security groups with unrestricted SSH, you need a service that continuously captures configuration snapshots and assesses them against policies, which CloudTrail does not do. CloudTrail's value is forensic and operational auditing, not proactive configuration compliance.
When this WOULD be correct
A company needs to audit all API calls that modify security group rules to detect who made changes and when. CloudTrail would be correct for tracking the creation of SSH access rules as an audit trail.
- ✗
Amazon GuardDuty
Why it's wrong here
Amazon GuardDuty is purpose-built for intelligent threat detection, not configuration compliance. It analyzes telemetry such as VPC Flow Logs, DNS query logs, and CloudTrail management events using machine learning and threat intelligence to identify malicious activity like brute-force attempts, cryptocurrency mining, or compromised credentials. GuardDuty might detect an actual SSH brute force pattern in network traffic, but it will not examine the static definition of a security group rule to determine whether port 22 is open to 0.0.0.0/0. Because the requirement is to identify unrestricted SSH access in the security group configuration itself, GuardDuty is the wrong tool for this compliance-style assessment.
When this WOULD be correct
A company wants to detect and alert on suspicious network traffic, such as SSH brute force attempts from external IPs, or identify compromised EC2 instances. GuardDuty would be the correct service to continuously monitor VPC flow logs and DNS logs for such threats.
- ✓
AWS Config
Why this is correct
AWS Config continuously monitors and records AWS resource configurations and allows you to evaluate them against desired configurations using managed or custom rules. It can detect security groups with unrestricted SSH access and trigger notifications or automatic remediation.
- ✗
AWS Security Hub
Why it's wrong here
AWS Security Hub provides a comprehensive view of security alerts and compliance status from multiple AWS services, but it does not directly perform configuration evaluations; it relies on services like AWS Config for that data.
When this WOULD be correct
A company wants a single dashboard to view and prioritize security alerts from AWS Config, GuardDuty, and Inspector, and needs to check compliance against industry standards like CIS AWS Foundations. In that scenario, AWS Security Hub is the correct answer.
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.
✓AWS ConfigCorrect answer▾
Why this is correct
AWS Config continuously monitors and records AWS resource configurations and allows you to evaluate them against desired configurations using managed or custom rules. It can detect security groups with unrestricted SSH access and trigger notifications or automatic remediation.
✗AWS CloudTrailWrong answer — click to see why▾
Why this is wrong here
AWS CloudTrail records API activity but does not continuously evaluate security group configurations against a policy. It cannot alert on non-compliant rules; it only logs changes after they occur.
★ When this WOULD be the correct answer
A company needs to audit all API calls that modify security group rules to detect who made changes and when. CloudTrail would be correct for tracking the creation of SSH access rules as an audit trail.
Why candidates choose this
Candidates may think CloudTrail can monitor configurations because it logs changes, but it lacks the continuous evaluation and alerting capabilities of AWS Config for compliance rules.
✗Amazon GuardDutyWrong answer — click to see why▾
Why this is wrong here
Amazon GuardDuty is a threat detection service that monitors for malicious activity and unauthorized behavior, not for continuous compliance monitoring of security group configurations against custom policies.
★ When this WOULD be the correct answer
A company wants to detect and alert on suspicious network traffic, such as SSH brute force attempts from external IPs, or identify compromised EC2 instances. GuardDuty would be the correct service to continuously monitor VPC flow logs and DNS logs for such threats.
Why candidates choose this
Candidates may confuse GuardDuty's security monitoring capabilities with compliance monitoring, assuming it can check security group rules because it deals with network security and threats.
✗AWS Security HubWrong answer — click to see why▾
Why this is wrong here
AWS Security Hub aggregates findings from multiple services and provides a comprehensive security posture view, but it does not continuously monitor and evaluate security group configurations against custom policies like 'no unrestricted SSH access'. That is the function of AWS Config rules.
★ When this WOULD be the correct answer
A company wants a single dashboard to view and prioritize security alerts from AWS Config, GuardDuty, and Inspector, and needs to check compliance against industry standards like CIS AWS Foundations. In that scenario, AWS Security Hub is the correct answer.
Why candidates choose this
Candidates may confuse Security Hub's compliance checks with AWS Config's rule evaluation, or think Security Hub can directly monitor security group rules because it provides security posture overviews.
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?”
Go deeper
Related to this question
About these practice questions
This CLF-C02 question is part of Courseiva's 988-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
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.