Key Takeaways

  • IAM is the foundation of AWS security
  • Least privilege for all roles and policies
  • Enable CloudTrail in all regions
  • S3 buckets are a top misconfiguration

1. AWS Security Fundamentals

AWS follows a shared responsibility model. AWS secures the cloud infrastructure; you secure what you put in it. Understanding this boundary is critical.

2. IAM Best Practices

IAM Security
# Root account protection:
- Enable MFA (hardware key preferred)
- Never use root for daily tasks
- Set up billing alerts

# User/Role best practices:
- Use roles instead of users where possible
- Enforce MFA for all users
- Use Permission Boundaries
- Enable IAM Access Analyzer

# Policy best practices:
- Least privilege
- Avoid wildcards (*) in actions/resources
- Use conditions (IP, time, MFA)
- Regular access reviews

3. VPC Security

# VPC design:
- Separate subnets (public/private)
- Use NAT Gateway for private subnet internet access
- No direct internet for sensitive workloads

# Security Groups:
- Default deny inbound
- Allow only necessary ports
- Reference other SGs, not IP ranges where possible

# Network ACLs:
- Stateless, use as extra layer
- Deny known bad IPs

# VPC Flow Logs:
- Enable for troubleshooting and detection
- Send to CloudWatch or S3

4. S3 Bucket Security

# S3 hardening:
- Block public access (account-level setting)
- Enable default encryption (SSE-S3 or SSE-KMS)
- Enable versioning for important data
- Enable MFA delete for critical buckets
- Use bucket policies, not ACLs
- Enable access logging
- Use S3 Object Lock for compliance

# Check for public buckets:
aws s3api list-buckets --query 'Buckets[*].Name' | \
  xargs -I {} aws s3api get-bucket-acl --bucket {}

5. Monitoring & Logging

6. AWS Security Services

ServicePurpose
GuardDutyThreat detection
Security HubCentralized findings
InspectorVulnerability scanning
MacieSensitive data discovery
WAFWeb application firewall
ShieldDDoS protection

7. EC2 Security

8. AWS Security Checklist

FAQ

What's the most common AWS security mistake?
Public S3 buckets and overly permissive IAM policies. Use S3 Block Public Access at the account level and follow least privilege for all IAM entities.

Cloud Security Container Security K8s Security