Learning Objectives
By the end of this chapter, you will be able to:
- Analyze workloads to determine monitoring requirements across application, network, infrastructure, and operating system layers, including identification and remediation of publicly exposed resources.
- Design and implement detective controls for known and unknown threat vectors with Amazon GuardDuty, AWS Security Hub, AWS Config, and related services, and select logging destinations and retention policies that match account-misconfiguration remediation needs.
- Build custom detection and alerting where AWS-managed services fall short, including a logging solution covering AWS CloudTrail, VPC Flow Logs, Amazon S3 server access logs, and AWS WAF logs, and a process for remediating compromised IAM credentials.
- Choose appropriate metrics, logs, and traces as data sources while applying log-integrity and confidentiality controls, and conduct penetration testing within AWS policy.
- Verify centralized log delivery to Amazon CloudWatch, AWS CloudTrail Lake, and Amazon S3, and resolve common log-delivery blockers (IAM, bucket policy, KMS key policy, resource policy).
- Troubleshoot reporting and alerting failures (alarm thresholds, bucket policies, KMS key policies) and agent-based logging issues for the CloudWatch agent and AWS Systems Manager agent.
- Verify that the appropriate telemetry is collected and analyzed against a workload's logging requirements.
- Identify and remediate detective-control configuration issues such as suppression rules and missing data sources, and troubleshoot the analytics layer over Amazon Athena, Amazon OpenSearch Service, and Amazon CloudWatch Logs Insights.
Executive Summary
- A monitoring strategy is a stack, not a checklist: every workload needs telemetry at the application layer (custom metrics, structured logs, X-Ray traces), the network layer (VPC Flow Logs, Transit Gateway flow logs, Route 53 Resolver query logs, AWS WAF logs), the infrastructure layer (CloudTrail management and data events, Config configuration items), and the OS layer (CloudWatch agent collected logs and metrics). Gaps at any layer produce blind spots that detection services cannot recover.
- AWS-managed detective controls (GuardDuty, Security Hub, Config) cover the high-frequency threat vectors and posture checks. Custom controls fill the gaps: workload-specific metric filters, EventBridge rules over CloudTrail, anomaly detection on application metrics, and dedicated finding generators for business logic that AWS cannot model.
- The logging pipeline is also a security boundary. Centralization into a log archive account with S3 Object Lock, SSE-KMS using a customer managed key, bucket-level deny rules, and CloudTrail log file validation makes the audit trail tamper-evident. Misconfigured bucket policies, KMS key policies, or resource policies are the most common reason log delivery silently fails.
- Troubleshooting monitoring is a discipline of falsification. Verify the agent posts, the role can write, the bucket accepts, the KMS key encrypts, the destination indexes, and the analytics query reads. Each link of the chain has a deterministic failure mode that the security engineer must recognize on sight.
Assumptions
- The reader operates an AWS Organizations environment with a delegated administrator for GuardDuty, Security Hub, Config, and Macie, and a log archive account that owns the central S3 buckets and CloudTrail Lake event data stores defined in Chapter 1.
- The reader is familiar with the incident-response lifecycle, the quarantine security group pattern, EBS snapshot capture, and the security tooling account architecture established in Chapter 1.
- All examples use the AWS CLI v2, CloudFormation, and JSON policy syntax. Service-managed encryption defaults (SSE-S3) are not acceptable for log buckets; customer managed KMS keys are assumed.
