How do you detect a security breach in a cloud environment that spans hundreds of servers across the globe, and then respond before data is stolen? That's the core problem solved by AWS Security Hub, Detective, and automated response services. For the SCS-C02 exam, you must understand how these three services work together to create a complete incident detection and response pipeline.
Jump to a section
A simple way to picture Security Hub, Detective, and Automated Response
When you check into a large hotel, the front desk gives you a key card. This is like turning on AWS Security Hub – it collects all the security alerts from different parts of your cloud environment into one place. But having a pile of alerts doesn't help unless someone watches them. That's where AWS Detective comes in, like a hotel security guard who reviews CCTV footage after a complaint to piece together exactly what happened.
Automated response systems, such as AWS Lambda functions triggered by Security Hub, are like the hotel's automatic fire sprinklers: when a smoke detector goes off (a security finding), the sprinklers turn on without waiting for a human security guard to run to the control panel. First, Security Hub ingests findings from services like GuardDuty or Macie (the smoke detectors). This constant stream of data leads to a central dashboard, where AWS Detective can analyse the raw data to answer 'who, what, when, and how.' Finally, automated response rules kick in, containing the incident without manual intervention. The hotel metaphor breaks down when you consider that AWS accounts can span multiple regions, each needing its own 'hotel security desk.'
AWS Security Hub is a centralised security management service that aggregates findings from multiple AWS services and partner products. Think of it as a single pane of glass for your security posture. When you enable Security Hub, it automatically ingests findings (potential security issues) from AWS GuardDuty (a threat detection service that monitors for malicious activity), AWS Inspector (which scans for software vulnerabilities), AWS Macie (which discovers and protects sensitive data), and AWS Firewall Manager. It can also ingest findings from third-party tools like CrowdStrike or Palo Alto Networks.
Security Hub performs three key functions: it aggregates findings, it runs automated compliance checks using standards like the AWS Foundational Security Best Practices (FSBP) or the CIS AWS Foundations Benchmark (a set of security configuration rules), and it provides a dashboard to prioritise risks. Every finding in Security Hub has a severity rating (Critical, High, Medium, Low) and a status (New, In Progress, Suppressed).
AWS Detective is a completely separate service that does not replace Security Hub; it complements it. Detective is an investigation service that collects and analyses log data from sources like AWS CloudTrail (which records API calls), VPC Flow Logs (which capture network traffic metadata), and Amazon EKS audit logs. It uses machine learning and graph theory to create interactive visualisations called 'behaviour graphs' (findings and activity).
The magic of Detective is that it automatically builds a resource map of relationships – for example, it knows that user 'John' used an IAM role to launch an EC2 instance, which then made an API call to S3. This lets security analysts click through the chain of events without manually joining log files. Detective's purpose is to reduce the time to investigate a security incident from hours to minutes.
Automated response is the final piece. AWS offers several ways to respond automatically to Security Hub findings. The most common is to use Amazon EventBridge (formerly CloudWatch Events) to trigger an AWS Lambda function (a serverless code execution service) or an AWS Step Functions workflow when a specific finding arrives. For example, you might create a rule that says: 'If Security Hub receives a Critical finding from GuardDuty that indicates a compromised EC2 instance, automatically quarantine that instance by modifying its Security Group (a virtual firewall) or by detaching it from the network.'
You can also use AWS Systems Manager Automation documents to run pre-defined response playbooks, such as taking a forensic snapshot of a disk before isolating a resource. The key exam concept is that these three services form a pipeline: Detect (Security Hub collects findings), Investigate (Detective analyses the root cause), and Respond (Automated action is taken).
Why does this exist? Without these services, a security team would have to log into each individual service to see alerts, manually gather logs from multiple systems, and then manually execute commands to block an attack. This is slow and error-prone. Security Hub, Detective, and automated response replace this manual, fragmented process with a unified, automated, and fast system.
The exam will test you on exactly which service does what: Security Hub aggregates, Detective investigates, and EventBridge/Lambda/Systems Manager provide the automated response. They also love to test the requirement that Security Hub must be enabled in every region you want to monitor, and that it needs an IAM service-linked role (a special IAM role that gives Security Hub permission to call other AWS services on your behalf) to function.
Enable Security Hub in each region
You must enable Security Hub in every AWS region where you want to collect findings. This involves creating a service-linked role that allows Security Hub to call other services. Without this step, no findings are aggregated.
Enable AWS Detective in relevant regions
Detective must be enabled to start ingesting log data. It automatically begins gathering logs from CloudTrail, VPC Flow Logs, and EKS audit logs. You do not need to forward Security Hub findings to Detective – they work independently.
Configure Security Hub integrations
You must enable individual security services like GuardDuty, Inspector, and Macie to send their findings to Security Hub. This is often done by enabling the integration in each service or through a master account in AWS Organizations.
Create an EventBridge rule for automated response
Define a rule in Amazon EventBridge that matches specific Security Hub findings (e.g., severity = CRITICAL and type = 'UnauthorisedAccess'). This rule will trigger a target action when matched.
Build a Lambda function or Systems Manager automation document
Write a serverless function or a Systems Manager automation that performs the remediation, such as isolating an EC2 instance by changing its Security Group, creating a forensic snapshot, or revoking an IAM role. Ensure the function has least-privilege permissions.
Test the pipeline with a simulated finding
Use the Security Hub console to manually generate a sample finding, or simulate an attack with a tool like Amazon Detective's sample data. Verify that the EventBridge rule fires, the Lambda function runs, and the intended remediation occurs without errors.
Let's walk through a realistic incident at a company called 'QuickShop', an e-commerce platform running on AWS. QuickShop has enabled Security Hub, Detective, and automated response across their entire environment.
At 3:15 PM, a security engineer named Ana receives a Slack notification from her team's incident channel. The message says: 'Critical finding in Security Hub from GuardDuty: EC2 instance compromised.' Ana opens the Security Hub dashboard and sees the finding has a severity of 'Critical' and a status of 'New.' The finding title is 'UnauthorisedAccess:EC2/SSHBruteForce.' Security Hub has already enriched this finding with details including the instance ID, the region, the source IP address of the attacker, and the time of the first event.
Ana does not touch the command line. Instead, she opens AWS Detective. The instance in question appears in Detective's resource map. She clicks on the instance and Detective shows her a timeline of every API call made from that instance in the last 24 hours. She sees that five minutes before the brute force alert, a new IAM role was attached to the instance – an anomaly. Detective shows her the exact API call made to attach the role, and which user principal (possibly a compromised IAM user) initiated it. Ana can see the actor, the action, and the target resource all in one screen.
Ana now knows the attack chain: an attacker compromised a user's access key, used it to attach a privileged role to an EC2 instance, then SSH'd into that instance.
Meanwhile, automated response has been triggered. QuickShop has configured an EventBridge rule that watches for any Security Hub finding with severity 'Critical' and title containing 'SSHBruteForce.' The rule fires a Lambda function that immediately does two things: it changes the instance's Security Group to block all incoming traffic except from a whitelisted admin IP, and it tags the instance with 'Incident: Investigation.' The instance is effectively quarantined fifteen seconds after the alert was generated.
Ana now has a contained, quarantined instance and a full investigation trail provided by Detective. She creates an AWS Systems Manager automation document to take a memory dump and a disk snapshot of the instance for forensic analysis, then submits a report to the security operations centre.
The real-world benefits are clear: the incident was contained automatically in seconds, investigation took minutes instead of hours, and the security team did not have to manually query logs from multiple services.
It is important to note that deploying this requires careful planning. The team had to: create IAM roles with least privilege for the Lambda function so it could only modify Security Groups and tag instances, write the Lambda code, test the EventBridge rule in a staging environment, and ensure Detective was enabled in all regions where QuickShop runs workloads.
The SCS-C02 exam tests Security Hub, Detective, and automated response heavily, especially in scenario-based questions. You must know the specific responsibilities of each service and when to use one versus the other.
Exam topics to memorise:
Security Hub aggregates findings from GuardDuty, Inspector, Macie, and partner tools into one dashboard with severity and compliance checks.
AWS Detective is an investigation service that builds behaviour graphs from CloudTrail, VPC Flow Logs, and EKS logs to show the full attack path.
Automated response to Security Hub findings requires separate configurations using EventBridge, Lambda, or Systems Manager Automation.
Security Hub is regional — you must enable it in each AWS region where you want to monitor security findings.
The three services form a detection-investigation-response pipeline that replaces manual, fragmented security workflows.
EventBridge rules can trigger Lambda functions automatically when Security Hub receives findings of a specific severity or type.
AWS Detective uses machine learning to reduce incident investigation time from hours to minutes.
Security Hub can run compliance checks against the CIS AWS Foundations Benchmark and other standards.
These come up on the exam all the time. Here's how to tell them apart.
Security Hub
Aggregates findings from multiple security services
Provides compliance checks against standards like CIS
Does not perform attack path analysis
AWS Detective
Investigates the root cause of an incident
Builds behaviour graphs from raw log data
Shows the complete attack chain from user to resource
EventBridge
Routes events from Security Hub to targets
Does not execute any remediation code itself
Can match findings based on severity and type
AWS Lambda
Executes custom remediation code
Performs actions like modifying Security Groups
Is a serverless compute service, not a router
GuardDuty
Detects specific threats like brute force attacks
Generates findings that Security Hub consumes
Focuses on real-time threat detection
Security Hub
Aggregates findings from many sources
Performs compliance checks
Acts as a central dashboard, not a detector
Systems Manager Automation
Runs pre-defined runbooks for remediation
Ideal for multi-step procedures like disk snapshots
Is a management service, not compute
Lambda with EventBridge
Runs custom code for flexible actions
Better for simple one-step remediations
Is a compute service, not a runbook tool
Mistake
Security Hub can investigate incidents and show you the full attack path.
Correct
Security Hub only aggregates and prioritises findings. AWS Detective is the service that provides the investigative graph and attack path analysis.
Because both services are security-related and appear together in the AWS console, beginners assume Security Hub does it all.
Mistake
You must manually enable AWS Detective in every account and region individually.
Correct
AWS Detective is a regional service, but it can be enabled centrally using AWS Organizations to roll out across accounts. It also automatically ingests data from enabled sources.
People confuse the manual setup of Security Hub (which requires enabling in each region) with Detective, which has a simpler deployment mechanism.
Mistake
Automated response to Security Hub findings requires third-party tools.
Correct
AWS native services like EventBridge, Lambda, and Systems Manager Automation can create fully automated responses without any third-party software.
Vendors like Splunk or ServiceNow market their incident response integrations, leading beginners to think native options are insufficient.
Mistake
Security Hub findings have to be manually forwarded to Detective for analysis.
Correct
Security Hub and Detective are independent services. Detective ingests raw log data from CloudTrail, VPC Flow Logs, and EKS audit logs directly, not from Security Hub findings.
Because 'aggregation' and 'analysis' sound sequential, beginners assume data flows from Security Hub to Detective.
Mistake
You can enable Security Hub in one region and it will monitor all other regions.
Correct
Security Hub is a regional service. You must enable it separately in each region you want to monitor. Finding aggregation across regions requires using CloudWatch cross-region metrics or AWS Config.
Setting up Security Hub feels similar to a global service like IAM, leading to this assumption.
Mistake
Security Hub automatically remediates all critical findings without any manual configuration.
Correct
Security Hub does not perform any remediation by itself. It only generates findings. Automated response must be configured using separate services like EventBridge and Lambda.
The name 'Security Hub' implies a central command centre that acts, but it is a passive aggregator and compliance checker.
Reveal each answer, then mark whether you got it right. Score 60%+ to unlock the next chapter.
No. Security Hub only aggregates findings and runs compliance checks. It does not perform any automated remediation. You must set up separate services like EventBridge and Lambda to respond automatically.
GuardDuty is a threat detection service that monitors for malicious activity and generates findings. Security Hub is a central dashboard that collects findings from GuardDuty and other services. GuardDuty is one source; Security Hub is the collector.
Yes. Detective works independently by ingesting log data directly from CloudTrail, VPC Flow Logs, and EKS audit logs. It does not require Security Hub to be enabled, though they are often used together.
Create an Amazon EventBridge rule that matches specific finding attributes (like severity or type). Set the rule's target to an AWS Lambda function or an AWS Systems Manager automation document that performs the remediation action.
Security Hub is a regional service. You must enable it separately in each AWS region where you want to aggregate findings. It is not global like IAM.
Detective retains data for up to one year. You can choose the retention period when you enable the service, but the default is 365 days. This is important for long-term investigations.
You will only see findings from the regions where Security Hub is enabled. An attacker could operate in an unmonitored region without your knowledge. The exam emphasises enabling Security Hub in every region.
You've finished Security Hub, Detective, and Automated Response. Continue through the SCS-C02 study guide to build a complete picture of the exam.
Done with this chapter?