Free tech learning for everyone, from basics to pro

Penetration TestingCyber SecurityIntermediate

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.

What you can and cannot test in the cloudUsually allowed (your side)Your virtual machines and containersYour apps and APIsYour IAM roles and policiesYour storage and network settingsNot allowed (provider side)The provider's own infrastructureOther customers' resourcesDenial of service testsPhysical data centres
Figure 1. You test what you are responsible for under the shared responsibility model, within the provider's policy.

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

Common cloud pen test findingsOver-permissive IAMroles that can do too muchPublic storagebuckets or blobs open to allExposed managementSSH or RDP open to theinternetSecrets in codekeys in repos or user dataMetadata abusestealing instancecredentialsMissing loggingattacks go unseen
Figure 2. Most cloud findings are configuration and identity problems, not software bugs.
AreaTypical questions
Identity and access (IAM)Can a low-privileged user or role escalate to admin? Are old access keys still active?
StorageAre any buckets, blobs or snapshots readable from the internet?
NetworkAre management ports or databases exposed? Are security groups too open?
ComputeCan an attacker on a VM read the instance metadata service and steal its credentials?
Applications and APIsDo web apps and APIs have the usual flaws? See API security.
Logging and detectionDid 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?
The customer's side of the shared responsibility model: their VMs, apps, identities and configuration.
Name two things provider policies usually forbid.
Any two of: denial of service or stress testing, attacking provider infrastructure, accessing other customers' resources.
Why is IAM so important in cloud testing?
A stolen key or over-permissive role can give wide access without exploiting any software flaw.

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.
Tracks your learning on this device only. See your progress on the learning paths.
Verified author✓ Valid
Issued to
Mohamed Fayas
Role
Founder of FM TecHub
Credentials
CCNABTEC HND Network EngineeringBEng (Hons) Computer Networking & Cloud Security
Issuer
FM TecHub · fmtechub.com

He writes practical, plain-English guides on networking, security and cloud.

More about the author →

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.

Email updates: coming soon

New notes, tools and security news from FM TecHub by email, explained simply. Free. We're not collecting email addresses yet; see our privacy policy.

PortServiceStatus
SMTP/25Email updatesopening soon

Meanwhile, stay connected: