Root Cause Analysis with Amazon Detective
Amazon Detective supports root cause analysis (RCA) during incident response. It collects and correlates log data so security teams can see how an event unfolded. For SCS-C03, remember that Detective does not generate threat detections itself. It investigates findings from Amazon GuardDuty, AWS Security Hub, and other sources, answering questions such as who did what, from where, and when. Data sources: Once enabled, Detective ingests AWS CloudTrail management events, VPC Flow Logs, and GuardDuty findings. Optional source packages add Amazon EKS audit logs and AWS security findings aggregated by Security Hub. Detective uses its own independent data streams, so you do not need to configure trails or flow logs separately for it. The data feeds a behavior graph, a linked model of entities such as IAM users, roles, EC2 instances, IP addresses, and user agents. The graph covers up to one year of history. RCA workflow: 1. Start from a GuardDuty or Security Hub finding and pivot into Detective with the Investigate option. 2. Review entity profiles that compare baseline behavior with anomalies, such as new geolocations, unusual API calls, or traffic spikes. 3. Widen the scope time to examine activity before the alert and identify initial access. 4. Use finding groups, which cluster related findings and entities into one attack chain mapped to MITRE ATT&CK tactics. Generative AI summaries can explain these groups in plain language. 5. Run Detective Investigations on IAM users or roles to surface indicators of compromise, such as impossible travel, flagged IP addresses, and suspicious TTPs. Multi-account: Use a delegated administrator account through AWS Organizations to centralize investigations across member accounts. Exam tips: Choose Detective when a scenario asks for visualizing relationships, determining the scope or root cause of a finding, or investigating historical behavior with minimal operational effort. Choose GuardDuty for detection, Athena for custom log queries, and Systems Manager or Lambda for remediation. Detective is regional and charges based on the volume of data ingested.
Root Cause Analysis with Amazon Detective
Amazon Detective is a managed security service that helps you analyze, investigate, and identify the root cause of potential security issues or suspicious activity in your AWS environment. In the AWS Certified Security - Specialty exam it sits in the Threat Detection and Incident Response domain. It answers questions such as who did this, from where, when did it start, and what else did they touch?
Why Root Cause Analysis with Amazon Detective Is Important
• Detection alone is not enough: Amazon GuardDuty tells you that something suspicious happened. Detective helps you understand why it happened, how far it spread, and whether it is a true positive.
• Faster triage: Manually correlating CloudTrail logs, VPC Flow Logs, and findings through Athena or CloudWatch Logs Insights takes hours or days. Detective pre-correlates this data so analysts can pivot in minutes.
• Reduced alert fatigue: Analysts can quickly confirm or dismiss findings by comparing current activity against historical baselines.
• Scoping and containment: Knowing every resource and identity linked to an incident lets responders contain the full blast radius instead of only the first symptom.
• Compliance and lessons learned: Root cause evidence supports post-incident reports and helps prevent recurrence.
What Amazon Detective Is
• A fully managed, analytics and visualization service for security investigations.
• It automatically collects log data and uses machine learning, statistical analysis, and graph theory to build a linked data set called the behavior graph.
• It retains up to one year of aggregated, historical data for investigation.
• It requires no agents, no log pipelines, and no queries to write.
• It is an investigation tool. It does not block traffic, remediate resources, or generate the primary threat detections itself (GuardDuty does that).
How Amazon Detective Works
1. Data sources
• Core sources (enabled by default): AWS CloudTrail management events, Amazon VPC Flow Logs, and Amazon GuardDuty findings.
• Optional source packages: Amazon EKS audit logs, AWS Security Hub findings (from integrated services), and integration with Amazon Security Lake for additional log types such as S3 data events.
• Detective consumes its own independent, duplicate streams of CloudTrail and VPC Flow Log data. You do not need to turn on flow logs or configure trails for Detective to work, and it does not affect your existing logging configuration or cost.
2. Behavior graph
• Detective organizes data into entities (for example IAM users, IAM roles, AWS accounts, EC2 instances, IP addresses, user agents, EKS clusters, pods, container images, S3 buckets) and the relationships between them.
• Each behavior graph belongs to an administrator account and can include data from member accounts.
• With AWS Organizations, you designate a delegated administrator account that can auto-enable Detective for all current and new member accounts (up to 1,200 member accounts per graph).
3. Profiles and visualizations
• Entity profiles show activity over time, such as API calls made by a role, successful vs. failed calls, geolocations used, new user agents, and network traffic volumes.
• Baselines highlight activity that is new or unusual compared to the entity's normal history, which is key to root cause analysis.
• Scope time lets you narrow the investigation window around the finding.
• Finding profiles show the GuardDuty finding plus related entities and evidence.
4. Finding groups
• Detective automatically groups related findings and entities that likely belong to the same security event, mapping them to MITRE ATT&CK tactics.
• Finding group summaries can use generative AI to produce a natural-language description of the event.
• This shows the full attack chain, for example initial access through compromised credentials, then privilege escalation, then data exfiltration.
5. Detective Investigations
• Automated investigations for IAM users and roles that check for indicators of compromise such as tactics, techniques, and procedures (TTPs), known malicious IP addresses (threat intelligence), impossible travel, and flagged suspicious activity.
6. Integrations and access
• Pivot from GuardDuty or Security Hub findings using the Investigate in Detective option.
• Supported partner and SIEM tools can link into Detective entity profiles via URLs.
• Access is controlled through IAM; the managed policy AmazonDetectiveFullAccess and member/investigator policies govern who can view the graph.
7. Prerequisites and pricing
• Historically GuardDuty had to be enabled for at least 48 hours before enabling Detective; GuardDuty should be active for best results since its findings drive investigations.
• Pricing is based on the volume of data ingested into the behavior graph; a 30-day free trial is available.
A Typical Root Cause Analysis Workflow
1. GuardDuty raises a finding, for example UnauthorizedAccess:IAMUser/InstanceCredentialExfiltration.
2. The analyst selects Investigate in Detective.
3. Detective shows the finding profile, the IAM role involved, the EC2 instance, and the external IP address.
4. The analyst reviews the role profile: new geolocations, new API calls, and spikes in failed calls compared with the baseline.
5. The analyst pivots to the IP address to see every other account or role it interacted with.
6. The finding group reveals the related findings, building the full timeline.
7. Root cause identified (for example SSRF on a web app leaking instance credentials). Responders then remediate using other tools such as revoking role sessions, isolating the instance, and patching the application.
Comparison With Related Services
• GuardDuty: detects threats and generates findings.
• Detective: investigates findings, finds root cause and scope.
• Security Hub: aggregates findings and checks posture against standards.
• CloudTrail / CloudTrail Lake / Athena: raw log storage and manual querying; flexible but labor-intensive.
• Amazon Inspector: vulnerability scanning of EC2, ECR images, and Lambda.
• Amazon Macie: sensitive data discovery in S3.
• AWS Systems Manager / Lambda / EventBridge: automated remediation and response.
Exam Tips: Answering Questions on Root Cause Analysis with Amazon Detective
• Look for investigation keywords: root cause, investigate, visualize, scope, timeline, related activity, determine the extent, correlate, historical behavior, triage findings. These usually point to Detective.
• Detect vs. investigate: If the question asks to identify or alert on malicious activity, choose GuardDuty. If it asks to analyze a finding that already exists, choose Detective.
• Least operational overhead: When the choices include building Athena queries over CloudTrail and flow logs versus using Detective, and the question emphasizes minimal effort or speed, Detective is usually correct.
• Detective does not remediate: Options claiming Detective will block an IP, quarantine an instance, or revoke credentials are wrong. Pair it with EventBridge, Lambda, Systems Manager, or manual actions for response.
• Know the data sources: CloudTrail, VPC Flow Logs, GuardDuty findings (core); EKS audit logs and Security Hub findings (optional). It does not analyze application logs, OS logs, or packet captures natively.
• No separate log setup: Detective pulls its own data streams; you do not need to enable flow logs or create a trail for it.
• Multi-account scenarios: Use AWS Organizations with a delegated administrator account to centrally investigate across all accounts and auto-enable new ones.
• Retention: Remember up to 1 year of historical data, useful for questions about investigating long-running or slow attacks.
• GuardDuty dependency: Detective works best with GuardDuty enabled; a scenario that says GuardDuty is off may require enabling it first.
• Finding groups and MITRE ATT&CK: If a question describes many related findings that must be understood as one attack, finding groups are the feature to recall.
• Compromised IAM identity: Questions about verifying whether an IAM role or user is compromised (impossible travel, unusual API calls, malicious IPs) map to Detective Investigations.
• Container threats: For investigating suspicious EKS activity, enable the EKS audit logs source package in Detective alongside GuardDuty EKS protection.
• Eliminate distractors: Macie (data classification), Inspector (vulnerabilities), Config (configuration compliance), and Trusted Advisor (best-practice checks) are not root cause investigation tools.
• Incident response order: Detect (GuardDuty), aggregate (Security Hub), investigate (Detective), contain and remediate (automation), then perform lessons learned. Placing Detective in the right step helps answer sequencing questions.
Summary
Amazon Detective turns raw CloudTrail, VPC Flow Log, GuardDuty, and EKS data into an interactive behavior graph with baselines, profiles, and finding groups. It lets security teams quickly establish the root cause and blast radius of an incident. For the exam, remember: GuardDuty finds it, Detective explains it, automation fixes it.