Skip to main content

AWS Security Hardening Guide

Complete security hardening framework for AWS EKS deployments with 50+ security controls across identity, network, data, and workload security.

Security Framework Overview

Identity & Access

IRSA, IAM policies, MFA, no long-lived keys

Network Security

VPC isolation, security groups, Network ACLs

Data Protection

Encryption at rest/transit, KMS, Secrets Manager

Compliance

CIS benchmarks, SOC 2, PCI DSS controls

Security Maturity: 94/100


1. Identity & Access Management

1.1 IRSA (IAM Roles for Service Accounts)

Use IRSA for all pod-to-AWS authentication
Benefits:
  • No long-lived IAM access keys
  • Automatic credential rotation
  • Least-privilege per service account
  • Full audit trail in CloudTrail
Implementation:

1.2 IAM Policy Least Privilege

Minimize IAM permissions to only what’s required
Testing:

1.3 No Long-Lived Credentials

Never use IAM access keys in pods
  • Don’t create IAM users for applications
  • Don’t store access keys in Kubernetes secrets
  • Don’t use instance profiles (use IRSA instead)
Audit for leaked credentials

1.4 MFA Enforcement

Require MFA for human access to AWS Console

2. Network Security

2.1 VPC Isolation

All workloads in private subnets (no public IPs)
Verification:

2.2 Security Groups

Minimize security group ingress rules
RDS Security Group:

2.3 Network Policies

Enforce pod-to-pod network policies

2.4 VPC Endpoints

Use VPC endpoints to keep AWS API traffic private
Benefits:
  • Traffic stays on AWS backbone (no internet)
  • ~70% cost savings on data transfer
  • Better security (no NAT gateway for AWS APIs)

3. Data Protection

3.1 Encryption at Rest

Enable KMS encryption for all data stores
EKS Secrets Encryption:
RDS Encryption:
ElastiCache Encryption:

3.2 Encryption in Transit

Enforce TLS for all network communication
RDS TLS:
ElastiCache TLS:
Application TLS:

3.3 Secrets Management

Store all secrets in AWS Secrets Manager
Using External Secrets Operator:

3.4 Key Rotation

Enable automatic KMS key rotation
Manual secret rotation:

4. Workload Security

4.1 Pod Security Standards

Enforce restricted Pod Security Standards
Compliant Pod Spec:

4.2 Image Security

Scan container images for vulnerabilities
Enable ECR Image Scanning:
Check scan results:

4.3 RBAC

Implement least-privilege RBAC

5. Audit & Compliance

5.1 CloudTrail

Enable CloudTrail for all regions

5.2 GuardDuty

Enable GuardDuty for threat detection

5.3 Config Rules

Enable AWS Config for compliance

Security Checklist

IRSA configured for all service accounts
No IAM access keys in pods
IAM policies follow least privilege
MFA required for console access
Service account tokens auto-mounted only when needed
IAM roles tagged with owner
AWS Organizations SCPs applied
Root account secured with MFA
IAM password policy enforced
CloudTrail enabled and monitored
All pods in private subnets
Security groups follow least privilege
Network policies applied to all namespaces
VPC Flow Logs enabled
VPC endpoints for AWS services
NAT gateways in multiple AZs
No public RDS/ElastiCache endpoints
Private EKS API endpoint option available
Network ACLs configured (if used)
AWS WAF on load balancer (if public)
DDoS protection via Shield Standard
Route53 DNSSEC enabled (if used)
KMS encryption for EKS secrets
RDS encrypted at rest
ElastiCache encrypted at rest
S3 buckets encrypted
EBS volumes encrypted
TLS enforced for RDS
TLS enforced for ElastiCache
TLS enforced for application endpoints
KMS key rotation enabled
Secrets in AWS Secrets Manager (not code)
Pod Security Standards enforced (restricted)
ECR image scanning enabled
No privileged containers
Read-only root filesystems
Non-root user in containers
RBAC configured with least privilege
Resource limits on all pods
Admission webhooks (e.g., OPA/Gatekeeper)
CloudWatch Container Insights enabled
EKS control plane logs enabled
CloudTrail logging all API calls
VPC Flow Logs enabled
RDS Enhanced Monitoring enabled
ElastiCache slow log enabled
GuardDuty enabled
Security Hub enabled
CloudWatch alarms for security events
Log retention policies configured

Compliance Mapping

CIS AWS Foundations Benchmark

SOC 2 Controls


EKS Production

Production deployment guide

Terraform AWS

Infrastructure documentation

EKS Runbooks

Operational procedures

Compliance

Compliance framework