Skip to content

Security_services

Security Monitoring & Investigation Services

Section titled “Security Monitoring & Investigation Services”

AWS provides centralized security services for monitoring, alerting, and investigating security issues across your AWS environment.

AWS Security Monitoring Overview
+------------------------------------------------------------------+
| |
| +------------------------+ |
| | Security Monitoring | |
| +------------------------+ |
| | |
| +---------------------+---------------------+ |
| | | | |
| v v v |
| +----------+ +----------+ +----------+ |
| | Security | | Detective| | GuardDuty| |
| | Hub | | | | | |
| | | | - Invest | | - Threat | |
| | - Central| | igation| | Detect | |
| | - Aggreg | | - Graph | | - ML/AI | |
| | - Comply | | - Time | | - Auto | |
| +----------+ +----------+ +----------+ |
| |
+------------------------------------------------------------------+
FeatureSecurity HubDetectiveGuardDuty
Primary UseSecurity postureInvestigationThreat detection
Data SourceMultiple servicesCloudTrail, VPC FlowMultiple sources
AnalysisAggregationGraph analysisML-based detection
PricingPer checkPer data ingestedPer data analyzed
IntegrationStandards, findingsSecurity HubSecurity Hub

AWS Security Hub Architecture
+------------------------------------------------------------------+
| |
| +------------------------+ |
| | AWS Security Hub | |
| +------------------------+ |
| | |
| +---------------------+---------------------+ |
| | | | |
| v v v |
| +----------+ +----------+ +----------+ |
| | Findings | | Standards| | Insights | |
| | | | | | | |
| | - Aggreg | | - CIS | | - Filter | |
| | - Correl | | - PCI-DSS| | - Group | |
| | - Prior | | - Custom | | - Action | |
| +----------+ +----------+ +----------+ |
| | | | |
| v v v |
| +----------------------------------------------------------+ |
| | Integrated Services | |
| | +--------+ +--------+ +--------+ +--------+ | |
| | |GuardDuty| | Config | | Inspector| | Macie | | |
| | +--------+ +--------+ +--------+ +--------+ | |
| | +--------+ +--------+ +--------+ +--------+ | |
| | | IAM | | Firewall| | Trusted | | Audit | | |
| | | Access | | Manager | | Advisor | | Manager| | |
| | +--------+ +--------+ +--------+ +--------+ | |
| +----------------------------------------------------------+ |
| |
+------------------------------------------------------------------+
Security Hub Standards
+------------------------------------------------------------------+
| |
| AWS Foundational Security Best Practices |
| +------------------------------------------------------------+ |
| | - AWS-developed security controls | |
| | - Covers core AWS services | |
| | - Updated regularly | |
| +------------------------------------------------------------+ |
| |
| CIS AWS Foundations Benchmark |
| +------------------------------------------------------------+ |
| | - Center for Internet Security guidelines | |
| | - Level 1 and Level 2 profiles | |
| | - Comprehensive security checks | |
| +------------------------------------------------------------+ |
| |
| PCI DSS Standard |
| +------------------------------------------------------------+ |
| | - Payment Card Industry Data Security Standard | |
| | - Required for payment processing | |
| | - 12 requirement categories | |
| +------------------------------------------------------------+ |
| |
| NIST SP 800-53 Rev. 5 |
| +------------------------------------------------------------+ |
| | - National Institute of Standards and Technology | |
| | - Federal information systems | |
| | - Comprehensive controls | |
| +------------------------------------------------------------+ |
| |
| ISO/IEC 27001 |
| +------------------------------------------------------------+ |
| | - International security standard | |
| | - Information security management | |
| +------------------------------------------------------------+ |
| |
+------------------------------------------------------------------+
Security Hub Findings
+------------------------------------------------------------------+
| |
| Finding Structure |
| +------------------------------------------------------------+ |
| | { | |
| | "SchemaVersion": "2018-10-08", | |
| | "Id": "arn:aws:securityhub:...", | |
| | "ProductArn": "arn:aws:securityhub:...", | |
| | "ProductName": "GuardDuty", | |
| | "CompanyName": "Amazon", | |
| | "Description": "Unauthorized access attempt", | |
| | "Title": "UnauthorizedAccess:IAMUser/...", | |
| | "Severity": { | |
| | "Label": "HIGH", | |
| | "Normalized": 70 | |
| | }, | |
| | "Resources": [...], | |
| | "Remediation": {...}, | |
| | "Compliance": {...} | |
| | } | |
| +------------------------------------------------------------+ |
| |
| Severity Levels |
| +------------------------------------------------------------+ |
| | CRITICAL (90) - Immediate action required | |
| | HIGH (70) - Significant risk | |
| | MEDIUM (40) - Moderate risk | |
| | LOW (10) - Low risk | |
| | INFORMATIONAL (0) - Informational only | |
| +------------------------------------------------------------+ |
| |
+------------------------------------------------------------------+
Security Hub Insights
+------------------------------------------------------------------+
| |
| Pre-built Insights |
| +------------------------------------------------------------+ |
| | | |
| | - Findings with high severity | |
| | - Findings from GuardDuty | |
| | - Findings from IAM Access Analyzer | |
| | - Findings from Amazon Inspector | |
| | - Findings from AWS Firewall Manager | |
| | - Findings with failed compliance status | |
| | | |
| +------------------------------------------------------------+ |
| |
| Custom Insights |
| +------------------------------------------------------------+ |
| | | |
| | Group by: | |
| | +------------------------------------------------------+ | |
| | | - Resource type | | |
| | | - AWS account | | |
| | | - Severity | | |
| | | - Compliance status | | |
| | | - Product name (source service) | | |
| | | - Region | | |
| | +------------------------------------------------------+ | |
| | | |
| | Filter by: | |
| | +------------------------------------------------------+ | |
| | | - Title contains | | |
| | | - Description contains | | |
| | | - Created at date range | | |
| | | - Updated at date range | | |
| | | - Workflow status | | |
| | +------------------------------------------------------+ | |
| | | |
| +------------------------------------------------------------+ |
| |
+------------------------------------------------------------------+
Terminal window
# Enable Security Hub
aws securityhub enable-security-hub \
--enable-default-standards
# Get enabled standards
aws securityhub get-enabled-standards
# Get security controls
aws securityhub describe-security-controls
# List findings
aws securityhub get-findings \
--filters '{"SeverityLabel":[{"Value":"HIGH","Comparison":"EQUALS"}]}'
# Update finding status
aws securityhub batch-update-findings \
--finding-identifiers '{"Id":"arn:aws:securityhub:...","ProductArn":"arn:aws:securityhub:..."}' \
--note '{"Text":"Investigated and resolved","UpdatedBy":"security-team"}' \
--workflow '{"Status":"RESOLVED"}'
# Create insight
aws securityhub create-insight \
--name "High Severity Findings" \
--filters '{"SeverityLabel":[{"Value":"HIGH","Comparison":"EQUALS"}]}' \
--group-by-attribute "ResourceId"
# Enable security standard
aws securityhub batch-enable-standards \
--standards-subscription-requests '[{"StandardsArn":"arn:aws:securityhub:..."}]'
# Disable security standard
aws securityhub batch-disable-standards \
--standards-subscription-arns '["arn:aws:securityhub:..."]'

Amazon Detective Architecture
+------------------------------------------------------------------+
| |
| +------------------------+ |
| | Amazon Detective | |
| +------------------------+ |
| | |
| +---------------------+---------------------+ |
| | | | |
| v v v |
| +----------+ +----------+ +----------+ |
| | Data | | Behavior | | Invest | |
| | Sources | | Graph | | igation | |
| | | | | | | |
| | - Cloud | | - Entity | | - Search | |
| | Trail | | Relat | | - Visual | |
| | - VPC | | - Time | | - Scope | |
| | Flow | | Line | | | |
| +----------+ +----------+ +----------+ |
| |
+------------------------------------------------------------------+
Detective Data Sources
+------------------------------------------------------------------+
| |
| AWS CloudTrail |
| +------------------------------------------------------------+ |
| | - API call history | |
| | - User and role activity | |
| | - Resource changes | |
| | - Management events | |
| +------------------------------------------------------------+ |
| |
| VPC Flow Logs |
| +------------------------------------------------------------+ |
| | - Network traffic patterns | |
| | - Connection details | |
| | - Source/destination IPs | |
| | - Port and protocol information | |
| +------------------------------------------------------------+ |
| |
| Security Hub Findings |
| +------------------------------------------------------------+ |
| | - GuardDuty findings | |
| | - Security Hub findings | |
| | - Correlated with other data | |
| +------------------------------------------------------------+ |
| |
+------------------------------------------------------------------+
Detective Investigation Features
+------------------------------------------------------------------+
| |
| Entity Behavior Graph |
| +------------------------------------------------------------+ |
| | | |
| | +--------+ +--------+ +--------+ | |
| | | IAM | --> | EC2 | --> | S3 | | |
| | | User | | Instance| | Bucket | | |
| | +--------+ +--------+ +--------+ | |
| | | | | | |
| | v v v | |
| | +--------+ +--------+ +--------+ | |
| | | Role | | Security| | Object | | |
| | | | | Group | | | | |
| | +--------+ +--------+ +--------+ | |
| | | |
| | Shows relationships and interactions between entities | |
| | | |
| +------------------------------------------------------------+ |
| |
| Timeline Analysis |
| +------------------------------------------------------------+ |
| | | |
| | Time: 00:00 04:00 08:00 12:00 16:00 20:00 24:00 | |
| | | | | | | | | | |
| | v v v v v v v | |
| | Events: ======******=======******======******====== | |
| | ^ ^ ^ | |
| | | | | | |
| | Login API Call Finding | |
| | | |
| +------------------------------------------------------------+ |
| |
| Finding Investigation |
| +------------------------------------------------------------+ |
| | | |
| | 1. Start with Security Hub finding | |
| | 2. View affected entities | |
| | 3. Explore entity relationships | |
| | 4. Analyze timeline of events | |
| | 5. Identify root cause | |
| | 6. Document findings | |
| | | |
| +------------------------------------------------------------+ |
| |
+------------------------------------------------------------------+
Terminal window
# Create behavior graph
aws detective create-graph
# Create member account
aws detective create-members \
--graph-arn "arn:aws:detective:..." \
--accounts '[{"AccountId":"123456789012","EmailAddress":"admin@example.com"}]'
# List members
aws detective list-members \
--graph-arn "arn:aws:detective:..."
# Get investigation results
aws detective get-investigation \
--graph-arn "arn:aws:detective:..." \
--investigation-id "investigation-123"
# List investigations
aws detective list-investigations \
--graph-arn "arn:aws:detective:..."
# Start investigation
aws detective start-investigation \
--graph-arn "arn:aws:detective:..." \
--entity-arn "arn:aws:iam::..."
# Delete graph
aws detective delete-graph \
--graph-arn "arn:aws:detective:..."

Amazon GuardDuty Architecture
+------------------------------------------------------------------+
| |
| +------------------------+ |
| | Amazon GuardDuty | |
| +------------------------+ |
| | |
| +---------------------+---------------------+ |
| | | | |
| v v v |
| +----------+ +----------+ +----------+ |
| | Data | | Threat | | Finding | |
| | Sources | | Detection| | Types | |
| | | | | | | |
| | - Cloud | | - ML/AI | | - Recon | |
| | Trail | | - Anomaly| | - Comp | |
| | - VPC | | - Sign | | - Access | |
| | Flow | | atures | | - Crypto | |
| | - DNS | | | | | |
| +----------+ +----------+ +----------+ |
| |
+------------------------------------------------------------------+
GuardDuty Finding Types
+------------------------------------------------------------------+
| |
| Reconnaissance Findings |
| +------------------------------------------------------------+ |
| | - Port probe detection | |
| | - DNS exfiltration | |
| | - API call anomalies | |
| | - Network enumeration | |
| +------------------------------------------------------------+ |
| |
| Instance Compromise Findings |
| +------------------------------------------------------------+ |
| | - EC2 instance credential theft | |
| | - Cryptocurrency mining | |
| | - Backdoor access | |
| | - Malware/C2 communication | |
| | - Data exfiltration | |
| +------------------------------------------------------------+ |
| |
| Account Compromise Findings |
| +------------------------------------------------------------+ |
| | - Unauthorized access | |
| | - IAM anomaly | |
| | - Root account usage | |
| | - MFA disable | |
| | - Unusual API activity | |
| +------------------------------------------------------------+ |
| |
| Container Security Findings |
| +------------------------------------------------------------+ |
| | - EKS cluster anomalies | |
| | - Container runtime security | |
| | - Privilege escalation | |
| +------------------------------------------------------------+ |
| |
+------------------------------------------------------------------+
GuardDuty Protection Plans
+------------------------------------------------------------------+
| |
| S3 Protection |
| +------------------------------------------------------------+ |
| | - Monitor S3 API operations | |
| | - Detect data exfiltration attempts | |
| | - Identify unusual access patterns | |
| +------------------------------------------------------------+ |
| |
| EKS Protection |
| +------------------------------------------------------------+ |
| | - Monitor Kubernetes audit logs | |
| | - Detect suspicious pod activity | |
| | - Identify privilege escalation | |
| +------------------------------------------------------------+ |
| |
| Malware Protection |
| +------------------------------------------------------------+ |
| | - Scan EC2 instances for malware | |
| | - Scan EBS volumes | |
| | - Automated scanning on findings | |
| +------------------------------------------------------------+ |
| |
| RDS Protection |
| +------------------------------------------------------------+ |
| | - Monitor RDS login activity | |
| | - Detect brute force attempts | |
| | - Identify unusual access patterns | |
| +------------------------------------------------------------+ |
| |
+------------------------------------------------------------------+
Terminal window
# Create detector
aws guardduty create-detector \
--enable \
--finding-publishing-frequency SIX_HOURS
# Create member accounts
aws guardduty create-members \
--detector-id "abc123" \
--account-details '[{"AccountId":"123456789012","Email":"admin@example.com"}]'
# List detectors
aws guardduty list-detectors
# Get detector
aws guardduty get-detector \
--detector-id "abc123"
# List findings
aws guardduty list-findings \
--detector-id "abc123"
# Get findings
aws guardduty get-findings \
--detector-id "abc123" \
--finding-ids '["finding-1","finding-2"]'
# Archive findings
aws guardduty archive-findings \
--detector-id "abc123" \
--finding-ids '["finding-1"]'
# Create filter
aws guardduty create-filter \
--detector-id "abc123" \
--name "HighSeverityFilter" \
--finding-criteria '{"Criterion":{"severity":{"Eq":["8","9"]}}}'
# Enable protection plans
aws guardduty update-detector \
--detector-id "abc123" \
--features '[{"Name":"S3_DATA_EVENTS","Status":"ENABLED"}]'

Security Hub Integration Architecture
+------------------------------------------------------------------+
| |
| +------------------------+ |
| | AWS Security Hub | |
| | (Central Hub) | |
| +------------------------+ |
| | |
| +---------------------+---------------------+ |
| | | | | |
| v v v v |
| +----------+ +----------+ +----------+ +----------+ |
| | GuardDuty| | Inspector| | Macie | | Config | |
| +----------+ +----------+ +----------+ +----------+ |
| | | | | |
| +------------+------------+------------+ |
| | |
| v |
| +------------------------+ |
| | Amazon Detective | |
| | (Investigation) | |
| +------------------------+ |
| | |
| v |
| +------------------------+ |
| | Response Actions | |
| +------------------------+ |
| | |
| +---------------------+---------------------+ |
| | | | |
| v v v |
| +----------+ +----------+ +----------+ |
| | EventBridge| | SNS | | Lambda | |
| | (Routing) | | (Notify) | | (Remediate)| |
| +----------+ +----------+ +----------+ |
| |
+------------------------------------------------------------------+
Automated Security Response
+------------------------------------------------------------------+
| |
| 1. Finding Generated |
| +------------------------------------------------------------+ |
| | GuardDuty/Inspector/Macie --> Security Hub Finding | |
| +------------------------------------------------------------+ |
| | |
| v |
| 2. EventBridge Rule Match |
| +------------------------------------------------------------+ |
| | Event pattern matches finding criteria | |
| +------------------------------------------------------------+ |
| | |
| v |
| 3. Action Triggered |
| +------------------------------------------------------------+ |
| | | |
| | Options: | |
| | +------------------------------------------------------+ | |
| | | - SNS notification | | |
| | | - Lambda function (remediation) | | |
| | | - Systems Manager Automation | | |
| | | - Step Functions workflow | | |
| | +------------------------------------------------------+ | |
| | | |
| +------------------------------------------------------------+ |
| | |
| v |
| 4. Remediation Executed |
| +------------------------------------------------------------+ |
| | | |
| | Examples: | |
| | +------------------------------------------------------+ | |
| | | - Block compromised IAM user | | |
| | | - Isolate EC2 instance | | |
| | | - Revoke compromised credentials | | |
| | | - Update security group rules | | |
| | +------------------------------------------------------+ | |
| | | |
| +------------------------------------------------------------+ |
| | |
| v |
| 5. Finding Updated |
| +------------------------------------------------------------+ |
| | Update finding status in Security Hub | |
| +------------------------------------------------------------+ |
| |
+------------------------------------------------------------------+

Security Hub Best Practices
+------------------------------------------------------------------+
| |
| 1. Enable multiple security standards |
| +------------------------------------------------------------+ |
| | - CIS AWS Foundations Benchmark | |
| | - AWS Foundational Security Best Practices | |
| | - Industry-specific standards (PCI, NIST) | |
| +------------------------------------------------------------+ |
| |
| 2. Configure automated remediation |
| +------------------------------------------------------------+ |
| | - Use EventBridge for finding routing | |
| | - Implement Lambda for automated response | |
| | - Use Systems Manager Automation | |
| +------------------------------------------------------------+ |
| |
| 3. Create custom insights |
| +------------------------------------------------------------+ |
| | - Group findings by business impact | |
| | - Filter by critical resources | |
| | - Track remediation progress | |
| +------------------------------------------------------------+ |
| |
| 4. Integrate with incident response |
| +------------------------------------------------------------+ |
| | - Connect to ticketing systems | |
| | - Enable notifications for critical findings | |
| | - Document investigation procedures | |
| +------------------------------------------------------------+ |
| |
+------------------------------------------------------------------+
GuardDuty Best Practices
+------------------------------------------------------------------+
| |
| 1. Enable all protection plans |
| +------------------------------------------------------------+ |
| | - S3 Protection | |
| | - EKS Protection | |
| | - Malware Protection | |
| | - RDS Protection | |
| +------------------------------------------------------------+ |
| |
| 2. Configure trusted IP lists |
| +------------------------------------------------------------+ |
| | - Add known safe IP addresses | |
| | - Reduce false positives | |
| +------------------------------------------------------------+ |
| |
| 3. Set up automated responses |
| +------------------------------------------------------------+ |
| | - Integrate with Security Hub | |
| | - Use EventBridge for automation | |
| +------------------------------------------------------------+ |
| |
| 4. Monitor and tune findings |
| +------------------------------------------------------------+ |
| | - Review findings regularly | |
| | - Archive false positives | |
| | - Adjust severity thresholds | |
| +------------------------------------------------------------+ |
| |
+------------------------------------------------------------------+

Common Security Hub Issues
+------------------------------------------------------------------+
| |
| Issue 1: Findings not appearing in Security Hub |
| +------------------------------------------------------------+ |
| | Cause: Service not enabled or integrated | |
| | Solution: Enable service and configure product integration | |
| +------------------------------------------------------------+ |
| |
| Issue 2: High number of findings overwhelming |
| +------------------------------------------------------------+ |
| | Cause: Too many enabled standards or controls | |
| | Solution: Disable irrelevant controls, create filters | |
| +------------------------------------------------------------+ |
| |
| Issue 3: Cross-account findings not visible |
| +------------------------------------------------------------+ |
| | Cause: Member accounts not configured | |
| | Solution: Configure Security Hub member accounts | |
| +------------------------------------------------------------+ |
| |
| Issue 4: Detective graph not showing data |
| +------------------------------------------------------------+ |
| | Cause: Insufficient data ingestion period | |
| | Solution: Wait for data collection (48+ hours) | |
| +------------------------------------------------------------+ |
| |
+------------------------------------------------------------------+

Exam Tip

Key Exam Points
+------------------------------------------------------------------+
| |
| 1. Security Hub is the central aggregation point for findings |
| |
| 2. Security Hub supports CIS, PCI-DSS, NIST, ISO 27001 |
| |
| 3. Detective uses graph analysis for investigation |
| |
| 4. GuardDuty uses ML/AI for threat detection |
| |
| 5. GuardDuty data sources: CloudTrail, VPC Flow Logs, DNS |
| |
| 6. GuardDuty findings are sent to Security Hub |
| |
| 7. Detective requires 48+ hours of data for analysis |
| |
| 8. Security Hub findings have severity levels (CRITICAL to LOW) |
| |
| 9. Use EventBridge for automated response to findings |
| |
| 10. GuardDuty protection plans: S3, EKS, Malware, RDS |
| |
+------------------------------------------------------------------+

Chapter 29 Summary
+------------------------------------------------------------------+
| |
| AWS Security Hub |
| +------------------------------------------------------------+ |
| | - Central security findings aggregation | |
| | - Security standards compliance | |
| | - Custom insights and filtering | |
| | - Cross-account visibility | |
| +------------------------------------------------------------+ |
| |
| Amazon Detective |
| +------------------------------------------------------------+ |
| | - Security investigation and analysis | |
| | - Entity behavior graph | |
| | - Timeline analysis | |
| | - Integration with Security Hub | |
| +------------------------------------------------------------+ |
| |
| Amazon GuardDuty |
| +------------------------------------------------------------+ |
| | - Continuous threat detection | |
| | - ML/AI-based anomaly detection | |
| | - Multiple protection plans | |
| | - Automated findings to Security Hub | |
| +------------------------------------------------------------+ |
| |
+------------------------------------------------------------------+

Previous Chapter: Chapter 28: AWS WAF, Shield & Firewall Next Chapter: Chapter 30: Compliance, Auditing & Governance