Cloud penetration testing: what you can test in AWS and Azure and what testers find
In short: Cloud penetration testing checks the parts of a cloud environment that the customer controls: virtual machines, applications, identities and configuration. Major providers publish testing policies, and attacks on the provider itself, other customers or denial of service are not allowed. The most common findings are over-permissive IAM, public storage, exposed management ports and leaked keys.
How cloud testing is different
In a traditional network test, the organisation owns everything from the cables to the applications. In the cloud, responsibility is shared: the provider secures the physical data centres and core infrastructure, and the customer secures what they build on top. A cloud penetration test focuses on the customer's side of that line. The split is explained in the cloud shared responsibility model.
Provider testing policies
AWS, Microsoft Azure and Google Cloud each publish a penetration testing policy. For their common services, customers generally no longer need to ask permission before testing their own resources, but they must follow the rules. Typical rules ban denial of service and stress testing, attacks on shared provider infrastructure, and any attempt to access other customers. Policies change, so the tester should read the current version for each provider during planning and scoping and record it in the rules of engagement.
What testers look at
| Area | Typical questions |
|---|---|
| Identity and access (IAM) | Can a low-privileged user or role escalate to admin? Are old access keys still active? |
| Storage | Are any buckets, blobs or snapshots readable from the internet? |
| Network | Are management ports or databases exposed? Are security groups too open? |
| Compute | Can an attacker on a VM read the instance metadata service and steal its credentials? |
| Applications and APIs | Do web apps and APIs have the usual flaws? See API security. |
| Logging and detection | Did the security team see the test activity? |
Identity is the new perimeter
In the cloud, a stolen access key or an over-powerful role can be more dangerous than an open port. Testers often start from a "compromised" low-level identity supplied by the client and see how far it can go. Defences include least-privilege roles, short-lived credentials instead of long-term keys, MFA for every human user, IMDSv2 on AWS instances to protect the metadata service, and continuous posture checks with CSPM tools.
Real-world example: from a developer key to production data
A fictional online retailer asks for a test of its AWS account, starting from a developer's access key. The tester finds that the developer role can attach policies to itself, a path to administrator. With that access, an old database snapshot shared publicly by mistake is also found. Nothing is downloaded beyond proof of access. The retailer removes the permission, deletes the public snapshot, replaces long-term keys with short-lived single sign-on credentials and adds a CSPM rule that alerts on any public snapshot. A retest confirms the path is closed.
Practice
What part of a cloud environment does a customer pen test focus on?
Name two things provider policies usually forbid.
Why is IAM so important in cloud testing?
Key takeaways
- Cloud pen tests cover the customer's side of the shared responsibility model.
- Read each provider's current testing policy and record it in the rules of engagement.
- Denial of service and attacks on the provider or other customers are not allowed.
- Most findings are IAM and configuration problems, not software bugs.
- Least privilege, short-lived credentials and CSPM close common paths.
Original content written by Mohamed Fayas for FM TecHub. © 2026 FM TecHub. You're welcome to share a link to this page; please don't copy the text elsewhere without permission.