Skip to content
7 min read·Lesson 8 of 10

Cloud Security Fundamentals

Learn the shared responsibility model, cloud IAM, network controls, encryption, and the CSPM/CWPP/CIEM tools that keep cloud workloads safe.

Cloud doesn't make security easier — it changes the controls and shifts the failure modes. The number-one cause of cloud breaches isn't sophisticated attackers; it's misconfiguration. This lesson covers what the cloud provider handles for you, what you still own, and the tooling that helps you manage it at scale.

The Shared Responsibility Model

Every cloud provider publishes a version of this. The split depends on the service tier:

LayerIaaS (EC2)PaaS (App Service)SaaS (Microsoft 365)
DataCustomerCustomerCustomer
App code & configCustomerCustomerProvider
Identity / access policiesCustomerCustomerCustomer
OS / runtimeCustomerProviderProvider
Network controlsCustomer (rules) / Provider (fabric)ProviderProvider
Hypervisor / hardware / data centreProviderProviderProvider

Three things always belong to you, no matter the tier: your data, your identities, and your access policies.

Cloud Identity

Cloud IAM is the modern perimeter. Core practices:

  • Use roles, not long-lived access keys. EC2 instance roles, EKS IRSA, GitHub OIDC federation — short-lived credentials issued on demand.
  • MFA on every human account, including the root / global admin (then put root credentials in a safe and don't use them).
  • Least privilege. Grant the narrowest set of actions on the narrowest set of resources. Use access analysers (AWS IAM Access Analyzer, Azure Conditional Access insights) to find unused permissions.
  • Service control policies / org policies. Guardrails at the organisation level — block disabling logging, restrict regions, deny risky services.
  • Centralised logging of all identity events (CloudTrail, Entra audit logs, GCP audit logs) into a SIEM.

Network Controls

AWSAzureGCPPurpose
Security GroupNSGVPC firewall ruleStateful instance/subnet firewall
Network ACL(via NSG)(via firewall)Stateless subnet filter
VPC + subnetsVNet + subnetsVPC + subnetsNetwork isolation
PrivateLink / VPC EndpointPrivate EndpointPrivate Service ConnectReach managed services without internet
Transit GatewayVirtual WANNetwork Connectivity CenterHub-and-spoke connectivity

Default to private connectivity. There is rarely a good reason for a database, queue, or object store to be reachable from the public internet — even with auth in front of it.

Encryption

  • In transit: TLS on every endpoint, mTLS between services where feasible, no plaintext databases or queues.
  • At rest: enable provider encryption (it's default-on for many services). Use customer-managed keys (CMK / BYOK) when you need cryptographic separation, audit, or rotation control.
  • KMS / Key Vault: central key management with audit logs. Apps call KMS to encrypt/decrypt — keys never leave the service.
  • Envelope encryption: data encrypted with a fast symmetric data key; the data key is itself encrypted by the KMS key. Standard pattern for large objects.
  • Field-level encryption for the most sensitive fields (PII, payment data) on top of disk encryption.

Cloud Security Posture Management (CSPM)

CSPM continuously scans your cloud configuration against best-practice baselines and compliance frameworks (CIS, PCI, HIPAA, ISO). Findings: open S3 buckets, security groups allowing 0.0.0.0/0 to admin ports, unencrypted volumes, old IAM keys.

Examples: AWS Security Hub, Azure Defender for Cloud (CSPM), GCP Security Command Center, Wiz, Prisma Cloud, Lacework.

Cloud Workload Protection (CWPP)

CWPP focuses on what's running — VMs, containers, serverless. Capabilities: vulnerability scanning of images and hosts, runtime threat detection, compliance, file integrity monitoring. Often delivered as an EDR-style agent (or agentless via cloud APIs and snapshot scanning).

Cloud Infrastructure Entitlement Management (CIEM)

The newest pillar. CIEM analyses identity entitlements at scale — humans, service accounts, roles, federated identities — to find:

  • Unused permissions you can remove
  • Toxic combinations (a role that can both write and bypass logging)
  • Cross-account and cross-cloud paths an attacker could traverse

Modern CSPM platforms (Wiz, Prisma, Orca) bundle CIEM features.

Native Detection Services

AWSAzureGCP
GuardDuty (threat detection)Defender for CloudSecurity Command Center
Inspector (vuln scanning)Defender for Servers / ContainersContainer Threat Detection
Macie (data discovery)PurviewSensitive Data Protection (DLP)
CloudTrail + ConfigActivity Log + PolicyAudit Logs + Asset Inventory
Security Hub (aggregator)Defender XDR / SentinelSCC + Chronicle

Container and Kubernetes Security

  • Image hardening: minimal base images (distroless, alpine), no secrets in layers, scanned in CI
  • Image signing with Sigstore/cosign and admission policies that only allow signed images
  • Pod security: non-root, read-only root filesystem, drop capabilities, no host network/PID
  • Network policies (Calico, Cilium) — default-deny pod-to-pod traffic
  • Workload identity — IRSA on EKS, Workload Identity on GKE, Pod Identity on AKS — pods get cloud credentials without static secrets
  • Runtime detection with Falco or commercial CWPP agents

Secrets in the Cloud

  • Use the managed secret store: AWS Secrets Manager, Azure Key Vault, GCP Secret Manager
  • Rotate automatically where supported (DB credentials, API keys)
  • Mount via env or sidecar at runtime — never bake into images
  • Audit access — who read which secret, when

Common Cloud Mistakes

  1. Public S3 / blob / GCS buckets
  2. Overly broad IAM policies (*:*, iam:PassRole *)
  3. Unrestricted security groups (0.0.0.0/0 to SSH/RDP/databases)
  4. Long-lived access keys committed to Git
  5. Disabled logging — or logs that nobody reviews
  6. Lateral cross-account trust without external IDs / conditions

CSPM finds most of these in minutes — turn it on and act on the findings.

Key Takeaways

  • The shared responsibility model defines who secures what — provider vs customer — and varies by service tier.
  • Cloud IAM is the new perimeter. Use roles, not long-lived keys, and follow least privilege.
  • Default-deny network controls (security groups, NSGs, VPC firewalls) and private connectivity options keep traffic off the public internet.
  • Encrypt data at rest with provider KMS or customer-managed keys, and in transit with TLS everywhere.
  • CSPM, CWPP, and CIEM are the three pillars of cloud security posture: config, workloads, and entitlements.

Test your knowledge

Try exam-style practice questions to reinforce what you've learned.

Practice Questions →