Revoking Public S3 Bucket Access Automatically
A company wants to automatically detect and remediate S3 buckets that are publicly accessible. Which AWS service can be used to evaluate bucket policies against a defined rule and trigger an automated response?
⚠ Common exam trap
The trap is confusing GuardDuty (threat detection) with AWS Config (configuration compliance and remediation) — only Config evaluates policies against rules and triggers automated responses.
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 evaluates resource configurations against rules and can trigger automatic remediation via SSM Automation documents. For S3 public access, the managed rule s3-bucket-public-read-prohibited or s3-bucket-public-write-prohibited can detect noncompliant buckets and invoke a remediation action to block public access.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Amazon GuardDuty
Why it's wrong here
Amazon GuardDuty is an intelligent threat detection service that continuously analyzes VPC Flow Logs, CloudTrail management and data events, and DNS queries to identify suspicious activity, such as an S3 bucket suddenly being accessed by an unfamiliar principal. However, it is not designed to evaluate whether a bucket policy complies with internal policy standards; it looks for signs of compromise or malicious behavior rather than configuration drift. Therefore, GuardDuty would not report a bucket policy that is merely over-permissive by your security rules unless there is evidence of a known threat pattern.
- ✗
AWS CloudTrail
Why it's wrong here
AWS CloudTrail is a governance and audit service that records S3 API calls such as PutBucketPolicy, giving you a chronological 'who changed what and when' log for forensic review. However, CloudTrail does not evaluate the resulting bucket policy against a desired baseline, nor does it autonomously trigger corrective actions when a policy drifts from an allowed configuration. While you could pair CloudTrail with EventBridge and Lambda to react to specific API events, that would require custom orchestration rather than the service itself detecting or remediating misconfigurations.
- ✗
Amazon Inspector
Why it's wrong here
Amazon Inspector is a vulnerability management service that scans EC2 instances and container images for exposed software vulnerabilities and unintended network accessibility. It does not have a model of S3 bucket policies and cannot validate IAM policies attached to S3 resources, so it would not flag a bucket policy that grants overly broad access. In short, Inspector targets compute workloads, not the data plane of object storage.
- ✓
AWS Config
Why this is correct
AWS Config is the correct service because it continuously records configuration changes for resources like AWS::S3::Bucket and evaluates each bucket policy against managed rules (e.g., s3-bucket-public-read-prohibited) or custom rules written in AWS Lambda. On detecting a noncompliant policy, Config can invoke an automatic remediation action, such as running an SSM Automation document or a custom Lambda function to revert or fix the policy. This gives you native detect-and-remediate capabilities rather than just an audit trail or a threat alert.
Quick reference
AWS S3 Storage Class Comparison
| Storage Class | Min Duration | Retrieval | Use Case |
|---|---|---|---|
| S3 Standard | None | Immediate | Frequently accessed data |
| S3 Standard-IA | 30 days | Immediate | Infrequent access, rapid retrieval |
| S3 One Zone-IA | 30 days | Immediate | Non-critical infrequent data |
| S3 Intelligent-Tiering | None | Immediate–hours | Unknown or changing access patterns |
| S3 Glacier Instant | 90 days | Milliseconds | Archive with instant retrieval |
| S3 Glacier Flexible | 90 days | Minutes–hours | Archive, flexible retrieval |
| S3 Glacier Deep Archive | 180 days | Hours | Long-term compliance archive |
Go deeper
Related to this question
About these practice questions
This SCS-C02 question is part of Courseiva's 1,205-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 and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Amazon Web Services exam blueprint
This SCS-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 SCS-C02 exam.