AWS Security Misconfigurations Checklist: The Issues Attackers Find First
The AWS security misconfigurations attackers find first are the ones visible from the internet or one hop away from it: security groups open to 0.0.0.0/0 on SSH, RDP and database ports, publicly shared EBS and RDS snapshots, instances that still allow IMDSv1, unauthenticated Lambda function URLs, and leaked access keys tied to over-permissive IAM. Below is a checklist ordered roughly the way an attacker would work through your account, with a read-only AWS CLI command for each item so you can check your own environment today.
All commands below only read configuration. Most EC2, RDS and Lambda calls are regional, so run them per region (loop over aws ec2 describe-regions --query 'Regions[].RegionName' --output text) or you'll miss the forgotten us-west-1 test stack.
How attackers prioritize AWS security misconfigurations
Attackers don't start with your CIS benchmark score. They start with what they can touch:
- Things reachable without credentials: open ports, public data, unauthenticated endpoints.
- Things that hand out credentials: leaked keys, the instance metadata service, CI secrets.
- What those credentials can do: IAM permissions, missing logging, cross-account trust.
The checklist follows that order. The AWS Foundational Security Best Practices standard covers many of the same items, and we reference its control IDs where they apply so you can line up findings with Security Hub.
Tier 1: Exposed without credentials
1. Security groups open to the world on sensitive ports
The single most common finding. Security Hub has dedicated controls for it: EC2.13 (port 22) and EC2.14 (port 3389), plus EC2.19 for other high-risk ports.
# Security groups with any IPv4 rule open to the internet
aws ec2 describe-security-groups \
--filters Name=ip-permission.cidr,Values='0.0.0.0/0' \
--query 'SecurityGroups[].[GroupId,GroupName]' --output table
# Same for IPv6
aws ec2 describe-security-groups \
--filters Name=ip-permission.ipv6-cidr,Values='::/0' \
--query 'SecurityGroups[].[GroupId,GroupName]' --output table
Port 443 on a load balancer is expected. Port 22, 3389, 5432, 3306, 6379, 9200 or 27017 open to the world is not. Replace SSH with Session Manager or a VPN, and keep databases in private subnets.
2. Publicly shared snapshots
EBS and RDS snapshots can be shared with "all", which means any AWS account can restore a full copy of your disk or database. Security Hub flags EBS as EC2.1.
# EBS snapshots you own that anyone can restore
aws ec2 describe-snapshots --owner-ids self \
--restorable-by-user-ids all \
--query 'Snapshots[].[SnapshotId,VolumeSize,StartTime]' --output table
# RDS manual snapshots: list them, then check each one's restore attribute
aws rds describe-db-snapshots --snapshot-type manual \
--query 'DBSnapshots[].DBSnapshotIdentifier' --output text
aws rds describe-db-snapshot-attributes \
--db-snapshot-identifier <snapshot-id>
# Look for "all" in the "restore" attribute values
3. Publicly accessible databases
aws rds describe-db-instances \
--query 'DBInstances[?PubliclyAccessible==`true`].[DBInstanceIdentifier,Engine,Endpoint.Address]' \
--output table
PubliclyAccessible plus a permissive security group equals a database on the internet. Even with a strong password, it's exposed to brute force and to any future engine CVE.
4. Unauthenticated Lambda function URLs
A function URL with auth type NONE and a resource policy granting public access can be invoked by any unauthenticated user who has the URL. That's sometimes intended (webhooks, public APIs), but the function then has to do its own auth.
for fn in $(aws lambda list-functions --query 'Functions[].FunctionName' --output text); do
aws lambda list-function-url-configs --function-name "$fn" \
--query 'FunctionUrlConfigs[?AuthType==`NONE`].[FunctionArn,FunctionUrl]' --output text
done
5. S3 buckets (briefly)
Since April 2023, new buckets get Block Public Access and disabled ACLs by default, but older buckets and deliberate overrides are still common. Check the account-level setting first:
aws s3control get-public-access-block \
--account-id $(aws sts get-caller-identity --query Account --output text)
For per-bucket policies, ACLs and outside-in testing, follow our full guide on checking whether S3 buckets are publicly exposed.
Tier 2: Ways to get credentials
6. Instances that still allow IMDSv1
IMDSv1 answers plain GET requests, so a server-side request forgery (SSRF) bug in your app can be enough to read the instance role's temporary credentials. IMDSv2 requires a session token obtained with a PUT request first, which blocks most SSRF paths. AWS recommends moving instances to IMDSv2-only and notes that Amazon Linux 2023 disables IMDSv1 by default. Security Hub tracks it as EC2.8.
# Instances where IMDSv1 is still allowed (HttpTokens = optional)
aws ec2 describe-instances \
--filters Name=metadata-options.http-tokens,Values=optional \
--query 'Reservations[].Instances[].[InstanceId,Tags[?Key==`Name`]|[0].Value]' \
--output table
Before enforcing, check the MetadataNoToken CloudWatch metric AWS provides to see whether any software on the instance still makes IMDSv1 calls.
7. Leaked access keys
Long-lived IAM user keys end up in Git history, Docker images, mobile apps and frontend bundles. External scanning catches the public ones. Inside the account, find old keys:
# Generates the report (no configuration change), then downloads it
aws iam generate-credential-report
aws iam get-credential-report --query Content --output text | base64 --decode > credential-report.csv
In the CSV, look at access_key_1_last_rotated, access_key_1_last_used_date and the _2_ equivalents. Keys older than 90 days, or unused keys that are still active, should be rotated or deleted. To find keys already exposed in your web assets, see scanning JavaScript bundles for leaked API keys.
8. Root account with keys or without MFA
aws iam get-account-summary \
--query 'SummaryMap.{RootMFA:AccountMFAEnabled,RootAccessKeys:AccountAccessKeysPresent}'
You want RootMFA: 1 and RootAccessKeys: 0. The CIS AWS Foundations Benchmark has dedicated items for both, and AWS's Well-Architected guidance notes that the root user has full administrative access and cannot be restricted by standard security policies, so a leaked root key is a full account takeover.
Tier 3: What stolen credentials can do
9. Wildcard admin policies
Security Hub control IAM.1 flags customer-managed policies that allow "Action": "*" on "Resource": "*". The common real-world version is an EC2 instance role or CI role with AdministratorAccess attached "temporarily".
# Roles with AdministratorAccess attached
aws iam list-entities-for-policy \
--policy-arn arn:aws:iam::aws:policy/AdministratorAccess \
--query '{Roles:PolicyRoles[].RoleName,Users:PolicyUsers[].UserName,Groups:PolicyGroups[].GroupName}'
Any role that a workload can assume (EC2, Lambda, ECS, a GitHub Actions OIDC role) should not be on that list.
10. Missing or single-region CloudTrail
Without CloudTrail you can't answer "what did the attacker do?" Security Hub's CloudTrail.1 expects at least one multi-Region trail with read and write management events.
aws cloudtrail describe-trails \
--query 'trailList[].{Name:Name,MultiRegion:IsMultiRegionTrail,Bucket:S3BucketName}' --output table
aws cloudtrail get-trail-status --name <trail-name> --query IsLogging
11. No external access analysis
IAM Access Analyzer reports resources shared publicly or with other accounts across supported resource types. If this returns nothing, no analyzer is enabled in that region:
aws accessanalyzer list-analyzers --query 'analyzers[].[name,type,status]' --output table
The checklist at a glance
| # | Misconfiguration | Attacker value | Security Hub control |
|---|---|---|---|
| 1 | SG open on 22/3389/DB ports | Direct access, brute force | EC2.13, EC2.14, EC2.19 |
| 2 | Public EBS/RDS snapshots | Full data copy | EC2.1 |
| 3 | Publicly accessible RDS | Direct DB access | — |
| 4 | Lambda URL with auth NONE | Unauthenticated invocation | — |
| 5 | Public S3 | Data exposure | See S3 guide |
| 6 | IMDSv1 allowed | SSRF to credentials | EC2.8 |
| 7 | Old or leaked access keys | Persistent access | — |
| 8 | Root keys / no root MFA | Full account takeover | CIS items |
| 9 | Wildcard admin on workload roles | Blast radius | IAM.1 |
| 10 | No multi-Region CloudTrail | No forensics | CloudTrail.1 |
| 11 | No Access Analyzer | Unseen sharing | — |
A dash means we're not citing a specific Security Hub control ID for that item here, not that none exists. Check the control reference for your enabled standards.
Inside-out vs outside-in
The CLI commands above show configuration. They don't show what an attacker can actually reach, and they only cover accounts you remember to run them in. That's why we pair them with an outside-in view. SecurityInfinity's agents start from domains you've verified you own and run read-only recon, network and secrets checks. The Cloud Misconfigs scanner looks for public AWS, Azure and GCP resources, Network Audit fingerprints exposed services, and the JS Secrets Scanner finds keys shipped in frontend code. Each finding includes evidence and the specific fix.
To keep these misconfigurations from being deployed again, catch them in Terraform or CloudFormation before apply; see infrastructure as code security scanning. For how to compare tools that run these checks, read what a cloud vulnerability scanner should catch.
Need proof for a customer or auditor that your AWS-hosted app has been tested? Our Startup Pentest covers web app, APIs, subdomains and cloud exposure, and delivers a report plus signed attestation letter. Or start a free scan to see what's exposed right now.
Frequently asked questions
What are the most common AWS security misconfigurations?
Common examples include security groups open to the internet on SSH, RDP or database ports, instances still allowing IMDSv1, publicly shared snapshots, publicly accessible RDS instances, long-lived IAM access keys and workload roles with administrator access. Public S3 buckets are less likely on new buckets since AWS changed the defaults in 2023, but older buckets and explicit overrides can still be exposed.
How do I check my AWS account for misconfigurations for free?
Enable AWS Security Hub's Foundational Security Best Practices standard, run an open-source tool such as Prowler, or use the read-only AWS CLI commands in this checklist. Pair that with an outside-in scan of your domains to see which issues are actually reachable from the internet.
Why is IMDSv1 considered a misconfiguration?
IMDSv1 returns instance metadata, including temporary IAM role credentials, to any simple GET request from the instance. If your application has an SSRF bug, an attacker can make the server fetch those credentials for them. IMDSv2 requires a session token obtained via a PUT request first, which stops most SSRF-based credential theft.
Does AWS fix misconfigurations for me?
No. Under the shared responsibility model, AWS secures the underlying infrastructure and you're responsible for how you configure your resources, identities and network access. AWS has tightened some defaults, such as Block Public Access on new S3 buckets and IMDSv1 being disabled on Amazon Linux 2023, but existing resources and explicit overrides remain your job.
How often should I audit AWS for misconfigurations?
Continuously if you can, since infrastructure changes with every deploy. At minimum, run automated checks weekly, scan infrastructure as code in CI before every apply, and do a manual IAM review quarterly. Annual pentests are useful for depth but too infrequent on their own.