AWS Penetration Testing: What It Covers and How to Prepare
What an AWS penetration test covers, what AWS allows without approval, how it differs from a configuration review, and how to prepare your accounts.
What is an AWS penetration test?
An AWS penetration test is an authorised, time-boxed attack on your AWS environment to find weaknesses an attacker could exploit, and to prove how far they could get. It combines two views:
- Inside-out: with read-only access, testers map every IAM principal, trust relationship, network path and data store.
- Outside-in / assumed breach: testers start from an external position or a deliberately leaked credential and try to escalate privileges and move laterally.
What AWS allows you to test
AWS uses a shared responsibility model. You can test what you configure; you cannot attack AWS’s own infrastructure. Under the AWS Customer Support Policy for Penetration Testing, common services such as EC2, RDS, Aurora, Lambda, API Gateway, CloudFront, ECS, EKS and Elastic Beanstalk can be tested without prior approval.
Not allowed without separate approval: DoS and stress testing, DNS zone walking against Route 53 hosted zones, and protocol flooding.
What we typically find
| Area | Common finding | Why it matters |
|---|---|---|
| IAM | iam:PassRole + lambda:CreateFunction on a low-privilege user |
Escalation to any role passable to Lambda |
| Storage | S3 bucket policies allowing Principal: "*" with conditions that do not restrict access |
Data exposure |
| Compute | IMDSv1 enabled on internet-facing instances | SSRF → credential theft |
| CI/CD | Long-lived access keys stored as pipeline secrets | One leaked token = production access |
| Detection | CloudTrail not enabled org-wide, or GuardDuty off in some regions | Attacks go unseen |
In our experience, IAM privilege-escalation paths are the most common route to full account compromise, far more often than unpatched software.
Configuration review vs. penetration test
A configuration review checks every resource against benchmarks such as the CIS AWS Foundations Benchmark. It is broad and cheap per finding. A penetration test goes deep on the paths that matter and proves impact. Most teams should start with a review, fix the basics, then pentest critical workloads.
How to prepare
Follow the four steps below (also listed as structured data on this page) and your test will run smoothly:
- Define scope: accounts, regions, workloads.
- Provision a dedicated, time-boxed IAM role for testers.
- Warn your security team about the window.
- Agree rules of engagement and emergency contacts.
Key takeaways
- You can pentest most AWS services without asking AWS, within its policy.
- IAM is the real perimeter. Test it first.
- Insist on reports that include remediation code, not just severity labels.
Frequently asked questions
Do I need AWS approval to pentest my account?
No, not for the permitted services listed in the AWS Customer Support Policy for Penetration Testing, which include EC2, RDS, Aurora, Lambda, API Gateway, CloudFront, Elastic Beanstalk, ECS, EKS and more. DoS/stress testing and attacks on AWS infrastructure itself are not allowed without separate approval.
How is an AWS pentest different from a vulnerability scan?
A scan lists potential issues one at a time. A penetration test chains issues together, for example a leaked access key plus an over-permissive role, to show what an attacker could actually reach, and proves impact with evidence.
How often should we run an AWS penetration test?
At least annually and after major architectural changes such as a new account structure, a new public-facing workload or a move to Kubernetes. Pair it with continuous configuration monitoring in between.