AWS playbooks
This page covers AWS accounts and the organization above them: the logs to keep, what to search, and the playbooks for 22 incident types in seven categories. Each playbook lists where to look and the commands to contain it. Commands use AWS CLI v2.
Searches run against CloudTrail event history or a CloudTrail Lake event data store. CloudTrail Lake closed to new customers on May 31, 2026, and existing customers keep using it. Without an event data store, run the same searches in Amazon Athena over the trail's S3 logs, or in CloudWatch, which AWS names as the replacement.
Playbooks
Identity and access
Stolen credentials, taken-over accounts and the access an attacker leaves behind.
Compute and containers
Workloads, servers and clusters used or abused by an attacker.
Data and storage
Exposed, copied, encrypted or deleted data, and stolen secrets.
Network and edge
Attacks on availability and on names and endpoints you own.
Pipelines and supply chain
Build systems and image registries that reach production.
Evasion and guardrails
Logging and controls turned off to hide an attack.
Provider and accidental
Incidents with no attacker: a vendor's bug, a provider's or operator's mistake, or a provider outage.
First 15 minutes, any incident
| # | Item |
|---|---|
| 1 | Work from a responder role in a separate security account that the suspect identity cannot modify |
| 2 | Confirm the trail is logging. List trails with aws cloudtrail describe-trails, then check IsLogging in the status: aws cloudtrail get-trail-status --name <trail> |
| 3 | Export event history from us-east-1 and from every Region in use. IAM, STS global endpoint and Organizations events land in us-east-1. See Evidence |
| 4 | Record the access key ID or the role's Amazon Resource Name (ARN) from the alert. AKIA keys are long-term user keys. ASIA keys are temporary STS credentials |
| 5 | Pull GuardDuty findings, highest severity first: aws guardduty list-findings --detector-id <id> --sort-criteria '{"AttributeName":"severity","OrderBy":"DESC"}' |
| 6 | Check the AWS Health Dashboard and Support Center for a notice and case about exposed credentials |
| 7 | Snapshot volumes of involved instances and tag them with the case number before any isolation |
Native detections to playbooks
Each row names a native finding, the service that raises it, and the playbook to open first.
| Detection | Source | Open |
|---|---|---|
CredentialAccess:IAMUser/CompromisedCredentials | GuardDuty | IAM user access keys |
AttackSequence:IAM/CompromisedCredentials | GuardDuty | IAM user access keys |
UnauthorizedAccess:IAMUser/ConsoleLoginSuccess.B | GuardDuty | Console or Identity Center user |
InitialAccess:IAMUser/AnomalousBehavior | GuardDuty | Console or Identity Center user |
Persistence:IAMUser/AnomalousBehavior | GuardDuty | Roles, keys, trust policies |
Policy:IAMUser/RootCredentialUsage | GuardDuty | Root or management account |
External access finding on an IAM role, with principal.AWS outside the zone of trust | IAM Access Analyzer | Cross-account roles |
UnauthorizedAccess:IAMUser/InstanceCredentialExfiltration.OutsideAWS | GuardDuty | EC2 instance role |
UnauthorizedAccess:IAMUser/InstanceCredentialExfiltration.InsideAWS | GuardDuty | EC2 instance role |
Backdoor:EC2/C&CActivity.B | GuardDuty | EC2 instance |
AttackSequence:EKS/CompromisedCluster | GuardDuty (EKS Protection) | Amazon EKS |
PrivilegeEscalation:Kubernetes/AnomalousBehavior.WorkloadDeployed!PrivilegedContainer | GuardDuty (EKS Protection) | Amazon EKS |
CryptoCurrency:EC2/BitcoinTool.B!DNS | GuardDuty | EC2 and quota abuse |
Policy:S3/BucketPublicAccessGranted | GuardDuty | S3 |
Exfiltration:S3/AnomalousBehavior | GuardDuty (S3 Protection) | S3 |
CredentialAccess:RDS/AnomalousBehavior.SuccessfulLogin | GuardDuty (RDS Protection) | RDS and snapshots |
| External access finding on an RDS DB snapshot or DB cluster snapshot | IAM Access Analyzer | RDS and snapshots |
Impact:S3/AnomalousBehavior.Delete | GuardDuty (S3 Protection) | Deletion and ransomware |
For GetSecretValue or BatchGetSecretValue: CredentialAccess:IAMUser/AnomalousBehavior | GuardDuty | Secrets Manager and SSM |
DDoSDetected metric above zero | Shield Advanced (CloudWatch AWS/DDoSProtection) | Shield and WAF |
External access finding on an IAM role, with principal.Federated set to an OIDC provider | IAM Access Analyzer | CI/CD and OIDC trust |
| External access finding on an ECR repository | IAM Access Analyzer | ECR images |
Stealth:IAMUser/CloudTrailLoggingDisabled | GuardDuty | CloudTrail, GuardDuty, SCPs |
DefenseEvasion:IAMUser/AnomalousBehavior | GuardDuty | CloudTrail, GuardDuty, SCPs |
Impact:IAMUser/AnomalousModelInvocation | GuardDuty AI Protection | Amazon Bedrock |
Impact:IAMUser/CostHarvesting | GuardDuty AI Protection | Amazon Bedrock |
Impact:IAMUser/PromptInjection.Direct | GuardDuty AI Protection | Amazon Bedrock |
AWS documentation: GuardDuty active finding types and IAM finding types; IAM Access Analyzer supported resource types and filter keys; Shield Advanced CloudWatch metrics. GuardDuty finding types, including AI Protection, checked October 2026; other topics checked September 2026.
Before an incident
| Log | Default retention | Turn on / keep |
|---|---|---|
| CloudTrail event history | 90 days, management events only, per Region | Nothing to turn on. It keeps recording when a trail is stopped. Export what you need before day 90 |
| CloudTrail trail | Set by lifecycle rules on the destination S3 bucket | An organization trail for all Regions, created in the management account or a delegated administrator account. Member accounts cannot stop or change it. Turn on log file validation with --enable-log-file-validation |
| CloudTrail Lake event data store | One-year extendable pricing: 366 days default, up to 3,653. Seven-year pricing: 2,557 days | Closed to new customers since May 31, 2026. Existing customers keep SQL search across accounts and Regions. An organization event data store also covers new member accounts. AWS recommends CloudWatch for new setups |
CloudTrail data events for S3 (AWS::S3::Object) and Lambda (AWS::Lambda::Function) | Not logged by default. Not shown in event history | Add advanced event selectors on sensitive buckets and functions. Data events cost extra |
| S3 server access logs | Disabled by default. Delivery is best effort | Enable on sensitive buckets as a second record of object access |
| VPC Flow Logs | None until you create a flow log. Retention is set at the destination | Flow logs contain no packet content. Create one per VPC: aws ec2 create-flow-logs --resource-type VPC --resource-ids <vpc-id> --traffic-type ALL --log-destination-type s3 --log-destination arn:aws:s3:::<bucket>/<prefix>/ |
| GuardDuty findings | 90 days | Enable in every Region. Add a publishing destination to S3 so findings outlive 90 days. Enable S3 Protection for findings built on S3 data events, and AI Protection where you use Bedrock or SageMaker AI |
| IAM Access Analyzer | Shows current access. External access analysis is free | Create an external access analyzer with the organization as zone of trust, in each Region you use |
| Organizations service control policies (SCPs) | Policy changes appear in CloudTrail in us-east-1 only | Keep SCPs that deny changes to CloudTrail, GuardDuty and AWS Config, and a Region deny for Regions you do not use |
AWS documentation: CloudTrail event history, concepts, data events, organization trails, log file validation and Lake pricing; S3 server access logging; VPC Flow Logs; GuardDuty findings export; IAM Access Analyzer; Organizations CloudTrail logging. CloudTrail Lake availability change checked October 2026; other topics checked September 2026.