Logo
AWS Security

How to Secure an AWS Environment From Common Misconfigurations

How to Secure an AWS Environment From Common Misconfigurations

Short answer: According to the Verizon Data Breach Investigations Report and findings from multiple cloud security firms, most AWS breaches trace back to a handful of misconfigurations, not exploits: publicly exposed S3 buckets, overly permissive security groups, over-privileged or unused IAM credentials, and disabled logging. All of them fall on the customer side of the AWS Shared Responsibility Model, so fixing them is your job, not AWS's.

TL;DR: The vast majority of AWS breaches are self-inflicted configuration mistakes — public S3, open ports, over-privileged IAM, and missing logs — all of which you can fix today without any new tooling.

Key Takeaways - Under the AWS Shared Responsibility Model, AWS secures the cloud itself; you secure what you put in it. - The highest-impact fixes are closing public S3 access, tightening security groups, enforcing least-privilege IAM, and turning on logging. - Since April 2023, AWS enables S3 Block Public Access by default for new buckets, but existing buckets are unchanged. - These are configuration problems, so they are fixable today with no new tooling, just discipline.

Start with who is responsible for what

Start with who is responsible for what

Before fixing anything, understand the dividing line. The AWS Shared Responsibility Model splits security into two halves: AWS is responsible for "security of the cloud" (the hardware, the hypervisor, the managed-service infrastructure), and the customer is responsible for "security in the cloud" (your data, your IAM policies, your network rules, your configuration).

Nearly every headline "AWS breach" is a customer-side misconfiguration, not a failure of AWS infrastructure. That is good news: it means the fixes are in your hands.

The AWS Shared Responsibility Model split between AWS and the customer Two columns. The customer column, security in the cloud, lists data, IAM, security groups, and logging. The AWS column, security of the cloud, lists hardware, the global infrastructure, and managed services. Who secures what Customer: security IN the cloud • Your data and its encryption • IAM users, roles, and policies • Security groups and network rules • Logging and monitoring config This is where misconfigurations live AWS: security OF the cloud • Physical data centers • Hardware and the hypervisor • Global network infrastructure • Managed-service backbone AWS handles this for you
Figure 1. The customer owns configuration. Source: AWS Shared Responsibility Model.
Misconfiguration Risk Fix
Public S3 bucket Data exposure and leaks Enable S3 Block Public Access; audit bucket policies
Permissive security group Exposed SSH/RDP and services Restrict 0.0.0.0/0; allow only needed ports and sources
Over-privileged / unused IAM Broad blast radius if compromised Apply least privilege; remove unused credentials
Disabled logging No visibility, no forensics Enable CloudTrail and service logs

The misconfigurations that matter most

The misconfigurations that matter most

Publicly exposed S3 buckets

Public buckets are the classic AWS data leak. Since April 2023, AWS automatically enables S3 Block Public Access for all new buckets, which closes the most common cause. But that default does not touch buckets created earlier, so audit existing buckets and confirm Block Public Access is on unless you have a deliberate reason otherwise.

A misconfigured bucket policy that allows any principal to read objects looks like this:

{
  "Effect": "Allow",
  "Principal": "*",
  "Action": "s3:GetObject",
  "Resource": "arn:aws:s3:::your-bucket/*"
}

Any bucket policy with "Principal": "*" and no Condition key is effectively public. Audit all bucket policies for this pattern alongside the Block Public Access setting.

Overly permissive security groups

A security group is the customer-configured firewall around your resources. The frequent mistake is opening sensitive ports to the entire internet, for example allowing SSH (22) or RDP (3389) from 0.0.0.0/0. Restrict inbound rules to the specific ports and source ranges that actually need access.

Over-privileged and unused IAM

Identity is the real perimeter in the cloud. Credentials with more permissions than they need, or old credentials nobody uses, widen the blast radius of any compromise. Least privilege and credential hygiene are foundational, and the AWS IAM security best practices for beginners guide covers them in depth.

Disabled logging

You cannot investigate what you did not record. Turning on AWS CloudTrail and relevant service logs gives you the visibility to detect and reconstruct an incident. Logging is cheap insurance that is worthless only if you wait until after a breach to enable it. AWS Config can automatically detect and alert on S3 Block Public Access being disabled, security group rules opening 0.0.0.0/0, and other high-risk configuration changes — making it the right tool to pair with CloudTrail for continuous compliance monitoring.

A practical hardening order

A practical hardening order

AWS publishes the broader design guidance for this in the Well-Architected security pillar. In practice, work in this order: close public access, tighten the network, enforce least-privilege identity, then verify logging is on everywhere. Each step shrinks the attack surface the next one has to worry about. The CIS AWS Foundations Benchmark provides over 100 specific, prioritized checks you can run against this same order of controls. For the bigger picture of how proactive hardening differs from active testing, see AWS cloud security vs cloud penetration testing. If you are building the team skills to sustain these controls, AWS security training for cybersecurity professionals covers the learning path.

Frequently asked questions

What are the most common AWS misconfigurations?

The most common are publicly exposed S3 buckets, overly permissive security groups that open ports like SSH or RDP to the internet, over-privileged or unused IAM credentials, and disabled logging. All four are customer-side configuration issues under the AWS Shared Responsibility Model.

What is the AWS Shared Responsibility Model?

It is AWS's framework dividing security duties: AWS is responsible for "security of the cloud" (the physical and infrastructure layers), while the customer is responsible for "security in the cloud" (data, identity, network configuration, and logging). Most breaches stem from the customer half.

Are S3 buckets public by default?

No. Since April 2023, AWS enables S3 Block Public Access by default for new buckets, so new buckets are private unless you deliberately change that. However, buckets created before this change are not affected, so you should audit older buckets directly.

How do I secure AWS security groups?

Restrict inbound rules to only the ports and source IP ranges that genuinely need access, and avoid opening sensitive ports such as SSH (22) or RDP (3389) to 0.0.0.0/0. Treat the security group as a tight allow-list, not a convenience.


ThreatBlock's AWS security course walks through hardening a real AWS environment hands-on, misconfiguration by misconfiguration.

About the author: Samaksh is Lead Instructor at ThreatBlock and holds the OSCP, CRTP, CRTO, and CEH certifications, with hands-on experience in penetration testing and red teaming. Read more on the author page · Editorial policy.

← Back to all articles
{{ toast }}