KMS SSM
LearningTree · AWS · Security

AWS Security —
Defense in Depth

Not a checklist of services — a layered defense strategy. AWS has 10+ security services. Understanding which layer each protects — identity, encryption, network, detection — is the real skill for both production architecture and certification exams.

The AWS Security Layer Model

AWS security is defense in depth — multiple layers, each protecting against different threats. If one layer fails, others still hold. The secret: never rely on a single security control. Layer identity + encryption + network + detection.

How AWS Security Services protect different layers
Internet Users + Attackers SHIELD DDoS Protection L3/L4 filtering WAF App Firewall L7 SQLi/XSS/bots ACM TLS Certificates Encryption in transit IAM + KMS Secrets Mgr Identity • Encryption Credential Mgmt Data at rest • Access GUARDDUTY — Continuous Threat Detection (ML + Threat Intel) CloudTrail • VPC Flow • DNS • S3 • EKS • Lambda Traffic flows left → right through security layers Each layer catches what the previous one missed
Security Service Categories — What Each Protects
Layer Service Protects One-Liner
① IdentityIAMWho can do whatUsers, roles, policies, least privilege
② EncryptionKMSData at restKey management, envelope encryption, HSM-backed
② CredentialsSecrets ManagerPasswords & keysStore, rotate, retrieve credentials securely
③ TransportACMData in transitFree TLS certs, auto-renewal, HTTPS everywhere
④ Network (L7)WAFHTTP attacksSQLi, XSS, bots, rate limiting, geo-blocking
④ Network (L3/4)ShieldDDoS attacksVolumetric floods, SYN/UDP attacks
⑤ DetectionGuardDutyThreats & anomaliesML-based threat detection, zero infrastructure
⑥ HardwareCloudHSMKey security (FIPS L3)Dedicated HSM, regulatory compliance
⑦ VulnerabilityInspectorCVEs in workloadsEC2 / ECR / Lambda CVE scanning, network exposure
⑧ Data SecurityMacieSensitive data in S3PII / PCI / HIPAA discovery, bucket misconfiguration
🧠 Key Insight

These services are not alternatives — they protect different layers. A secure production system uses all of them together: IAM (identity) + KMS (encryption) + ACM (TLS) + WAF (app firewall) + Shield (DDoS) + GuardDuty (detection) + Inspector (CVE scanning) + Macie (data discovery).

Decision Guide — When to Use What
You Need… Use Why
Control who can access AWS resourcesIAMPolicies, roles, conditions, federation, least privilege
Encrypt data at rest (S3, EBS, RDS)KMSManaged keys, envelope encryption, CloudTrail audit
Store & rotate database passwords/API keysSecrets ManagerAuto-rotation, IAM-controlled, never hardcode creds
Free HTTPS certificates with auto-renewalACMDNS validation, zero-touch renewal, ALB/CloudFront
Block SQL injection, XSS, bots, bad IPsWAFLayer 7 HTTP inspection, managed rules, rate limiting
DDoS protection with response teamShield Advanced24/7 SRT, cost protection, L7 DDoS mitigation
Detect compromised credentials or malwareGuardDutyML + threat intel, zero config, $5-20/month
Dedicated HSM, FIPS 140-2 Level 3CloudHSMSingle-tenant hardware, regulatory compliance
Scan EC2 / containers / Lambda for CVEsInspectorContinuous, automated, agentless for ECR/Lambda
Find PII / sensitive data in S3MacieML-based discovery, GDPR/HIPAA/PCI compliance
Store config safely (non-secret, free)SSM Parameter StoreHierarchical config, free tier, SecureString for sensitive
Architecture Patterns
3 Common Security Patterns — Public Web · Internal · Regulated
PATTERN 1: Public Web App CloudFront + ACM (HTTPS) Shield Standard (auto DDoS) WAF (SQLi + XSS + rate) IAM + KMS + Secrets Mgr GuardDuty (detection) ~$30–50/month PATTERN 2: Internal API ALB + ACM (internal TLS) WAF IP allowlist + rate rules IAM roles, no public access KMS + Secrets Mgr for creds GuardDuty (catch insider threats) ~$15–25/month PATTERN 3: Regulated (PCI) CloudFront + Shield Advanced WAF (custom + OWASP rules) CloudHSM (FIPS L3) + KMS Secrets Mgr + ACM Private CA GuardDuty + Security Hub + auto-response ~$4,200+/month
💡 Production Minimum

Every production account should have: Shield Standard (free) + GuardDuty ($5–20/mo) + IAM (free) + KMS ($1/key) + ACM (free) + WAF (if public, ~$10–30/mo). Total: under $50/month for excellent layered security.

Exam Insights

🎯 Exam Keywords → Service

  • “least privilege, who can access what, cross-account” → IAM
  • “encrypt S3/EBS/RDS, envelope encryption, key rotation” → KMS
  • “store database password, rotate credentials automatically” → Secrets Manager
  • “free HTTPS certificate, auto-renewal, CloudFront TLS” → ACM
  • “block SQL injection, XSS, rate limit HTTP requests” → WAF
  • “DDoS protection, response team, cost protection” → Shield Advanced
  • “detect compromised credentials, crypto mining, suspicious API” → GuardDuty
  • “FIPS 140-2 Level 3, dedicated HSM, single-tenant” → CloudHSM
  • “scan EC2 for CVEs, container image vulnerabilities, Lambda packages” → Inspector
  • “discover PII in S3, GDPR compliance, find sensitive data” → Macie
  • “store config cheaply, hierarchical parameters” → SSM Parameter Store
  • “certificate for CloudFront” → ACM in us-east-1

⚠️ Common Exam Traps

  • KMS ≠ Secrets Manager — KMS encrypts data; Secrets Manager stores & rotates credentials
  • Secrets Manager ≠ Parameter Store — SM has rotation + cross-account; PS is free + hierarchical
  • WAF ≠ Shield — WAF = Layer 7 HTTP content; Shield = Layer 3/4 volumetric DDoS
  • Shield Standard is always on (free); Shield Advanced costs $3K/month (opt-in)
  • ACM public certs cannot be exported to EC2 — use ALB/CloudFront for TLS termination
  • KMS = FIPS Level 2; CloudHSM = FIPS Level 3 — don't confuse them
  • GuardDuty detects threats; it does NOT block anything — you must automate responses
  • KMS controls who can decrypt data — both needed
  • Cross-account Secrets Manager requires custom CMK (aws/secretsmanager key won't work)
  • ACM CloudFront certificates MUST be in us-east-1 regardless of app region
  • Inspector finds vulnerabilities before exploitation; GuardDuty detects threats during/after โ€” use both
  • Macie is S3-only โ€” it cannot scan EBS, EFS, RDS, or other storage
  • Inspector requires SSM Agent on EC2; ECR and Lambda are agentless
Explore Each Service