SyntaxPilot
Courses/Cybersecurity Fundamentals/Lesson 64
Video coming soonThis lesson’s video is being made

Start with the notes below; the video appears here as soon as it is on YouTube.

Cybersecurity Fundamentals · Lesson 64 of 90

Cloud security fundamentals

IaaSPaaSSaaSshared responsibility modelregions and availability zonesaccounts/subscriptions/projectslanding zonescloud misconfiguration (public storage buckets)cloud audit logs (CloudTrail, Azure Activity Log, GCP Audit Logs)CSPMcloud security postureWell-Architected security pillarCSA Cloud Controls Matrix

These are the notes for Cybersecurity Fundamentals (defensive), episode 64. In episode 63 our pipeline learned to deploy safely to the cloud. This episode answers the question we skipped: what the cloud is, and who keeps which part of it secure. It opens the course's cloud block (episodes 64-66). Every term is defined the first time it appears; the Glossary collects them.

Scope. Defensive and educational only. Every program is a toy simulation; no real cloud account is touched. 203.0.113.7 is a documentation-only IP address. Samples were run on 13 Nov 2026 in the SyntaxPilot compiler (Python 3.13).

Step 1: what the cloud is

Real-life example: to feed a family you can build your own kitchen (buy the stove, fix the gas line) or rent a kitchen by the hour that is already set up, paying for the gas you use.

  • On-premises: your own servers, in your own building, run by your own team.
  • Data centre: a building full of servers, with power, cooling and network.
  • Cloud provider: a company that runs huge data centres and rents out computing (for example AWS, Microsoft Azure, Google Cloud).
  • Cloud computing: renting computers, storage and software over the internet, on demand.
  • NIST SP 800-145 (The NIST Definition of Cloud Computing, September 2011) lists five essential characteristics: 1. On-demand self-service: you add server time or storage yourself, without calling the provider. 2. Broad network access: reachable over the network from phones, laptops and servers. 3. Resource pooling: many customers share the same pool of hardware; you don't control the exact physical location. 4. Rapid elasticity: resources grow and shrink quickly, sometimes automatically. 5. Measured service: usage is metered, and you pay for what you use.

IaaS, PaaS and SaaS

Real-life example: a rented kitchen where you cook (IaaS), a tiffin service where the food arrives and you add spice (PaaS), a restaurant where you just eat (SaaS).

Model What you rent What you still manage (per NIST) Example
IaaS (infrastructure as a service) virtual machines, storage, networks operating systems, storage, deployed apps, some networking (host firewalls) a virtual server
PaaS (platform as a service) a platform that runs your code your deployed applications and their hosting settings upload code, the platform runs it
SaaS (software as a service) finished software only limited user-specific settings webmail, an online spreadsheet
  • Virtual machine (VM): a software computer that runs on a real (physical) server, sharing it with other VMs.
  • Hypervisor: the software that runs virtual machines on a physical server and keeps them apart.
  • Deployment models (NIST): public cloud (open to the general public, on the provider's premises), private cloud (for one organisation), community cloud (for a group of organisations with shared concerns), hybrid cloud (two or more of these linked together).

Step 2: the shared responsibility model

The obvious mistake: "it's in the cloud, so the provider secures it".

Demo 1: who secures each layer?

# Who secures each layer? The shared responsibility model (simplified).
LAYERS = ["data", "identities & access", "application", "operating system",
          "virtual network", "hypervisor", "physical servers", "data centre"]
PROVIDER_FROM = {"IaaS": 5, "PaaS": 3, "SaaS": 2}   # first layer the provider owns

def owner(model, layer):
    return "PROVIDER" if LAYERS.index(layer) >= PROVIDER_FROM[model] else "YOU"

print(f"{'layer':22}{'IaaS':10}{'PaaS':10}{'SaaS':10}")
for layer in LAYERS:
    print(f"{layer:22}" + "".join(f"{owner(m, layer):10}" for m in PROVIDER_FROM))

incident = ("bucket left public", "data")
print("\nIncident:", incident[0], "-> responsible in every model:",
      {owner(m, incident[1]) for m in PROVIDER_FROM})

Real output:

layer                 IaaS      PaaS      SaaS      
data                  YOU       YOU       YOU       
identities & access   YOU       YOU       YOU       
application           YOU       YOU       PROVIDER  
operating system      YOU       PROVIDER  PROVIDER  
virtual network       YOU       PROVIDER  PROVIDER  
hypervisor            PROVIDER  PROVIDER  PROVIDER  
physical servers      PROVIDER  PROVIDER  PROVIDER  
data centre           PROVIDER  PROVIDER  PROVIDER  

Incident: bucket left public -> responsible in every model: {'YOU'}

The split in this toy is simplified (real services differ in detail), but the top two rows hold for every model: your data and who can access it are always yours.

  • Shared responsibility model: the provider and the customer each secure a different part of the system. AWS words it as:
  • Security OF the cloud (provider): "protecting the infrastructure that runs all of the services" — the hardware, software, networking and facilities.
  • Security IN the cloud (customer): "determined by the AWS Cloud services that a customer selects".
  • AWS's examples: for Amazon EC2 (IaaS) the customer manages the guest operating system (including updates and security patches), installed applications, and the security group (the virtual firewall) on each instance. For abstracted services like Amazon S3 the customer manages their data (including encryption options), classifies their assets, and uses IAM tools to set permissions.
  • Gartner (Is the Cloud Secure?, 10 October 2019): "Through 2025, 99% of cloud security failures will be the customer's fault."

Lesson: read the provider's responsibility notes for each service you use; the split changes per service.

Step 3: regions and availability zones

Real-life example: one warehouse by the river (a monsoon flood stops every order), a second warehouse in another part of the city with its own power, and branches in other cities.

  • Availability (episode 2): systems and data are there when needed.
  • Single point of failure: one part whose failure stops everything.
  • Region: a separate geographic area with several data centres. AWS: "Each Region is designed to be isolated from the other Regions."
  • Availability zone (AZ): an isolated location within a region. AWS: each AZ "consists of one or more discrete data centers, each with redundant power, networking, and connectivity, and housed in separate facilities", and the AZs in a region are connected by low-latency, redundant networking.
  • Region names look like ap-south-1 (AWS Mumbai); zone names add a letter, like ap-south-1a.

Demo 2: one zone vs two

# One Availability Zone vs two: a flood hits zone A (toy simulation).
def serve(placement, failed_zone):
    alive = [srv for srv, zone in placement if zone != failed_zone]
    return f"{len(alive)} of {len(placement)} servers up -> " + \
           ("SITE UP" if alive else "SITE DOWN")

one_zone = [("web-1", "ap-south-1a"), ("web-2", "ap-south-1a")]
two_zone = [("web-1", "ap-south-1a"), ("web-2", "ap-south-1b")]

print("flood in ap-south-1a")
print("  both servers in one zone :", serve(one_zone, "ap-south-1a"))
print("  spread over two zones    :", serve(two_zone, "ap-south-1a"))

Real output:

flood in ap-south-1a
  both servers in one zone : 0 of 2 servers up -> SITE DOWN
  spread over two zones    : 1 of 2 servers up -> SITE UP

Spread anything important across at least two AZs; keep backups in another region; choose regions close to users or where the law requires the data to stay.

Step 4: accounts, subscriptions, projects and landing zones

Real-life example: a family keeps the science kit, the gold and old notes in one bank locker; clearing out the kit throws out the gold too. Separate lockers, one key each.

  • Production (prod): the live system real customers use. Development (dev) and test: where changes are built and tried.
  • Blast radius: how much damage one mistake or one stolen credential can do.
  • Account / subscription / project: the isolation container in AWS / Azure / Google Cloud. Each has its own resources, permissions and bill. A stolen dev credential opens only the dev "locker".
  • Organisation: the top level that groups many accounts and applies rules to all of them.
  • Guardrail: a rule set centrally that no account can break (episode 66 goes deeper).
  • Landing zone: a ready-made, multi-account setup built once, before any application arrives. AWS: "A landing zone is a well-architected, multi-account AWS environment that is scalable and secure." Typical pieces: the organisation with guardrails, a security account, a log archive account that app teams can't delete from, then one account per workload and stage (dev, test, prod). Every new account starts with logging, guardrails and a safe network.

Step 5: public storage buckets and cloud audit logs

  • Object storage: a service that stores files ("objects") in containers called buckets; Amazon S3 is one example.
  • Cloud misconfiguration: a setting left unsafe (public storage, open ports, logging off). No hacking is needed to exploit it.
  • ACL (access control list): here, a per-bucket or per-object list of who may read or write.

Demo 3: the public bucket

# A toy storage bucket: one setting decides who can read it.
bucket = {"name": "shop-invoices", "acl": "public-read",
          "files": ["invoice-1001.pdf", "customers.csv"]}
account_block_public = False          # the safety switch

def anonymous_list(b):
    if account_block_public:
        return "AccessDenied (Block Public Access is on)"
    if b["acl"] == "public-read":
        return b["files"]
    return "AccessDenied"

print("stranger lists the bucket:", anonymous_list(bucket))
account_block_public = True           # turn the switch on
print("after Block Public Access:", anonymous_list(bucket))

Real output:

stranger lists the bucket: ['invoice-1001.pdf', 'customers.csv']
after Block Public Access: AccessDenied (Block Public Access is on)
  • Block Public Access: an AWS setting (account-wide or per bucket) that overrides any bucket or object setting that would make data public. Since April 2023 (rollout began 5 April 2023), AWS automatically enables S3 Block Public Access and disables ACLs for all new buckets. Keep it on unless a bucket truly must be a public website.

Demo 4: who made it public? The audit log

  • Cloud audit log: a record of every management action on your cloud account: who, what, when, from where, and the result.
# Who made the bucket public? Search the audit log (toy events).
LOG = [
  {"time": "09:02", "who": "asha",      "action": "CreateBucket",  "target": "shop-invoices"},
  {"time": "09:05", "who": "asha",      "action": "PutObject",     "target": "shop-invoices"},
  {"time": "23:41", "who": "ci-deploy", "action": "PutBucketAcl",  "target": "shop-invoices",
   "detail": "acl=public-read", "from_ip": "203.0.113.7"},
  {"time": "23:43", "who": "anonymous", "action": "ListObjects",   "target": "shop-invoices"},
]
for e in LOG:
    if e["action"] in ("PutBucketAcl", "PutBucketPolicy"):
        print("CHANGE :", e["time"], e["who"], e["action"], e["detail"], "from", e["from_ip"])
    if e["who"] == "anonymous":
        print("ACCESS :", e["time"], "anonymous", e["action"], "<- data exposed")

Real output:

CHANGE : 23:41 ci-deploy PutBucketAcl acl=public-read from 203.0.113.7
ACCESS : 23:43 anonymous ListObjects <- data exposed
Cloud Audit log Key facts
AWS CloudTrail records who made each request, the action, parameters and response; Event history shows the past 90 days of management events with no setup; create a trail for a complete, longer record (including data events)
Azure Activity Log (Azure Monitor) records control-plane operations (create a VM, change a key vault policy); Azure keeps events for 90 days; export with a diagnostic setting to keep longer
Google Cloud Cloud Audit Logs four types: Admin Activity, Data Access, System Event, Policy Denied; Admin Activity logs are always written and can't be disabled; Data Access logs are off by default (except BigQuery)
  • Management (control-plane) event: an action that changes configuration (create, update, delete). Data (data-plane) event: reading or writing the data itself (e.g. getting an object).
  • Send logs to the protected log archive account so an attacker can't delete the evidence.

Step 6: CSPM and cloud security posture

  • Inventory: a list of every resource you have and its settings.

Demo 5: a toy CSPM

# A toy CSPM: check every resource's settings against rules, all the time.
INVENTORY = [
  {"id": "bucket/shop-invoices", "public": True,  "encrypted": True},
  {"id": "bucket/app-logs",      "public": False, "encrypted": False},
  {"id": "vm/web-1",             "open_ports": [22, 443], "mfa_admin": True},
  {"id": "account/prod",         "audit_log": False, "mfa_admin": False},
]
RULES = [
  ("public",    True,  "HIGH  storage is public"),
  ("encrypted", False, "MED   storage not encrypted"),
  ("audit_log", False, "HIGH  audit logging is off"),
  ("mfa_admin", False, "HIGH  admin has no MFA"),
]
findings = 0
for r in INVENTORY:
    for key, bad, msg in RULES:
        if r.get(key, None) == bad:
            print(f"{r['id']:22} {msg}"); findings += 1
    if 22 in r.get("open_ports", []):
        print(f"{r['id']:22} MED   SSH port 22 open to the internet"); findings += 1
print(f"posture: {findings} findings across {len(INVENTORY)} resources")

Real output:

bucket/shop-invoices   HIGH  storage is public
bucket/app-logs        MED   storage not encrypted
vm/web-1               MED   SSH port 22 open to the internet
account/prod           HIGH  audit logging is off
account/prod           HIGH  admin has no MFA
posture: 5 findings across 4 resources
  • SSH: Secure Shell, remote login to a server (port 22).
  • MFA: multi-factor authentication (episode 29): a second proof besides the password.
  • CSPM (cloud security posture management): a term Gartner coined for tools that identify misconfiguration and compliance risks in the cloud and continuously monitor for gaps in policy enforcement; some only alert, some fix automatically, and results can be mapped to frameworks and regulations.
  • Cloud security posture: the overall state of all your cloud security settings at one moment — how exposed you are right now.

The frameworks

  • AWS Well-Architected Framework: AWS's guidance for building good cloud systems. Its security pillar has seven best practice areas: security foundations, identity and access management, detection, infrastructure protection, data protection, incident response, application security.
  • CSA Cloud Controls Matrix (CCM): from the Cloud Security Alliance, "a cybersecurity control framework for cloud computing" with 197 control objectives in 17 domains; it also indicates which party in the cloud supply chain should implement each control.
  • Control objective: a statement of what a security control must achieve.

The whole chain

  1. Don't build a kitchen, rent one → IaaS, PaaS, SaaS.
  2. "The provider secures it" fails → shared responsibility (OF vs IN the cloud).
  3. One data centre floods → availability zones and regions.
  4. One account holds everything → separate accounts, a landing zone.
  5. One public setting leaks invoices → Block Public Access, audit logs.
  6. Too much to check by hand → CSPM, posture, Well-Architected, CCM.

Common mistakes (and the fix)

Mistake What you see Why Fix
"the cloud provider secures it" stranger lists the bucket: ['invoice-1001.pdf', 'customers.csv'] data and access are always the customer's learn each service's responsibility split
all servers in one zone 0 of 2 servers up -> SITE DOWN single point of failure spread across two or more AZs
dev, test and prod in one account a dev cleanup script deletes production huge blast radius separate accounts, a landing zone
audit logs kept in the app account the attacker deletes the evidence logs not protected send logs to a locked log archive account
relying on the 90-day event history the incident is older than 90 days; no record default retention is short create a trail / diagnostic export to long-term storage
Block Public Access turned off "to fix a bug" anonymous ListObjects in the audit log one setting exposes everything keep it on; serve public files via a CDN or website bucket deliberately

Mini project: a cloud posture report

Extend Demo 5 into a small posture report. (1) Add five more resources (a database, a second VM, a function, two buckets). (2) Add rules for "versioning off", "public IP on a database" and "backup missing". (3) Give each finding a score (HIGH = 3, MED = 2, LOW = 1) and print a posture score per account. (4) Map each rule to one of the seven Well-Architected security areas. (5) Print the findings sorted by severity.

Practice

1. Classify: a company runs WordPress on a rented virtual machine; another uses an online email service; a third uploads Python code to a service that runs and scales it.

Solution

Virtual machine = IaaS (they patch the OS). Online email = SaaS. Upload code, platform runs it = PaaS.

2. In the IaaS column of Demo 1, why is "operating system" YOU?

Solution

With IaaS you rent a virtual machine and install/run its operating system yourself, so patches and hardening are yours. AWS's EC2 example says the customer manages the guest OS "including updates and security patches".

3. Add a rule to the toy CSPM that flags buckets with versioning off.

Solution
INVENTORY[0]["versioning"] = False
RULES.append(("versioning", False, "LOW   bucket versioning is off"))

Run again: bucket/shop-invoices LOW bucket versioning is off appears and the total becomes 6.

4. Make the toy audit search also report deletions (DeleteBucket, DeleteObject).

Solution
LOG.append({"time": "23:50", "who": "ci-deploy", "action": "DeleteObject", "target": "shop-invoices"})
for e in LOG:
    if e["action"].startswith("Delete"):
        print("DELETE :", e["time"], e["who"], e["action"], e["target"])

Output adds DELETE : 23:50 ci-deploy DeleteObject shop-invoices.

5. Your app runs in one region across three zones. What failure does that NOT protect against, and what would?

Solution

A problem affecting the whole region (rare but possible). Backups (and, for critical systems, a standby setup) in a second region.

6. Sketch a landing zone for a small online shop.

Solution

Organisation (guardrails: no disabling audit logs, Block Public Access enforced, only approved regions) → security account (security tools, read-only access to all) → log archive account (all audit logs, write-once) → shared services (CI/CD) → shop-dev, shop-test, shop-prod accounts.

Quick quiz

A: the SaaS provider, it's their software
B: the customer, sharing settings and data are theirs
C: the data centre owner
D: nobody, it's the internet

A company's SaaS spreadsheet is shared with "anyone with the link" and customer data leaks. Whose responsibility?

Answer

B. Even in SaaS, where the provider runs almost everything, the customer is responsible for their data, their users and how it is shared.

Interview questions

  1. Explain the shared responsibility model. The provider secures the cloud itself (facilities, hardware, hypervisor, its managed services); the customer secures what they put in it (data, identities, configuration, and for IaaS the OS and apps). The split depends on the service.
  2. IaaS vs PaaS vs SaaS from a security view? Moving towards SaaS, the provider takes more layers; data, identity and access configuration stay with the customer in every model.
  3. What is an availability zone and why use several? One or more separate data centres with their own power and networking inside a region; spreading across AZs removes a single point of failure.
  4. Why use multiple accounts? To shrink blast radius, separate environments, simplify permissions and billing, and protect security tooling and logs.
  5. What is a landing zone? A pre-built, well-architected multi-account environment with guardrails, central logging and security accounts, ready before workloads arrive.
  6. Why do public buckets keep leaking data, and what prevents it? One misconfigured setting makes data readable without a password; account-wide Block Public Access (default for new S3 buckets since April 2023), CSPM checks and audit-log alerts.
  7. Name the main cloud audit logs. AWS CloudTrail, Azure Activity Log, Google Cloud Audit Logs (Admin Activity always on; Data Access off by default).
  8. What is CSPM? Tools that continuously compare cloud configuration with best practices and compliance rules, alert on misconfigurations and sometimes fix them.
  9. What is cloud security posture? The overall security state of all your cloud settings at a point in time.
  10. What are the Well-Architected security pillar and the CSA CCM? AWS's security guidance in seven areas; and an industry cloud control framework of 197 control objectives in 17 domains.

Glossary

Term Meaning
on-premises your own servers in your own building
data centre a building full of servers
cloud provider a company that rents out computing from its data centres
cloud computing renting computers, storage and software over the internet, on demand
on-demand self-service adding resources yourself without contacting the provider
broad network access reachable over the network from many devices
resource pooling many customers sharing the same hardware
rapid elasticity growing and shrinking resources quickly
measured service metered usage, pay per use
IaaS infrastructure as a service: rent VMs, storage, networks; you run the OS and apps
PaaS platform as a service: upload code; the provider runs the platform
SaaS software as a service: use finished software
virtual machine (VM) a software computer running on a physical server
hypervisor software that runs and separates virtual machines
public / private / community / hybrid cloud NIST's four deployment models
shared responsibility model provider and customer each secure different parts
security OF the cloud the provider's part: facilities, hardware, infrastructure
security IN the cloud the customer's part: data, access, configuration
security group AWS's virtual firewall around an instance
availability systems and data are there when needed
single point of failure one part whose failure stops everything
region a separate geographic area of a cloud
availability zone (AZ) isolated data centre(s) inside a region with their own power and networking
production (prod) the live system customers use
blast radius how much damage one mistake or stolen credential can do
account / subscription / project the isolation container in AWS / Azure / Google Cloud
organisation the top level grouping many accounts
guardrail a central rule no account can break
landing zone a ready-made, well-architected multi-account environment
object storage a service storing files (objects) in buckets
bucket a container of objects in object storage
ACL access control list: who may read or write
cloud misconfiguration a setting left unsafe
Block Public Access an AWS setting that overrides anything making S3 data public
cloud audit log a record of management actions: who, what, when, where
CloudTrail AWS's audit log service
Azure Activity Log Azure's log of control-plane operations
Cloud Audit Logs Google Cloud's audit logs (Admin Activity, Data Access, System Event, Policy Denied)
management (control-plane) event an action that changes configuration
data (data-plane) event reading or writing the data itself
inventory a list of all resources and their settings
SSH Secure Shell remote login (port 22)
MFA multi-factor authentication
CSPM cloud security posture management: continuous checks of cloud settings
cloud security posture the overall security state of your cloud settings now
AWS Well-Architected Framework AWS's guidance for good cloud systems; the security pillar has 7 areas
CSA Cloud Controls Matrix (CCM) a cloud control framework: 197 control objectives, 17 domains
control objective what a security control must achieve

Summary

  • Cloud computing is renting computing over the internet; NIST lists five essential characteristics.
  • IaaS, PaaS and SaaS hand more layers to the provider, but your data and access are always yours.
  • The provider secures the cloud; you secure what you put in it (shared responsibility).
  • Spread across availability zones; keep backups in another region.
  • Separate accounts shrink blast radius; a landing zone sets them up safely from day one.
  • Public buckets are the classic leak: keep Block Public Access on.
  • Audit logs (CloudTrail, Azure Activity Log, Cloud Audit Logs) answer who changed what; protect and retain them.
  • CSPM checks posture continuously against frameworks like Well-Architected and the CSA CCM.
  • Next episode: cloud IAM, networking and data protection.

Sources (fetched 13 Nov 2026)

  • NIST SP 800-145, The NIST Definition of Cloud Computing: https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-145.pdf
  • AWS Well-Architected security pillar, shared responsibility: https://docs.aws.amazon.com/wellarchitected/latest/security-pillar/shared-responsibility.html
  • AWS Well-Architected security pillar, definition (seven areas): https://docs.aws.amazon.com/wellarchitected/latest/framework/sec-def.md
  • Smarter with Gartner, Is the Cloud Secure? (2019): https://gcom.pdo.aws.gartner.com/smarterwithgartner/is-the-cloud-secure
  • AWS Regions and Availability Zones: https://docs.aws.amazon.com/global-infrastructure/latest/regions/aws-regions-availability-zones.html
  • AWS Prescriptive Guidance, What is a landing zone?: https://docs.aws.amazon.com/prescriptive-guidance/latest/migration-aws-environment/understanding-landing-zones.html
  • AWS What's New, S3 security best practices for new buckets (April 2023): https://aws.amazon.com/about-aws/whats-new/2023/04/amazon-s3-security-best-practices-buckets-default
  • AWS CloudTrail FAQs: https://aws.amazon.com/cloudtrail/faqs/
  • Azure Monitor activity log: https://learn.microsoft.com/en-us/azure/azure-monitor/platform/activity-log
  • Google Cloud Audit Logs overview: https://docs.cloud.google.com/logging/docs/audit
  • TechTarget, Cloud security posture management (CSPM): https://www.techtarget.com/cybersecurity/definition/cloud-security-posture-management-CSPM
  • Cloud Security Alliance, Cloud Controls Matrix: https://cloudsecurityalliance.org/research/cloud-controls-matrix/