Appearance
Cloud Fundamentals
517. What is cloud computing?
The short answer
Cloud computing is renting computing resources, such as servers, storage, databases and networks, from a provider over the internet, instead of buying and running your own. You create them on demand in minutes, through a website or an API, use as much or as little as you need, and pay only for what you use. The provider owns and runs the data centres, the hardware and much of the software underneath.
The US standards body NIST describes five essential characteristics. They are a good checklist for "is this really cloud?":
| Characteristic | In plain words |
|---|---|
| On-demand self-service | You create resources yourself, instantly, without asking anyone |
| Broad network access | You reach them over the network, from anywhere |
| Resource pooling | Many customers share the provider's huge pool of hardware |
| Rapid elasticity | You can grow or shrink quickly, even automatically |
| Measured service | Usage is metered, and you pay for what you use |
What changes compared with your own data centre:
- Speed. A new server takes minutes, not a purchase order and weeks of waiting for hardware.
- Cost shape. No big upfront purchase. You pay monthly, for what you used (question 523).
- Scale. You can use a thousand machines for an hour, and then none.
- Global reach. Data centres on every continent, available to anyone.
- Managed services. Databases, queues and Kubernetes run by the provider, so you do not patch or back up their servers yourself.
What does not change: you still design, secure and operate your applications and your data. Responsibility is shared, not handed over (question 521).
518. What is the difference between IaaS, PaaS, SaaS, and FaaS?
The short answer
They differ in how much the provider runs for you. With infrastructure as a service, IaaS, you rent virtual machines, networks and disks, and manage everything from the operating system up. With platform as a service, PaaS, you hand over your code or container and the provider runs the platform it needs. With software as a service, SaaS, you just use a finished application, such as email. Functions as a service, FaaS, runs small pieces of code only when an event happens, with no servers for you to see at all.
| Model | You get | You manage | Examples |
|---|---|---|---|
| IaaS | Virtual machines, disks, networks | OS, patches, runtime, app, data | AWS EC2, Azure Virtual Machines |
| PaaS | A platform that runs your code or container | App and data | Azure App Service, AWS Elastic Beanstalk, Google App Engine |
| SaaS | A finished application | Your data and users | Microsoft 365, Gmail, Salesforce |
| FaaS | Code run per event | The function's code and its permissions | AWS Lambda, Azure Functions |
Two more you will hear:
- CaaS, containers as a service: you give the provider a container image and it runs it, without you running a cluster, such as Azure Container Apps, AWS Fargate or Google Cloud Run (question 562).
- Managed services, such as managed databases, are a form of PaaS for one specific job.
How to choose: use the highest level that still meets your needs. Every layer the provider runs is a layer you do not have to patch, scale or wake up for. Drop to a lower level only when you need control the higher level does not give.
519. What are public, private, hybrid, and multi-cloud models?
The short answer
A public cloud is run by a provider such as AWS, Azure or Google Cloud and shared by many customers, each kept separate. A private cloud is cloud-style infrastructure used by one organisation only, usually in its own data centre. Hybrid cloud connects private infrastructure and a public cloud so they work together. Multi-cloud means using more than one public cloud provider.
| Model | What it is | Why organisations choose it | Main cost |
|---|---|---|---|
| Public | Shared provider infrastructure | Speed, scale, managed services | Less control, ongoing bills |
| Private | Cloud-style platform for one organisation | Control, specific rules, existing investment | You run everything |
| Hybrid | Private and public joined together | Gradual migration, data that must stay on site | Networking and operations across two worlds |
| Multi-cloud | Several public providers | Best service per job, negotiating power, acquisitions | Several skill sets, harder security and networking |
Hybrid in practice. A bank keeps its core ledger in its own data centre, for regulation, and runs its mobile app back ends in Azure. A private connection, such as ExpressRoute or Direct Connect, joins the two networks (question 536).
Multi-cloud, honestly. It is often the result of history, such as a company bought another that used a different cloud, more than of design. Running one application across two clouds at once, for resilience, is rare and expensive: you can only use features both offer, and you need deep skills in both. A more common and sensible form is "each workload on the cloud that suits it best".
520. What are regions, availability zones, and edge locations?
The short answer
A region is a geographic area, such as West Europe, containing several data centres. An availability zone is one or more separate data centres inside a region. Each zone has its own power, cooling and networking. Zones are close enough to each other for fast connections. They are far enough apart that one failure, such as a fire or a power cut, does not take out the others. Edge locations are many smaller sites near users, used for content delivery and DNS. You spread an application across zones to survive a data-centre failure, and across regions to survive a regional one.
| Level | What it is | Protects against | Use it for |
|---|---|---|---|
| Availability zone | Separate data centres in a region | A building, power or network failure | High availability: run copies in two or three zones |
| Region | A geographic area with several zones | A regional outage or disaster | Disaster recovery, low latency, data residency laws |
| Edge location | A small site near users | Distance, slow responses | CDN caching, DNS, edge security |
Design rules that follow:
- Production should run in at least two zones, ideally three. Spread nodes, pods and databases so one zone failing leaves enough capacity (question 396).
- Some services are zonal and some are regional. A virtual machine and its disk live in one zone. A zone-redundant database or storage account copies data across zones for you. Check which kind you are using.
- Choose regions for users and laws. Data protection rules, such as the GDPR in Europe, may require that personal data stays in certain countries. This is called data residency.
- Crossing zones and regions can cost money for the data sent between them, which matters for chatty services (question 590).
Region pairs. Azure pairs most regions with another in the same geography, for example North Europe with West Europe, and spaces out platform updates between the two, which helps disaster recovery planning.
521. What is the shared responsibility model?
The short answer
It describes which parts of security and operations the cloud provider handles, and which remain yours. The provider is responsible for the security of the cloud: its buildings, hardware, network and virtualisation, and the internals of its managed services. You are responsible for security in the cloud: your data, who can access what, how resources are configured, and, for virtual machines, patching the operating system. The more managed the service, the more the provider covers, but your data and access are always yours.
| Layer | IaaS, such as a VM | PaaS, such as a managed database | SaaS, such as email |
|---|---|---|---|
| Physical buildings, hardware | Provider | Provider | Provider |
| Virtualisation, host OS | Provider | Provider | Provider |
| Guest OS, patching | You | Provider | Provider |
| Runtime, database engine | You | Provider | Provider |
| Network rules, firewalls | You | You, with provider defaults | Provider |
| Application code | You | You | Provider |
| Identities and access | You | You | You |
| Data, and its classification | You | You | You |
Why it matters: most cloud breaches are on the customer's side. The provider's infrastructure is very rarely the weak point. Typical incidents are:
- A storage bucket left open to the public, exposing customer files (question 557).
- Leaked access keys, committed to a public repository (question 558).
- Over-broad permissions, letting a compromised app reach everything.
- Unpatched virtual machines, which on IaaS are your job.
What "your side" always includes, whatever the service: identity and access management, protecting your data, including choosing encryption and backups, and configuring the service safely. A managed database is patched by the provider, but if you allow connections from the whole internet with a weak password, that is your responsibility.
522. What is the difference between scalability and elasticity, and between vertical and horizontal scaling?
The short answer
Scalability is a system's ability to handle more load by adding resources. Elasticity is doing that automatically, in both directions, adding resources when demand rises and removing them when it falls, so you pay only for what you need at each moment. Vertical scaling means making one machine bigger, with more CPU or memory. Horizontal scaling means adding more machines and spreading the load across them. Cloud systems favour horizontal scaling, because it has no hard ceiling and also gives redundancy.
| Vertical scaling, scale up | Horizontal scaling, scale out | |
|---|---|---|
| How | A bigger machine | More machines |
| Ceiling | The largest machine size available | Effectively none |
| Downtime to change | Often a restart | None, add and remove copies live |
| Redundancy | None, one machine | Yes, others keep serving if one fails |
| Application requirement | None | Must work with several copies: stateless, or carefully shared state |
| Typical use | Databases, legacy apps | Web servers, APIs, workers |
Scalability versus elasticity, with an example. The shop's traffic is ten times higher on Black Friday than on a normal Tuesday.
- Scalable: the system can be made to handle Black Friday, for example by adding servers in advance.
- Elastic: the system adds servers by itself as traffic rises during the day, and removes them at night, through autoscaling (questions 397 and 560).
What horizontal scaling requires of an application:
- No state kept in one copy's memory or local disk. Sessions go into a shared store, such as Redis. Files go into object storage.
- A load balancer spreading requests across the copies.
- Safe concurrency: two copies handling related requests at once must not corrupt shared data.
Databases are the classic part that scales vertically first, then horizontally with read replicas or sharding, which is splitting data across several databases (question 576).
523. What is the difference between CapEx and OpEx, and what cloud pricing models exist?
The short answer
CapEx, capital expenditure, is money spent up front on things you own, such as buying servers for a data centre. OpEx, operating expenditure, is ongoing spending on things you use, such as a monthly cloud bill. The cloud turns most infrastructure cost into OpEx. There are three main pricing models. On-demand is paid per second or per hour, with no commitment. Reserved capacity and savings plans are discounted in exchange for a one-year or three-year commitment. Spot is very cheap spare capacity that the provider can take back at short notice.
| Model | Discount compared with on-demand | Commitment | Can be taken away | Good for |
|---|---|---|---|---|
| On-demand | None | None | No | Unpredictable or short-lived use |
| Reserved instances, savings plans | Often 30% to 70% | 1 or 3 years | No | Steady, always-on workloads |
| Spot | Often 60% to 90% | None | Yes, at short notice | Batch jobs, CI runners, stateless workers |
About spot. Spot capacity is the provider's unused machines. When the provider needs them back, it gives a short warning, about two minutes on AWS and as little as 30 seconds on Azure, then stops your machine. That is fine for work that can be interrupted and retried, such as image processing, build runners, or extra copies of a stateless service. It is not fine for a single database.
Other pricing points that surprise people:
- Data leaving the cloud costs money. Data going out to the internet, called egress, is charged per gigabyte, while data coming in is usually free. Data moving between zones or regions often costs too.
- Storage keeps billing. Old snapshots, unattached disks and forgotten buckets cost money every month.
- Managed services have their own meters: per request, per gigabyte stored, per hour of capacity.
- Free tiers exist for learning and small workloads, but have limits that are easy to pass.
Why CapEx versus OpEx matters to a business. Buying servers locks money in years ahead, based on a capacity guess. Paying for use lets spending follow demand, at the price of a higher per-unit cost and the need to manage the bill actively (question 591).
524. What are the pillars of the Well-Architected Framework?
The short answer
The Well-Architected Frameworks from AWS and Azure are checklists of good design, grouped into pillars. Both include reliability, security, cost optimisation, operational excellence and performance efficiency, and AWS adds a sixth, sustainability. They are used to review a design, find risks, and make trade-offs between the pillars explicit, because improving one, such as reliability, often costs another, such as money.
| Pillar | The question it asks |
|---|---|
| Reliability | Does it keep working when parts fail, and recover quickly? |
| Security | Are data, identities and systems protected? |
| Cost optimisation | Are we paying only for what delivers value? |
| Operational excellence | Can we deploy, monitor and improve it smoothly? |
| Performance efficiency | Does it use resources well as load changes? |
| Sustainability, AWS | Does it minimise energy and environmental impact? |
How they are used. A team runs a structured review, answering questions for each pillar, such as "how do you back up data, and have you tested restoring it?". The output is a list of risks, ranked, with improvements. AWS and Azure both provide free review tools and detailed guidance per pillar. Google Cloud publishes a similar Architecture Framework.
Trade-offs are the point. Running in three zones and two regions improves reliability and raises cost. Caching improves performance and adds operational complexity. The framework makes these choices deliberate and visible, instead of accidental.
525. What does "cloud-native" mean?
The short answer
Cloud-native means designing applications to take full advantage of how the cloud works, rather than just moving old servers into it. In practice: small, independently deployable services packaged in containers, run by an orchestrator or managed platform, built to tolerate failures, scaled horizontally and automatically, configured and deployed entirely through automation, and observable from the outside. The Cloud Native Computing Foundation describes it as scalable, resilient, manageable and observable systems, deployed often and predictably.
The usual ingredients:
- Containers, so each service is packaged with its dependencies (question 16).
- Dynamic orchestration, such as Kubernetes or a managed container platform, placing and healing workloads (question 309).
- Services split where it helps, so teams can deploy independently. Not necessarily microservices everywhere: splitting too much creates its own problems.
- Managed services for databases, queues and storage, instead of running your own.
- Automation: infrastructure as code (question 595) and CI/CD (question 171).
- Resilience by design: retries, timeouts, health checks, graceful shutdown, multiple zones.
- Observability: metrics, logs and traces built in (question 623).
- Stateless processes, configuration from the environment, as described by the Twelve-Factor App principles (question 226).
What it is not: taking an old application and running it unchanged on a cloud virtual machine. That is a "lift and shift" migration, often a sensible first step, but it gains little of the cloud's elasticity or resilience (question 529).
526. How do the main AWS, Azure, and Google Cloud services map to each other?
The short answer
The three big clouds offer similar building blocks under different names: virtual machines, managed Kubernetes, serverless functions, object storage, managed databases, virtual networks, load balancers, DNS, identity and access, key and secret stores, and monitoring. Knowing the equivalents lets you translate a design from one cloud to another, and answer questions about whichever cloud an interviewer uses.
| Building block | AWS | Azure | Google Cloud |
|---|---|---|---|
| Virtual machines | EC2 | Virtual Machines | Compute Engine |
| Autoscaling VM groups | Auto Scaling groups | Virtual Machine Scale Sets | Managed instance groups |
| Managed Kubernetes | EKS | AKS | GKE |
| Serverless containers | Fargate, App Runner | Container Apps | Cloud Run |
| Serverless functions | Lambda | Functions | Cloud Run functions |
| Container registry | ECR | Container Registry | Artifact Registry |
| Object storage | S3 | Blob Storage | Cloud Storage |
| Block disks | EBS | Managed Disks | Persistent Disk |
| Shared files | EFS | Azure Files | Filestore |
| Relational database | RDS, Aurora | Azure SQL, Database for PostgreSQL | Cloud SQL, AlloyDB |
| NoSQL database | DynamoDB | Cosmos DB | Firestore, Bigtable |
| Cache | ElastiCache | Azure Cache for Redis | Memorystore |
| Message queue | SQS | Service Bus | Pub/Sub |
| Private network | VPC | Virtual Network | VPC |
| Layer 4 load balancer | Network Load Balancer | Load Balancer | Network load balancing |
| Layer 7 load balancer | Application Load Balancer | Application Gateway, Front Door | Application load balancing |
| DNS | Route 53 | Azure DNS | Cloud DNS |
| CDN | CloudFront | Front Door | Cloud CDN |
| Identity and access | IAM | Entra ID with Azure RBAC | Cloud IAM |
| Secrets | Secrets Manager | Key Vault | Secret Manager |
| Encryption keys | KMS | Key Vault | Cloud KMS |
| Monitoring and logs | CloudWatch | Azure Monitor | Cloud Monitoring, Cloud Logging |
| Native infrastructure as code | CloudFormation | Bicep, ARM templates | Infrastructure Manager |
Differences that matter more than names:
- Identity. Azure separates the directory of people and apps, Entra ID, from permissions on resources, Azure RBAC. AWS IAM combines both inside each account (questions 546 and 548).
- Organising resources. Azure has subscriptions and resource groups. AWS has accounts. Google Cloud has projects (question 527).
- Networks across zones. An Azure virtual network and a Google VPC span a whole region, or for Google even every region. In AWS, a VPC spans a region but each subnet sits in one zone (question 530).
527. How should cloud accounts, subscriptions, projects, and resource groups be organized?
The short answer
Use the cloud's hierarchy to separate workloads and environments into their own containers, so access, costs, quotas and mistakes stay contained. A common shape is: separate accounts or subscriptions for production and non-production, and often per team or per application, grouped under an organisation with central rules. A landing zone is a ready-made version of this structure, with central identity, networking, logging and guardrails already in place, so every new workload starts secure.
The three clouds' hierarchies:
| Level | AWS | Azure | Google Cloud |
|---|---|---|---|
| Top | Organization | Entra ID tenant | Organization |
| Grouping | Organizational units | Management groups | Folders |
| Billing and isolation boundary | Account | Subscription | Project |
| Grouping inside | Tags | Resource groups | Labels |
| Central rules | Service control policies | Azure Policy | Organization policies |
Why separate accounts or subscriptions:
- Blast radius. A leaked non-production credential cannot touch production resources at all.
- Access. Developers can have broad rights in non-production and very narrow ones in production.
- Costs. Bills split naturally by team and environment.
- Quotas and limits. One team's load test cannot use up production's quota of machines.
A landing zone sets all this up as a standard starting point: the hierarchy, central identity, a hub network with shared connectivity, central logging and security monitoring, and guardrail policies. AWS Control Tower and Azure Landing Zones provide templates. New workloads then get a subscription or account "vended" into this structure, already compliant.
528. What is a good tagging strategy, and why does it matter?
The short answer
Tags are key and value labels attached to cloud resources, such as team=checkout or env=prod. A good strategy picks a small, required set, such as owner, team, environment, application and cost centre, applies them consistently everywhere, and enforces them with policies, so untagged resources cannot be created. They make it possible to split the bill by team, find who owns a resource, automate things like backups or night-time shutdowns, and apply security rules by data sensitivity.
A typical required set:
| Tag | Example | Used for |
|---|---|---|
owner | checkout-team@shop.example.com | Who to call |
application | checkout | Grouping, dashboards |
env | prod, staging, dev | Rules, costs, clean-up |
cost-center | CC-1042 | Billing back to departments |
data-classification | confidential | Security rules |
managed-by | terraform | Warn people not to edit by hand |
Making it stick:
- Enforce at creation. Azure Policy can deny resources without required tags, or add them automatically. AWS offers tag policies through Organizations, and service control policies can require tags on some actions.
- Set them in infrastructure as code, as default tags for every resource a module creates, so nobody has to remember (question 595).
- Know about inheritance. In Azure, tags on a resource group are not copied to the resources inside it by default. A policy can do that copying.
- Report and clean up. A regular report of untagged or wrongly tagged resources, sent to their creators, keeps the data honest.
What tags enable: cost reports per team (question 591), automatic shutdown of env=dev machines at night, backup policies by tag, and quick answers during incidents, such as "who owns this public IP address?".
529. What are the common cloud migration strategies, often called the 7 Rs?
The short answer
They are seven choices for each application when moving to the cloud. Retire it, because nobody needs it. Retain it, leaving it where it is for now. Rehost it, moving it as it is onto cloud virtual machines, called lift and shift. Relocate it, moving whole virtualised environments with little change. Repurchase it, replacing it with a SaaS product. Replatform it, making small changes to use managed services, such as a managed database. Or refactor it, redesigning it to be cloud-native. Different applications in one company usually get different Rs.
| Strategy | What happens | Effort | Benefit |
|---|---|---|---|
| Retire | Switch it off | Lowest | Removes cost and risk |
| Retain | Leave it on premises for now | None | Time to decide |
| Rehost, lift and shift | Same app, on cloud VMs | Low | Fast exit from the data centre |
| Relocate | Move a virtualised platform, such as VMware, wholesale | Low | Very fast, minimal change |
| Repurchase | Replace with a SaaS product | Medium | No more running it |
| Replatform | Small changes, such as a managed database | Medium | Less to operate |
| Refactor, re-architect | Redesign for the cloud | Highest | Elasticity, resilience, speed |
How companies choose. An assessment looks at each application's value, how much it changes, its dependencies, and its technical health:
- A stable, rarely changed internal tool: rehost, or even retire.
- A home-grown expense system: repurchase a SaaS product.
- A core, fast-changing customer-facing app: replatform first, then refactor where it pays off.
A common path is rehost first, to leave the data centre on time, then improve the most important applications step by step. The risk is stopping after step one: lifted-and-shifted applications often cost more in the cloud than they did on premises, because they were sized for owned hardware and use none of the cloud's elasticity.