Turning on Amazon GuardDuty, AWS Security Hub, Amazon Detective and Amazon Security Lake is the easy part. The hard part comes at 02:00, when a critical finding arrives and someone has to decide what to do with it. Most organizations have the services enabled. Far fewer have a response they have actually rehearsed.

This post organizes the AWS detection and response stack around four verbs: detect, investigate, contain, learn. For each one we cover which service does the work, where the common gaps are, and what a tested playbook looks like, as opposed to a console that is merely switched on. A note on naming: Security Hub is now a unified security operations solution (generally available since December 2025) and the original posture-management capability is called Security Hub CSPM. This post uses "Security Hub" for the unified service.

The model at a glance

Every finding should travel the same path: a detector raises it, Security Hub prioritizes it, an investigator confirms it, an automated or human-approved action contains it, and the lesson is fed back into detection. The diagram below shows the path and the services at each stage.

detect, investigate, contain, learn · 4 stages, 1 feedback loop detect, investigate, contain, learn · 4 stages, 1 feedback loop

Detection and investigation feed containment, which is the only stage with automated action. Learning closes the loop back to detection.

1. Detect: signal quality over signal volume

Amazon GuardDuty is the primary threat detector. Two points matter for design:

  • Extended Threat Detection correlates weak signals (individual API calls that are harmless alone) across data sources and time, and emits a single attack sequence finding with Critical severity. It is on by default at no extra cost, but its coverage depends on which protection plans you enable. Runtime Monitoring for EC2, ECS/Fargate and EKS gives it the workload-level evidence it needs for compromised-instance and compromised-cluster sequences.

  • GuardDuty's attack sequence findings are Critical by design, which makes them a good trigger for your highest-urgency playbook, while ordinary High findings can follow a lighter path.

AWS Security Hub is where prioritization happens. It correlates signals from GuardDuty, Amazon Inspector and Security Hub CSPM into exposure findings: for example, an internet-reachable EC2 instance with an exploitable vulnerability and a threat signal is far more urgent than any of the three alone. Findings use the Open Cybersecurity Schema Framework (OCSF). Enable it organization-wide through AWS Organizations and designate an aggregator Region so responders have a single view.

Design rule: decide before an incident which finding types are "page a human", which are "auto-contain", and which are "ticket and review". Security Hub automation rules (which update or suppress findings and open tickets in tools such as Jira Cloud and ServiceNow) run before EventBridge sees the finding, so you can raise severity for production-tagged resources first and let your response rules match on the corrected value.

2. Investigate: answer "what happened and how far did it go"

Amazon Detective builds a behavior graph from your logs. Its finding groups cluster related GuardDuty and Inspector findings and the entities involved (IAM roles, IPs, instances) into one potential incident, so triage starts from the incident rather than from a list of 40 alerts. Detective Investigations automatically checks IAM users and roles for indicators of compromise, and the same capability is available through the StartInvestigation API, which means you can call it from your automation and attach the result to the ticket.

Amazon Security Lake is the evidence store. It normalizes data to OCSF in Apache Parquet inside S3 in your account, with natively supported sources including CloudTrail management and data events, VPC Flow Logs, Route 53 Resolver query logs, EKS audit logs, WAFv2 logs and Security Hub findings. Two subscriber modes matter in practice:

  • Query access (via Lake Formation) lets responders run Athena queries without pre-ingesting anything. Good for the "what did this access key do in the last 15 days" question.
  • Data access (S3 with SQS or HTTPS notification) feeds a SIEM or OpenSearch continuously. Detective can also retrieve raw CloudTrail and VPC Flow Log records from Security Lake, so the analyst does not need to leave the console to get original evidence.

Design rule: pre-build and test your saved Athena queries (by access key, by role session, by source IP) and grant responders a read-only role for them before you need it.

3. Contain: automate the reversible, gate the destructive

EventBridge is the glue. Security Hub and GuardDuty both publish findings as events in near real time, and rules can invoke Lambda, Step Functions, Systems Manager Run Command, SNS or SQS, an API destination, or a bus in another account. A minimal rule that routes high-severity GuardDuty findings to a Step Functions state machine looks like this:

{ "source": ["aws.guardduty"], "detail-type": ["GuardDuty Finding"], "detail": { "severity": [{ "numeric": [">=", 7] }], "type": [{ "prefix": "UnauthorizedAccess:IAMUser" }, { "prefix": "AttackSequence:" }] } } 

If you route from Security Hub instead, check the event shape for your version, since the new Security Hub emits OCSF-formatted findings and your patterns will target different fields. Where both Security Hub and Security Hub CSPM rules exist, disable the overlapping ones to avoid duplicate executions.

Use a Step Functions state machine rather than a single Lambda so every step is explicit, retried and logged. Here is how two common playbooks decompose:

Step Compromised IAM credentials Compromised EC2 instance
Enrich Start a Detective investigation; query CloudTrail via Athena Pull instance metadata, tags, owner
Preserve Export recent CloudTrail activity for the principal Snapshot EBS volumes; capture memory if tooling exists
Contain (auto) Attach an explicit-deny policy and revoke active sessions; deactivate the access key Swap to an isolation security group (no ingress or egress) and tag the instance
Approve (human) Deleting keys, removing roles, anything in production-tagged accounts Stopping or terminating the instance
Notify Ticket plus chat message with the Detective link Same

Guardrails that make automation safe:

  • Reversible first. Auto-contain only with actions you can undo in one step (deny policy, isolation SG). Require approval for deletion.
  • Idempotent and tag-aware. The same finding may fire twice; exclusion tags and break-glass paths must be honored.
  • Cross-account by design. Run response from a dedicated security account with a narrowly scoped role in each workload account, and deny those roles to everyone else.
  • Start from a maintained baseline. The Automated Security Response on AWS solution provides deployable response and remediation actions driven by Security Hub, which you can adapt rather than writing everything from scratch

4. Learn: a playbook you have not run is a hypothesis

The AWS Well-Architected Framework asks for playbooks for the findings and alerts your tools generate and expects you to test them. The AWS Security Incident Response Guide follows the NIST SP 800-61 life cycle, and AWS publishes sample playbooks, including IAM credential exposure, together with simulation scripts in a public workshop repository.

A practical testing ladder:

  1. Unit-test the plumbing. Generate GuardDuty sample findings and confirm the EventBridge rule matches, the state machine starts, and the ticket and chat messages arrive. Note that sample findings do not touch real resources, so this proves routing only.
  2. Simulate in a sandbox account. Run the workshop simulation scripts (for example, credential misuse) against real test resources and verify containment actually worked: is the key denied, is the instance isolated?
  3. Run a game day. Include the people, not only the automation: who approves, who talks to the business, who owns evidence. Well-Architected recommends game days for validating readiness and capturing lessons. 4.** Close the loop**. Every exercise and every real incident should end with changes to a detection, a suppression rule, a query, or a playbook step, tracked as work items

Measure what you improve: mean time to acknowledge, mean time to contain, percentage of Critical findings with a playbook, and the pass rate of your last simulation.

A starting checklist

  • GuardDuty with Runtime Monitoring on in every account and Region you use; Security Hub aggregated across the organization.
  • Detective and Security Lake enabled before the incident, with Athena queries and read-only responder roles pre-tested.
  • Severity routing agreed in writing: page, auto-contain, or ticket.
  • At least two playbooks (IAM credentials, EC2 or container compromise) implemented as state machines with approval gates.
  • A quarterly game day with tracked improvements.

Services detect. Playbooks respond. Rehearsal is what connects the two.

Conclusion

Enabling GuardDuty, Security Hub, Detective and Security Lake gives you visibility, but it does not give you a response. What closes that gap is a small set of decisions made in advance: which findings page a human, which are contained automatically, and who approves anything destructive. Encode those decisions as EventBridge rules and Step Functions playbooks, keep the automated actions reversible, and prove the whole chain with simulations and game days rather than assuming it works.
Start small. Pick your two most likely incidents, usually compromised IAM credentials and a compromised compute workload, and take each from finding to containment end to end. Run it, record what broke, fix it, and run it again. Each pass makes the next real finding a routine event rather than an emergency.