← All insightsBest Practices

Common Amazon Web Services mistakes and how to avoid them

CodeWizard Academy · 9 January 2026 · 3 min read · Intermediate

Most Amazon Web Services pain is self-inflicted and predictable. Here are the mistakes we see most, and the fix for each.

Mistake 1: Long-lived access keys instead of SSO/OIDC roles

Fix: Use SSO for humans and OIDC roles for CI - no static keys. Make it the default in your templates and enforce it in review or CI so the mistake cannot come back.

Mistake 2: Over-broad IAM policies with wildcard actions and resources

Fix: Write least-privilege IAM and manage everything via IaC. Make it the default in your templates and enforce it in review or CI so the mistake cannot come back.

Mistake 3: Public S3 buckets and security groups open to 0.0.0.0/0

Fix: Turn on CloudTrail, GuardDuty and budget alerts. Make it the default in your templates and enforce it in review or CI so the mistake cannot come back.

A safer baseline

A least-privilege S3 read policy as Terraform.

hcl
data "aws_iam_policy_document" "read_assets" {
  statement {
    actions   = ["s3:GetObject"]
    resources = ["arn:aws:s3:::acme-assets/*"]
  }
}
resource "aws_iam_policy" "read_assets" {
  name   = "read-assets"
  policy = data.aws_iam_policy_document.read_assets.json
}

Want senior help putting Amazon Web Services to work - or a team bootcamp on it? CodeWizard runs Israel's largest DevOps community and embeds named senior engineers with a transparent hours log. Book a free consult or explore the Academy.

Like where this is going?

Get hands-on help from the engineers who write these posts.

Book a free consult