Time to Complete: 60-75 minutes | Exam Weight: ~20-25%
ENCRYPTION KEYS? → KMS (Key Management Service)
SECRETS/PASSWORDS? → Secrets Manager
CERTIFICATES? → ACM (Certificate Manager)
FIREWALL? → Security Groups, NACLs, WAF
DDoS PROTECTION? → Shield (Standard/Advanced)
COMPLIANCE? → CloudTrail, Config, Inspector
IDENTITY? → IAM, Cognito, Directory Service
DETECTION? → GuardDuty, Macie, Detective
Memory Aid: "Keys Secure Secrets, While Controlling Guarding Identity"
| Service | Type | Use Case | Key Management |
|---|---|---|---|
| KMS | Encryption keys | Encrypt AWS resources | AWS managed or Customer |
| CloudHSM | Hardware module | Regulatory compliance | Customer only |
| Secrets Manager | Secret rotation | DB credentials, API keys | Auto-rotation |
| Parameter Store | Config/secrets | App config, simple secrets | Free tier available |
| ACM | SSL/TLS certs | HTTPS/TLS | AWS managed, auto-renew |
| Service | What It Does | Detects | Cost Model |
|---|---|---|---|
| GuardDuty | Threat detection | Malicious activity, anomalies | Events analyzed |
| Macie | Data security | Sensitive data in S3 (PII) | GB scanned |
| Inspector | Vulnerability assessment | EC2/ECR vulnerabilities | Assessments run |
| Detective | Security investigation | Root cause analysis | GB ingested |
| Security Hub | Central dashboard | Aggregates findings | Checks run |
AWS MANAGED KEYS
├── Free
├── Auto-rotation every year (mandatory)
├── Format: aws/service-name (e.g., aws/s3)
└── Use: Default encryption
CUSTOMER MANAGED KEYS (CMK)
├── $1/month per key
├── Optional auto-rotation (yearly)
├── Full control over key policies
├── Can be disabled/deleted
└── Use: Custom requirements, compliance
AWS OWNED KEYS
├── Free
├── Used by AWS for multiple accounts
├── No visibility or control
└── Use: DynamoDB encryption (default)
Memory Aid: "AMC" = AWS (free, auto), Customer (control, cost), Owned (opaque)
ENCRYPTION AT REST
├── KMS for most AWS services
├── S3: SSE-S3, SSE-KMS, SSE-C
├── EBS: Encrypted volumes
├── RDS: Encryption at creation
└── DynamoDB: Server-side encryption
ENCRYPTION IN TRANSIT
├── SSL/TLS (HTTPS)
├── VPN (Site-to-Site)
├── Direct Connect + VPN
├── Client-side encryption
└── AWS services use TLS by default
| Service | Layer | Purpose | Use Case |
|---|---|---|---|
| WAF | Layer 7 | Web app firewall | SQL injection, XSS protection |
| Shield Standard | Layer 3/4 | DDoS protection | Free, automatic |
| Shield Advanced | Layer 3/4/7 | Enhanced DDoS | $3K/month, 24/7 support |
| Firewall Manager | Multiple | Central management | Multi-account security |
WAF Rules:
- IP addresses
- HTTP headers/body
- Query strings
- Geographic location
- Rate limiting
| Feature | CloudTrail | Config |
|---|---|---|
| Purpose | Who did what | Resource compliance |
| Tracks | API calls | Resource configuration changes |
| Question | "Who launched this EC2?" | "Is S3 bucket encrypted?" |
| Output | Event logs | Configuration snapshots |
| Rules | N/A | Compliance rules |
| Remediation | No | Yes (with Systems Manager) |
Memory Aid: "Trail = Trail of actions, Config = Configuration compliance"
Q: Need to encrypt unencrypted EBS volume ✅ ANSWER: Create snapshot → Copy with encryption → Create volume from encrypted snapshot
Q: Automate database password rotation every 30 days ✅ ANSWER: AWS Secrets Manager with automatic rotation (not Parameter Store)
Q: Web application needs DDoS protection
- Basic (free): Shield Standard (auto-enabled)
- Advanced: Shield Advanced + WAF + Route 53
Q: Get alerts on suspicious activity in AWS account ✅ ANSWER: Enable GuardDuty (threat detection)
Q: Discover S3 buckets containing credit card numbers or PII ✅ ANSWER: Amazon Macie
Q: Track who deleted an S3 object ✅ ANSWER: CloudTrail (logs all API calls)
Q: Verify all S3 buckets are encrypted and private ✅ ANSWER: AWS Config with compliance rules
Q: Account A needs to access resources in Account B ✅ ANSWER: IAM roles with trust policy (not sharing credentials)
HOW IT WORKS:
1. Data Encryption Key (DEK) encrypts data
2. CMK encrypts DEK
3. Store encrypted data + encrypted DEK together
WHY:
├── Faster (encrypt locally)
├── Less network traffic
├── Better performance for large data
└── CMK never leaves KMS
1. IAM Policies (user permissions)
2. Bucket Policies (resource-based)
3. S3 Block Public Access (account-level)
4. Encryption (SSE-S3, SSE-KMS, SSE-C)
5. Versioning + MFA Delete
6. VPC Endpoints (private access)
7. CloudTrail (audit access)
8. Macie (detect sensitive data)
| Feature | Secrets Manager | Parameter Store |
|---|---|---|
| Rotation | ✅ Automatic (RDS, etc.) | ❌ Manual |
| Cost | $$$ ($0.40/secret/month) | Free (standard), $ (advanced) |
| Integration | RDS, Redshift, DocumentDB | Any service |
| Cross-region | Replicate secrets | Must copy manually |
| Use Case | DB credentials, API keys | App config, simple values |
Decision: Need rotation? → Secrets Manager, Otherwise → Parameter Store
- Max request rate: 5,500/10,000/30,000 (depends on key type)
- Max data size: 4 KB (use envelope encryption for larger)
- Auto-rotation: Every 365 days (CMK only)
- Key deletion: 7-30 day waiting period
- Regions: Multi-region keys available
✅ Enable in all regions ✅ Enable log file validation (integrity) ✅ Encrypt logs with KMS ✅ Store in S3 with lifecycle policy ✅ Monitor with CloudWatch Logs ✅ Use Organizations trail (multi-account) ✅ Enable for management + data events
- VPC Flow Logs
- CloudTrail event logs
- DNS logs
- EKS audit logs
- S3 data events
- RDS login events
- EBS volume data
- Lambda network activity
- PCI DSS - Payment cards
- HIPAA - Healthcare
- SOC 1/2/3 - Security controls
- ISO 27001 - Information security
- FedRAMP - US government
- GDPR - EU data protection
✅ Identity: MFA on root + all users ✅ Access: Least privilege, use roles ✅ Detection: GuardDuty, CloudTrail, Config ✅ Infrastructure: Security groups, NACLs ✅ Data: Encrypt at rest + in transit ✅ Incident: CloudTrail, backup, playbooks ✅ Compliance: Config rules, automated checks
1. What to encrypt?
DATA AT REST → KMS, SSE
DATA IN TRANSIT → TLS/SSL, VPN
2. Who manages keys?
AWS → AWS managed keys (free)
YOU → Customer managed keys ($)
COMPLIANCE → CloudHSM (dedicated)
3. For S3, what level of control?
SIMPLE → SSE-S3
AUDIT TRAIL → SSE-KMS
YOUR KEYS → SSE-C
BEFORE UPLOAD → Client-side
ACM (AWS Certificate Manager)
├── Free SSL/TLS certificates
├── Auto-renewal
├── Integration: ALB, CloudFront, API Gateway
├── Regional (except CloudFront = us-east-1)
└── Cannot export private key
IMPORT CERTIFICATES
├── Third-party certificates
├── Manual renewal
├── Can export
└── Use when: Existing certs, special requirements
❌ Not enabling MFA on root account ❌ Using root account for daily tasks ❌ Sharing IAM credentials ❌ Forgetting CloudTrail in all regions ❌ Not encrypting sensitive data ❌ Public S3 buckets with sensitive data ❌ Using Parameter Store when rotation needed ❌ Not enabling GuardDuty for threat detection ❌ Storing secrets in code or environment variables ❌ Not using Shield Standard (it's free!)
Quick Questions (Answers at bottom)
- What rotates DB passwords automatically? __
- Which service detects PII in S3? __
- Can you encrypt existing unencrypted RDS? __
- What tracks API calls? __
- What's the cost of Shield Standard? __
- KMS key max data size? __
- What detects threats using ML? __
- What checks resource compliance? __
AWS RESPONSIBILITY (Security OF the cloud)
├── Physical security of data centers
├── Hardware/infrastructure
├── Network infrastructure
├── Managed service operations
└── Hypervisor
CUSTOMER RESPONSIBILITY (Security IN the cloud)
├── Data encryption (at rest & in transit)
├── IAM (users, groups, roles, policies)
├── OS patches and updates
├── Application security
├── Network configuration (SG, NACL)
├── Firewall configuration
└── Compliance validation
- Service Control Policies (SCP): Limit permissions
- Consolidated billing: Security cost tracking
- CloudTrail: Organization trail
- GuardDuty: Delegated administrator
- Security Hub: Central security view
- Config: Organization rules
- Purpose: Secure shell access to EC2
- No SSH keys needed: IAM-based access
- Auditing: CloudTrail logs all sessions
- No bastion host: Direct access via console/CLI
- Port 22: Not required (uses port 443)
- Time spent: ~60-75 min
- Practice: Enable GuardDuty, create KMS key, CloudTrail
- Ready for: Security practice questions
- Move to: Module 08 - Application Integration
Quick Answers:
- AWS Secrets Manager
- Amazon Macie
- No (must create new from snapshot with encryption)
- AWS CloudTrail
- Free (automatically enabled)
- 4 KB (use envelope encryption for more)
- Amazon GuardDuty
- AWS Config