Detect Suspicious API Calls with Amazon GuardDuty
A security engineer notices that an IAM role used by an EC2 instance is generating a large number of API calls to an S3 bucket that is not part of the company's account. Which AWS service should be used to detect and alert on this suspicious activity?
Quick Answer
Amazon GuardDuty is the correct choice because it is purpose-built to detect suspicious API calls and other anomalous activity across your AWS environment. It continuously analyzes AWS CloudTrail management and data events, VPC Flow Logs, and DNS logs using machine learning and anomaly detection, making it ideal for identifying patterns like an IAM role on an EC2 instance making a high volume of requests to an S3 bucket outside your account—a classic sign of compromised credentials or data exfiltration. On the AWS Certified Security Specialty SCS-C02 exam, this question tests your understanding of GuardDuty’s core capability to monitor API call behavior, not just network traffic or resource configurations. A common trap is confusing GuardDuty with Amazon Inspector (which scans for vulnerabilities) or AWS Config (which tracks resource compliance). Remember the memory tip: GuardDuty is your “guard” for duty logs—if it involves unusual API calls, think GuardDuty first.
⚠ Common exam trap
Many exam-takers confuse CloudTrail (which logs the activity) with GuardDuty (which analyzes and alerts on the activity), leading them to select CloudTrail because they think logging alone is sufficient for detection, but GuardDuty is the service specifically designed for threat detection and alerting.
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
✓
Amazon GuardDuty
Amazon GuardDuty is the correct service because it uses machine learning and anomaly detection to analyze AWS CloudTrail management and data events, VPC Flow Logs, and DNS logs. It can detect unusual API calls, such as an EC2 instance role making a high volume of requests to an S3 bucket outside the company's account, which is a classic indicator of compromised credentials or data exfiltration. GuardDuty generates findings and can integrate with Amazon CloudWatch Events to trigger alerts or automated remediation.
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
CloudTrail records API activity as audit logs but does not itself detect or alert on anomalous behaviour; it supplies the events that a detection service analyses. It is tempting because it captures the cross-account S3 calls, but it would be the right choice for auditing and log retention, not for generating the alert.
- ✗
Amazon Inspector
Why it's wrong here
Amazon Inspector scans EC2 instances, container images and Lambda functions for software vulnerabilities and unintended network exposure; it does not monitor API call patterns. It is tempting because it assesses EC2 security, but it would be the right choice for vulnerability findings, not for detecting anomalous S3 access.
- ✗
AWS Config
Why it's wrong here
AWS Config evaluates resource configuration against rules and records configuration changes; it does not analyse API call patterns to flag suspicious cross-account S3 access. It is tempting because it detects drift and non-compliant resources, but it would be correct for configuration compliance, not behavioural threat detection.
- ✓
Amazon GuardDuty
Why this is correct
Amazon GuardDuty continuously analyses CloudTrail management and S3 data events, VPC Flow Logs and DNS logs using threat intelligence and machine learning to surface anomalous behaviour. It specifically detects EC2 instance credential compromise and calls to unrecognised or malicious S3 buckets, satisfying the requirement to detect and alert on this suspicious cross-account activity.
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 →
Same concept, more angles
1 more way this is tested on SCS-C02
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 security engineer needs to detect and respond to malware on an EC2 instance. Which TWO AWS services can be used together to achieve this? (Choose TWO.)
easy- A.Amazon Inspector
- ✓ B.AWS Lambda
- C.Amazon CloudWatch
- D.AWS WAF
- ✓ E.Amazon GuardDuty with Malware Protection
Why B: AWS Lambda is correct because it can be used as a serverless compute target to automate incident response actions when malware is detected. For example, a Lambda function can be triggered by a GuardDuty finding to isolate the compromised EC2 instance by modifying security group rules or detaching the instance from an Auto Scaling group, enabling rapid, automated remediation without manual intervention.
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
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.