Cloud breaches increased 45% year-over-year in 2025. The vast majority were caused by misconfigured resources, overprivileged IAM roles, and missing encryption — not sophisticated zero-day exploits. This guide covers the security fundamentals that eliminate 95% of cloud attack vectors.
2025 Cloud Security Report

82% of cloud breaches involved compromised credentials or misconfigured access controls — all preventable with the practices below.

1. Enforce Least-Privilege IAM — Ruthlessly

The single most impactful security action: ensure every IAM identity can only do exactly what it needs, nothing more. In practice this means:

  • No wildcards (*) in production IAM policies — ever
  • Use IAM Access Analyzer to detect unused permissions and eliminate them
  • Rotate access keys every 90 days — or better, eliminate long-lived keys entirely with IAM Roles
  • Enforce MFA on all human IAM users without exception
# Good: Least-privilege S3 policy (read-only, specific bucket)
{
  "Effect": "Allow",
  "Action": ["s3:GetObject", "s3:ListBucket"],
  "Resource": [
    "arn:aws:s3:::my-specific-bucket",
    "arn:aws:s3:::my-specific-bucket/*"
  ]
}

# Bad: Never do this in production
{
  "Effect": "Allow",
  "Action": "*",
  "Resource": "*"
}

2. Enable CloudTrail + GuardDuty on Every Account

You cannot defend what you cannot see. These two services are non-negotiable baselines:

Minimum Visibility Stack

  • AWS CloudTrail — log every API call, store in tamper-evident S3 with integrity validation
  • AWS GuardDuty — ML-based threat detection for anomalous behaviour, crypto mining, exfiltration
  • AWS Security Hub — aggregate findings from GuardDuty, Inspector, and Macie in one dashboard
  • VPC Flow Logs — capture all network traffic for forensic investigation
  • CloudWatch Alarms — alert on root account login, policy changes, failed auth attempts

3. Zero-Trust Network Architecture

Assume breach. Never trust, always verify — even within your VPC. Implement:

  • Security Groups as firewalls — deny all inbound by default; allow only what's needed
  • No public SSH/RDP — use AWS Systems Manager Session Manager instead (zero open ports)
  • Private subnets for all compute — only load balancers in public subnets
  • VPC Endpoints — keep AWS API traffic on private network, never traverse the internet
Quick Win: Audit your Security Groups right now. Any rule with source 0.0.0.0/0 on port 22 or 3389 is a critical vulnerability. Replace with SSM Session Manager this week.

4. Encrypt Everything — At Rest and In Transit

  • Enable default encryption on all S3 buckets (AWS-managed keys minimum; KMS for sensitive data)
  • Encrypt all EBS volumes and RDS databases at rest
  • Enforce TLS 1.2+ on all endpoints — block TLS 1.0 and 1.1
  • Use AWS Certificate Manager for free, auto-renewing TLS certificates
  • Enable S3 Block Public Access at the organization level
# Block all public access on ALL S3 buckets org-wide (recommended)
aws s3control put-public-access-block \
  --account-id 123456789012 \
  --public-access-block-configuration \
    BlockPublicAcls=true,IgnorePublicAcls=true,\
    BlockPublicPolicy=true,RestrictPublicBuckets=true

5. Secrets Management — Never in Code or Environment Variables

The #1 cause of credential leaks: secrets committed to Git or stored in EC2 user data. Use proper secrets management:

Use AWS Secrets Manager or SSM Parameter Store. Rotate secrets automatically. Reference them in code via SDK calls — never as environment variables in plain text, never in git history, never in AMI baked configs.
# Retrieve secret at runtime (Python SDK example)
import boto3, json

client = boto3.client('secretsmanager', region_name='ap-south-1')
secret = json.loads(
    client.get_secret_value(SecretId='prod/myapp/db')['SecretString']
)
db_password = secret['password']   # Never hardcoded!

6. Implement CSPM (Cloud Security Posture Management)

Use automated tools that continuously scan your cloud configuration for misconfigurations:

  • AWS Security Hub with CIS Benchmark — automated compliance scoring
  • AWS Config Rules — auto-remediate policy violations (e.g., auto-encrypt unencrypted volumes)
  • Open-source: Prowler — comprehensive AWS security assessment tool
  • Checkov in CI/CD — scan Terraform/CloudFormation for misconfigs before deploy
# Run Prowler security assessment (open source)
docker run -it --rm \
  -e AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID \
  -e AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY \
  toniblyx/prowler:latest \
  -M html -o /output/report.html

7. Patch & Vulnerability Management

  • Enable AWS Inspector for continuous EC2/container vulnerability scanning
  • Use AWS Systems Manager Patch Manager for automated OS patching
  • Scan container images in CI/CD with Trivy or ECR Image Scanning before deployment
  • Establish a 48-hour SLA for critical CVE patching in production

Security Posture Checklist

Monthly Security Review Checklist

  • Review IAM Access Analyzer findings and remove unused permissions
  • Audit all S3 buckets — confirm no unintended public access
  • Review CloudTrail for root account activity (should be zero)
  • Check GuardDuty for unresolved high-severity findings
  • Verify all RDS/EBS volumes are encrypted
  • Rotate IAM access keys older than 90 days
  • Review Security Hub compliance score (target: 90%+)
Share this article:
NK

Velanati Naveen Kumar

AWS Security Specialist | Cloud Architecture & Compliance

I help businesses secure their cloud environments through comprehensive security posture assessments, IAM hardening, zero-trust implementations, and automated compliance. Let's secure your cloud.