Skip to content
Tech Atlas, home
Search
Esc
  • All roadmapsBrowse every learning path
  • ExploreFind a technology area
  • ProjectsGuided projects and builds
  • My AtlasYour learning dashboard
Lesson 1 of 6 · Concept · 25 min · revision 3

What you rent, what you still own, and which service to pick

The NIST service models (IaaS, PaaS, SaaS) and where functions fit, the shared responsibility model, regions and availability zones, how to choose between virtual machines, managed containers, serverless functions and managed databases, and the resource contract that every cloud lab in this skill follows.

Contentsand lesson path

What you will learn

  • Explain the shared responsibility model, regions and availability zones, and when to choose virtual machines, managed containers, serverless functions or managed databases.

Prerequisites: Networking Basics

01. Why it matters

A cloud provider rents you computers, networks and services by the second, the hour or the request, and you can create them with one API call. That speed hides two decisions that are easy to get wrong: what you are still responsible for once the provider runs part of the stack, and which kind of service to use and where to run it. The first decides whether data ends up exposed or unpatched while everyone assumes "the cloud" handles it; the second fixes your operating effort, your cost curve and which failures you survive. This lesson covers both, then sets the rules every lab here follows when it spends real money.

02. Service models and the shared responsibility line

NIST SP 800-145, the standard definition of cloud computing, names three service models. They differ in how much of the stack the provider runs for you:

  • Infrastructure as a Service (IaaS): virtual machines, virtual networks and block storage (for example Amazon EC2, Google Compute Engine, Azure Virtual Machines). You choose and patch the operating system, install the runtime and run your application.
  • Platform as a Service (PaaS): the provider runs the operating system and runtime; you deploy code or a container image (for example AWS Elastic Beanstalk, Google App Engine, Azure App Service). Managed databases such as Amazon RDS or Cloud SQL sit here too: you get a database endpoint, not a server.
  • Software as a Service (SaaS): a finished application that you configure and use (for example email, a CRM or a ticketing tool). You manage users, settings and your data.

Functions as a Service (FaaS), such as AWS Lambda or Google Cloud Run functions, came after that definition. It is a finer-grained platform model: you upload a function, the provider runs it when an event arrives, and you never see a server. Managed container services such as AWS Fargate and Google Cloud Run sit between PaaS and IaaS: you supply a container image, and the provider runs the hosts underneath it.

Two consequences follow. A managed service removes chores, not accountability: if a bucket is made public or an access key is pushed to a public repository, the provider's controls work exactly as configured, and the data is still exposed. And resilience is partly yours: the provider builds independent data centres, but only your architecture decides whether your service uses more than one of them.

03. Regions and availability zones

A region is a separate geographic area, such as Singapore or Frankfurt, with its own copy of most services. Each region contains several availability zones (AZs): one or more data centres with independent power, cooling and networking, physically separated (AWS keeps the zones of a region within about 100 km of each other) and joined by fast private links. Most resources are created in one region (a VPC, a database, a bucket) and many in one AZ (a VM, a subnet, a disk). A few services, such as IAM, are global.

Choose a region in this order:

  1. Rules first. Laws or contracts may require data to stay in a country or area. That rules regions out regardless of price.
  2. Latency to users. Every request pays the round trip to the region, so put it near most of your users.
  3. Service availability. New services and instance types reach regions at different times; check that what you need exists there.
  4. Price. The same resource can cost noticeably more in one region than another, and moving data between regions is charged.

Then decide which failure you must survive. Running across two or more AZs in one region survives the loss of a data centre at modest cost, because zones are close enough for synchronous replication and for a load balancer to spread traffic. Running across regions survives the loss of a whole region, but costs much more: you duplicate the stack, replicate data across long distances (usually asynchronously, so some recent writes can be lost) and decide how traffic fails over. Most services start multi-AZ.

04. Choosing compute and a database

Pick the option with the least to operate that still fits the workload:

  • Virtual machines: full control of the OS, kernel settings, long-lived processes and unusual protocols. You own patching, images and scaling. Most instance types give you dedicated vCPU and memory; burstable types such as AWS t3/t4g earn CPU credits while they run below a baseline share of the CPU and spend them to run above it. T3, T3a and T4g launch in unlimited mode by default: when the credits run out they keep running above the baseline, and you pay an extra charge if their average use over 24 hours stays above it. Only in standard mode is an instance slowed to the baseline when its credits run out. A Linux VM usually takes tens of seconds to a few minutes to be ready.
  • Managed containers (ECS on Fargate, Cloud Run, Azure Container Apps): you ship an OCI image, the platform runs and scales it, and nobody patches hosts. A good default for web services and workers.
  • Serverless functions (Lambda, Cloud Run functions, Azure Functions): short, event-driven work with idle periods. AWS Lambda charges per request plus duration, in 1 ms steps, scaled by the memory you configure, so an idle function costs nothing unless you turn on provisioned concurrency (environments kept warm in advance), which is billed for as long as it is enabled. Lambda Managed Instances is different: it runs your functions on EC2 instances in your account, and you pay for those instances plus a management fee while they run, busy or idle. The trade-offs: a cold start adds latency when a new execution environment is created; each invocation has a hard timeout (at most 30 minutes on standard Lambda; on Managed Instances, up to 90 minutes for asynchronous and event-source invocations); and fast scale-out can open thousands of database connections at once, so put a pooler such as RDS Proxy in front of a relational database.
  • Managed databases (RDS, Cloud SQL, Azure Database for PostgreSQL): the provider handles OS and engine patching, automated backups, point-in-time restore, failover to a standby and read replicas. You give up OS access and superuser rights, and some extensions or engine settings are unavailable. Run the database yourself on a VM only when you need what the managed service will not allow, and accept that backups, failover and patching are then your job.
A first-pass decision guide (check the details for your provider)
Workload                            First choice          Watch for
Web app or API, steady traffic      managed containers    cost of idle instances
Bursts of events, each short        functions             cold starts, DB connections
Job longer than 30 minutes          container task or VM  above the function timeout
Custom kernel module or OS agent    virtual machine       you patch and build images
Relational data, standard engine    managed database      extensions offered
Superuser or unsupported extension  database on a VM      backups, failover are yours

05. Before the labs: the resource contract

The cloud labs in this skill (lab 3, lab 7 and the skill practice) create real resources that cost real money. Other tracks (Data, Network, Security, Architecture) reuse the same folder and the same rules instead of building their own cloud set-up. Agree to these before you start:

  1. Account. Use a sandbox AWS account that holds nothing else, never a production or shared work account. Sign in through IAM Identity Center or another short-lived role session (lesson 4 explains why), not with root or a long-lived access key.
  2. Region. One region for everything, set by the region variable (the labs default to ap-southeast-1; pick one near you). The network uses two of its AZs.
  3. Tools. OpenTofu 1.10 or later (Terraform 1.10 or later works with the same files), the hashicorp/aws provider 6.24 or later, AWS CLI v2, and Python 3.11 or later for the lab scripts.
  4. Budget first. Before lab 3, create a monthly budget with an alert at a low amount, such as US$10, as shown in lesson 5. A budget alerts; it does not stop spending, so rule 6 still matters.
  5. Tags. Every resource carries Project=cloud-basics-lab, Environment=ephemeral, Owner and ExpiresAt, set once through the provider's default_tags.
  6. Teardown the same day. Finish each session with tofu destroy in the lab folder, delete anything you created by hand or with the CLI first, and confirm that a search for the Project tag returns nothing.

What it costs. The hourly charges come from the NAT gateway (per hour and per GB processed), its public IPv4 address, a small EC2 instance and, in lab 7, two small RDS instances and a Secrets Manager secret. Finishing both labs and destroying everything within a few hours should cost a few US dollars at on-demand prices (an estimate: check the AWS Pricing Calculator for your region). Left running for a month, the same resources cost tens of dollars, which is why rules 4 and 6 exist.

06. Check your understanding

Practice check · 3 questions

Service models, regions and service choice

Apply the ideas to three design decisions.

Q1. Most users of a new service are in Singapore and Jakarta. A regulation requires customer records to stay in Indonesia, and one managed service the team wanted is not offered in the Jakarta region yet. What decides the region?
Q2. A nightly report job reads a large file, runs for about 3 hours, and needs no server between runs. Which option fits?
Q3. A team is choosing where to run PostgreSQL for a new service. Which requirement is a real reason to run it on a VM instead of the provider's managed database?
Practice only: not graded, not saved, not evidence.

07. Apply it

For the skill practice you will run a small web service with a managed database behind a load balancer. Before writing any code, write half a page that records:

  • the region you chose and the rule, latency, service or price reason behind it;
  • the compute option for the service and the database option, each with one sentence on what you give up;
  • a two-column list of what the provider does and what you still own for each part (network, compute, database, data, identities, backups);
  • the failure you design for (one AZ lost) and the one you accept for now (a whole region lost).

Then set up the account to match the resource contract above, including the budget alert, before you start lab 3.

08. Review prompt

Without looking back, name the three NIST service models and say where functions and managed containers fit. State what always stays your responsibility. Explain the difference between surviving the loss of an AZ and the loss of a region, and list the four things that decide a region in order. Finally, recall the six rules of the resource contract.

References

Your progress

Reading state

Sign in to save that you finished reading this lesson.

Sign in to mark reading complete

Prove this skill

10 questions · about 8 minutes · scored automatically. Marking a lesson as read never demonstrates a skill.
Take the skill check