Cloud Engineer Top 100 Interview Questions
100 cloud engineer interview questions with structured answers, comparison tables, flow diagrams, worked calculations and runnable code. Covers cloud fundamentals, compute, storage, networking, identity and security, reliability and disaster recovery, cost optimization and architecture design, from the basics to scenario questions.
Questions 1-20 of 100
Q1.What are the essential characteristics of cloud computing?
Cloud computing delivers computing resources as a metered service over the network, which you provision yourself in minutes and release when you no longer need them. Five characteristics separate it from simply renting servers in a data center.
On-demand self-service Broad network access Resource pooling You provision resources without waiting for a person Services are reachable over standard networks and protocols The provider shares physical hardware across many customers Creating a database from a console or an API call Managing resources from a laptop or a pipeline Your virtual machine runs on hardware others also use Rapid elasticity Measured service Capacity grows and shrinks quickly, often automatically Usage is metered and billed by consumption Adding servers for a sale weekend, removing them after Paying per second of compute or per gigabyte stored Why these matter to an engineer:
- Self-service and elasticity make automation the normal way to work, because infrastructure is just API calls.
- Measured service turns architecture decisions into cost decisions: an idle resource keeps costing money.
- Resource pooling is why the provider and the customer share responsibility for security.
These characteristics apply whether the service is raw infrastructure, a managed platform or finished software. The service models differ in how much of the stack you manage.
Q2.How do public, private, hybrid and multi-cloud deployment models differ?
The models differ in who owns the infrastructure and how many environments a workload spans. Public cloud is shared provider infrastructure, private cloud is dedicated to one organization, hybrid connects private and public environments, and multi-cloud uses more than one public provider.
Public Private Hybrid Multi-cloud Provider-owned, shared, self-service A cloud-style platform dedicated to one organization Private or on-premises systems connected to public cloud Workloads spread across several public providers Elastic, no hardware to run, huge service catalog Control, data locality, predictable cost at steady load Keeps legacy and regulated systems while gaining elasticity Choice of services, negotiating leverage, provider-level resilience Less control over location and hardware You buy and run the hardware and platform Networking, identity and operations span two worlds Duplicated skills, tooling and security effort When to use which:
- Public for most new workloads, especially variable or fast-growing ones.
- Private for steady, predictable loads with strict control needs, when the organization can run the platform well.
- Hybrid during migrations, or when some systems must stay on premises.
- Multi-cloud when there is a concrete reason, such as a regulatory requirement or a unique service, not as a default.
Q3.How does moving to the cloud change the cost model from capital to operating expense?
On premises, you buy hardware up front as a capital expense and own its capacity for years, whether you use it or not. In the cloud, you pay for usage as an operating expense, so cost follows demand, but every idle resource is billed continuously.
On-premises capital model Cloud operating model A large purchase before use Little or no upfront cost Buy for the expected peak, years ahead Scale to actual demand, minute by minute Utilization often low, because peak capacity sits idle Utilization can be high, if resources are scaled and turned off Costs hidden in shared budgets Costs itemized per resource, team and hour A wrong forecast means wasted hardware or a shortage A wrong forecast means a bill that grows quietly What it means in practice:
- The cloud saves most for variable workloads; steady loads save through commitment discounts rather than elasticity.
- Spending decisions move from a yearly procurement cycle to every engineer who launches a resource, so cost governance becomes an engineering task.
- Total cost comparisons must include power, space, staff, hardware refreshes and the cost of slow provisioning, not only the server price.
Example
A workload that needs 6 servers most of the day and 20 for a two-hour daily peak, compared over a year:
- On premises: buy 20 servers at 8,000 each, or 160,000, depreciated over 3 years to about 53,333 a year. Add 40% for power, space and support, giving about 74,667 a year.
- Cloud base load: 6 servers running all year at 0.40 per hour costs
6 × 0.40 × 8,760 = 21,024. - Cloud peak: 14 extra servers for 2 hours a day costs
14 × 2 × 365 × 0.40 = 4,088. - Cloud total: about 25,112 a year, roughly a third of the on-premises cost, because the peak capacity exists only while it is used.
For a workload flat at 20 servers all day, the gap would almost vanish. That is why elasticity, not cloud pricing alone, drives the saving.
Q4.What is the difference between scalability, elasticity and high availability?
Scalability is the ability to handle more load by adding resources. Elasticity is doing that automatically in both directions as demand changes. High availability is staying up when components fail.
A system can have any one of these without the others, so each needs its own design decisions.
Scalability Elasticity High availability Fault tolerance Capacity can grow with load Capacity follows demand automatically, up and down The service survives component failures No visible interruption at all during a failure Adding web servers behind a load balancer Autoscaling from 4 to 40 servers and back each day Servers spread across three zones Synchronous replicas with instant takeover Measured by throughput as resources are added Measured by how fast and how closely capacity tracks demand Measured by uptime percentage, such as 99.95% Measured by errors users see during failures How they relate:
- A system that scales only vertically, with a bigger single server, is scalable up to a limit but not highly available.
- Elasticity needs a scalable design first: stateless servers, shared data stores and fast startup.
- High availability needs redundancy across failure domains, which elastic scaling across zones also provides.
Interview tip: give one example where a system is scalable but not highly available; it shows you see these as separate design goals.
Q5.Which design pillars are commonly used to review a cloud architecture?
Cloud architecture reviews commonly use six pillars, each a lens with its own questions. Applying all six exposes trade-offs that a review focused only on features would miss.
Operational excellence Security Reliability Can we run, change and improve it safely? Are data and systems protected? Does it recover from failures and meet demand? Infrastructure as code, small deployments, runbooks Least privilege, encryption, audit logging Multiple zones, backups, tested recovery Performance efficiency Cost optimization Sustainability Does it use resources well as load changes? Does it deliver value at the lowest cost? Does it minimize energy and resource use? Right instance types, caching, managed services Right-sizing, commitments, turning off idle resources High utilization, efficient regions and processors How to use them:
- Run a review at design time and again after major changes, recording risks per pillar with owners.
- Expect trade-offs: a second region improves reliability but raises cost and complexity, so decide deliberately.
- Prioritize by impact: fix high-risk reliability and security gaps before cost optimization.
The pillars are a checklist for thinking, not a scoring contest. A design can be right with deliberate weaknesses in one pillar, as long as they are understood and accepted.
Q6.What are the common strategies for migrating an application to the cloud?
Migration strategies range from moving an application unchanged to rebuilding it, and each application in a portfolio gets the strategy that fits its value, age and urgency. They are often called the "seven Rs".
Rehost Relocate Replatform Refactor Nothing changes: servers move as they are A whole virtualized platform moves as is Small changes, such as a managed database Redesign for cloud-native services Low effort Low effort Medium effort High effort For fast exits from a data center For large virtual estates with a compatible cloud platform For quick wins without a redesign For core applications that need scale or speed Repurchase Retire Retain Replace with a software service Switch the application off Keep it where it is for now Medium effort Very low effort No effort For commodity functions such as email or HR For unused or duplicate systems For recently upgraded, regulated or hard-to-move systems How to choose:
- Inventory every application with its owner, dependencies, usage and business value.
- Retire what nobody uses; portfolios often contain a surprising share of it.
- Rehost or replatform most of the rest to meet deadlines, and refactor only where the business case is clear.
- Migrate in waves grouped by dependencies, so tightly coupled systems move together.
Rehosting first and modernizing later is common. Without a plan for the second step, though, it can simply move today's inefficiencies into a more expensive bill.
Q7.How do you choose a region for a new workload?
Choose the region by first applying hard constraints, such as where data may legally live, then optimizing for user latency, service availability and cost.
- Data residency and regulation: some data must stay in a country or economic area. This narrows the choice before anything else.
- Latency to users: pick the region closest to most users, measured with real latency tests rather than map distance.
- Service availability: newer services and instance types often reach only some regions first. Confirm that every service you need exists there.
- Price: the same resource can cost noticeably more in one region than another, as can data transfer out of it.
- Disaster recovery pairing: if you need a second region, choose one far enough away to avoid shared disasters but close enough for acceptable replication lag.
- Quotas and capacity: check limits and the availability of specialized hardware such as accelerators.
- Sustainability: regions differ in the carbon intensity of their power supply.
Record the decision and its reasons. Region choice is expensive to reverse once data, networking and integrations are in place.
Q8.What is a landing zone, and what does it set up before workloads arrive?
A landing zone is a prepared, multi-account cloud environment with security, networking, identity and governance already in place, so teams can deploy workloads into a secure, consistent foundation instead of building one each time.
What a landing zone sets up:
- Account structure: separate accounts for security tooling, log archives, shared networking and each workload environment, grouped under organizational units.
- Identity: single sign-on federated from the corporate identity provider, with role-based access and no long-lived user keys.
- Guardrails: organization-level policies, such as allowed regions, mandatory encryption and a ban on disabling audit logs.
- Central logging: audit and network logs from every account flowing into a locked-down archive account.
- Networking: a hub for shared connectivity to on-premises networks and the internet, with IP ranges allocated centrally.
- Security baseline: threat detection, configuration scanning and alerts switched on in every account by default.
- Cost controls: required tags, budgets and alerts per account.
- Account vending: an automated way for teams to request a new account that arrives with all of the above.
Build the landing zone as code, so every account is created identically and changes to the baseline roll out everywhere at once.
Q9.Why do organizations split workloads across multiple cloud accounts?
An account is the strongest boundary a cloud provider offers, separating permissions, quotas, billing and blast radius. Splitting workloads across accounts limits how far a mistake or a breach can spread.
flowchart TD A["Organization root"] --> B["Security unit"] A --> C["Infrastructure unit"] A --> D["Workloads unit"] A --> E["Sandbox unit"] B --> F["Log archive and security tooling accounts"] C --> G["Shared network account"] D --> H["Production accounts"] D --> I["Non-production accounts"]Reasons to split:
- Blast radius: a compromised credential or a bad script in a test account cannot touch production.
- Security boundaries: permissions do not cross accounts unless explicitly granted, and guardrails can differ per group.
- Quota isolation: one team's load test cannot use up limits that production needs.
- Cost clarity: each account's bill maps directly to a team or product.
- Compliance scope: regulated workloads sit in accounts with stricter controls, keeping audits small.
Costs of splitting: cross-account networking, identity and logging need central design, which is exactly what a landing zone provides. Without that automation, many accounts become hard to govern.
Q10.How do you design a tagging strategy, and how do you enforce it?
Define a small set of mandatory tags that answer who owns a resource, what it is for and what it costs, then enforce them automatically at creation time, since tags added later are always incomplete.
owner cost-center environment Who to contact about the resource Which budget pays for it Production, staging or development Example: team-payments Example: cc-4410 Example: production application data-classification Which system it belongs to How sensitive the data is Example: checkout-api Example: confidential Enforcement:
- Block untagged resources with organization policies that reject creation when mandatory tags are missing.
- Tag through infrastructure code: shared modules apply standard tags by default, so engineers rarely type them.
- Validate values against allowed lists, so "prod", "Prod" and "production" do not split reports three ways.
- Report and remediate: a weekly report of untagged spend per account, assigned to the account owner.
- Use tags in automation: schedules that stop non-production resources at night, and alerts routed by owner, give teams a reason to tag correctly.
Keep the mandatory list short. Every extra required tag lowers compliance with all of them.
Q11.What does "cloud-native" mean for an application's design?
A cloud-native application is designed to use the cloud's strengths, which are elasticity, managed services and automation, and to expect failure as normal. It is about design choices, not about running in the cloud.
- Stateless services: instances keep no session data locally, so any instance can serve any request and can be replaced at any time.
- Managed services: databases, queues and storage are consumed as services rather than run on servers you maintain.
- Designed for failure: timeouts, retries with backoff, circuit breakers and redundancy across zones are built in.
- Elastic scaling: capacity follows load automatically, which needs fast startup and graceful shutdown.
- Automation everywhere: infrastructure as code, automated pipelines and repeatable environments.
- Configuration from the environment: the same build runs in every environment with settings injected at deploy time.
- Built-in observability: metrics, structured logs and traces from day one.
- Small, independently deployable units, such as containers or functions, where the team size and domain justify them.
A monolith can be cloud-native if it follows these principles. A microservice system running on hand-built servers is not.
Q12.What are service quotas, and how can they cause outages?
Service quotas are limits a cloud provider sets per account and region on how much of a resource you can use, such as virtual CPUs, IP addresses or API calls per second. They protect the provider and you from runaway usage, but hitting one unexpectedly fails requests just like an outage.
How quotas cause incidents:
- Scaling hits a ceiling: autoscaling tries to add servers during a traffic spike and fails because the account reached its CPU quota.
- Address exhaustion: a subnet runs out of IP addresses, so new instances or containers cannot start.
- API throttling: deployment tools or monitoring agents exceed request rate limits and fail partway through.
- Disaster recovery surprises: the recovery region has default quotas far lower than the primary region.
How to prevent them:
- Monitor usage against quotas and alert at about 80%.
- Include quotas in capacity planning, and request increases well before launches and seasonal peaks.
- Test failover at full scale in the recovery region, which reveals quota gaps.
- Use backoff and retries for API calls, so throttling slows work instead of breaking it.
Example
How a quota stopped a sale-day scale-out:
- The shop ran 40 servers of 8 virtual CPUs each, 320 vCPUs, against an account quota of 400.
- At the start of the sale, autoscaling asked for 30 more servers, but only 10 could start before the quota was reached.
- The remaining requests failed, response times climbed past 5 seconds and checkout errors rose for 50 minutes until the provider approved an increase.
- Afterwards, the team added a quota usage alert at 80% and made a quota review part of every launch checklist.
Q13.How do you choose the right virtual machine type for a workload?
Match the instance family to the resource the workload uses most, size it from measured data rather than guesses, and benchmark before committing.
General purpose Compute optimized Memory optimized Balanced CPU and memory More CPU per gigabyte of memory More memory per CPU Web servers, small databases, most applications Batch processing, video encoding, high-traffic APIs In-memory caches, large databases, analytics Storage optimized Accelerated Burstable Fast local disks and high disk throughput Graphics or other specialized processors Low baseline CPU with credits for short bursts Search indexes, data warehouses, log processing Model training, inference, rendering Development servers, low-traffic services How to choose:
- Profile the workload: CPU, memory, disk and network use, at average and peak.
- Start general purpose if the profile is unknown, then move to a specialized family once measurements show a clear bottleneck.
- Consider processor options: newer generations and alternative processor architectures often give better price-performance, if the software supports them.
- Benchmark the real application on two or three candidates.
- Revisit after a few weeks in production and right-size.
Burstable instances are cheap until they run out of credits. A busy service on them slows sharply under sustained load, which looks like a mysterious performance bug.
Q14.How do on-demand, committed-use and spot pricing differ?
On-demand pricing charges full price with no commitment. Committed-use pricing gives a large discount in exchange for promising to use or pay for capacity for one to three years. Spot pricing sells spare capacity at the deepest discount, but the provider can reclaim it at short notice.
On-demand Committed use Spot capacity No discount Often 30% to 60% off Often 60% to 90% off No commitment A one- to three-year commitment No commitment Risk: the highest price Risk: paying for capacity you stop using Risk: interruption with little warning Best for unpredictable or short-lived workloads Best for steady baseline load Best for fault-tolerant batch, CI and stateless work How to combine them:
- Cover the always-on baseline with commitments, sized to the minimum you are confident of using.
- Run variable load on demand, so you pay only while it exists.
- Move interruptible work to spot capacity, with fallbacks to on-demand.
Discount levels vary by provider, region and term, so check current pricing. Commitments that apply flexibly across instance families and regions carry less risk than those tied to one specific instance type.
Q15.How do you run workloads safely on spot capacity that can be reclaimed at short notice?
Design every spot workload to expect interruption: make it stateless or checkpointed, spread it across many capacity pools, react to the interruption notice, and keep an on-demand fallback for work that must finish.
- Choose suitable work: batch jobs, rendering, CI runners, stateless web workers and anything that can be retried.
- Diversify: allow several instance types and all zones, so a shortage in one pool does not remove all capacity at once.
- Handle the notice: providers warn shortly before reclaiming, often about two minutes ahead depending on the provider. Stop taking new work, finish or checkpoint the current task, and deregister from the load balancer.
- Checkpoint long jobs to durable storage, so a restarted task resumes instead of starting over.
- Mix capacity: keep a baseline on on-demand or committed capacity, and add spot capacity on top.
- Fall back automatically to on-demand capacity when spot capacity is unavailable.
Never run a stateful primary database or a single irreplaceable server on spot capacity. Losing it is a guaranteed outage, just at an unpredictable time.
Example
A nightly rendering pipeline moved to spot capacity:
- The job renders 10,000 frames, about 3 minutes each, on 100 workers.
- Each frame is a separate task in a queue, so an interrupted worker loses at most one frame's work, which returns to the queue.
- Workers are allowed on 6 instance types across 3 zones. On a typical night, 4 to 8 interruptions occur and the job still finishes within its 6-hour window.
- Compute cost fell by about 70%, and the only change to the application was making each frame an independent, retryable task.
Q16.How do target-tracking, step, scheduled and predictive scaling policies differ?
They differ in what triggers a change in capacity. Target tracking keeps a metric near a set value, step scaling adds or removes fixed amounts when thresholds are crossed, scheduled scaling changes capacity at set times, and predictive scaling forecasts demand from history.
Target tracking Step Scheduled Predictive Adjusts capacity to hold a metric, such as 50% CPU Adds or removes set amounts at threshold bands Sets capacity at known times Forecasts load and scales ahead of it Best for most web and API services Best for fine control over sharp changes Best for predictable daily or weekly peaks Best for regular cycles with slow startup times Risk: a poor metric choice; CPU may not reflect load Risk: more rules to tune and maintain Risk: breaks when the pattern changes Risk: needs history and misses one-off events Practical guidance:
- Prefer a metric close to user load, such as requests per instance or queue depth per worker, over raw CPU.
- Set warm-up time so new instances are not counted before they serve traffic, which prevents over-scaling.
- Scale out fast and scale in slowly, so short dips do not remove capacity needed seconds later.
- Combine policies: scheduled or predictive scaling sets a sensible floor, and target tracking handles the rest.
Q17.What is a golden image, and how does it compare with configuring servers at boot?
A golden image is a pre-built machine image that already contains the operating system, patches, agents and often the application. Configuring at boot starts from a base image and installs and configures everything when the server launches.
Golden image Configure at boot Fast startup: little work at launch Slow startup: installs on every launch Every server is identical Servers can vary if package sources change Patch by building and rolling out a new image Patch running servers, or relaunch Low failure risk at launch Higher failure risk: downloads and scripts can fail mid-scale-out Every change needs a rebuild Change scripts without a rebuild Needs an image build and test pipeline Simpler to start with When to use which:
- Use golden images for autoscaled fleets, where fast and reliable startup matters most during a traffic spike.
- Use boot-time configuration for rarely launched servers or early-stage projects.
- A common hybrid bakes everything slow or risky into the image, and injects only environment-specific settings and secrets at boot.
Treat images like code: build them in a pipeline, scan them, version them, and retire old versions so nothing launches with stale patches.
Q18.How do you right-size an over-provisioned virtual machine?
Measure what the machine actually uses over a representative period, pick the smallest size that covers its peaks with headroom, then change it carefully and keep watching.
- Collect at least two to four weeks of data, covering month-end or other cycles: CPU, memory, disk and network.
- Install a memory agent if needed, since many platforms do not report guest memory by default, and memory is often the true constraint.
- Use percentiles, not averages: size for the 95th or 99th percentile, and check the maximum for rare spikes.
- Keep headroom: aim for peak use of about 60% to 70% of the new size, leaving room for growth and failover load.
- Consider newer generations, which often give more performance per unit of cost at the same size.
- Change through your normal deployment process, ideally one environment or one instance at a time, and watch latency and errors.
Right-sizing is not a one-off project. Schedule a monthly review of the biggest underused resources, since workloads drift as code and traffic change.
Example
Right-sizing a fleet of 30 application servers:
- Each server has 16 vCPUs and 64 GB of memory and costs 0.80 per hour.
- Over four weeks, CPU at the 95th percentile is 18%, about 2.9 vCPUs, and memory peaks at 20 GB.
- On an 8 vCPU, 32 GB size costing 0.40 per hour, the same load would be about 36% CPU at the 95th percentile and 62.5% memory at peak, which leaves healthy headroom.
- The saving is
0.40 × 730 = 292per server per month, or 8,760 per month for all 30. - The change rolls out to 3 servers first; after a week with unchanged latency, the rest follow.
Q19.What is a function cold start, and how do you reduce it?
A cold start is the extra delay when a serverless platform has to create a new execution environment for a function: it allocates resources, loads the runtime and your code, and runs initialization before handling the request. Later requests that reuse that environment are "warm" and much faster.
What makes cold starts slower:
- Large deployment packages and many dependencies.
- Heavy runtimes and frameworks with slow startup.
- Expensive initialization, such as loading big models or opening many connections.
- On some platforms, attaching the function to a private network adds delay.
How to reduce them:
- Trim the package: remove unused dependencies, and load rarely used ones lazily.
- Initialize once: create clients and connections outside the handler so warm invocations reuse them.
- Choose a lighter runtime for latency-sensitive functions.
- Allocate more memory where the platform scales CPU with memory, since initialization then runs faster.
- Use pre-warmed or provisioned capacity for steady, latency-critical traffic, accepting that you pay for it while idle.
Measure first: cold starts often affect only a small share of requests. They matter for user-facing, latency-sensitive paths, much less for background processing.
Q20.How does concurrency work for serverless functions, and how do you protect a downstream database?
Each concurrent request to a function runs in its own execution environment, so the number of environments running at once is set by the request rate and how long each request takes.
concurrency = requests_per_second × average_duration_seconds
What each term means:
- requests_per_second: the arrival rate of invocations.
- average_duration_seconds: how long each invocation runs, including time spent waiting on the database.
Why it threatens databases: functions scale out in seconds, and each environment usually opens its own database connection. A traffic spike, or a slowdown that makes each call take longer, can multiply concurrency and exhaust the database's connection limit, which makes everything slower still.
How to protect the database:
- Cap the function's maximum concurrency below what the database can serve.
- Use a connection pooling proxy between functions and the database.
- Put a queue in front of non-urgent writes so they are processed at a steady rate.
- Set short timeouts and back off on retries, so a slow database does not trigger a retry storm.
Watch duration as closely as traffic. A database slowdown raises concurrency even when traffic stays flat.
Example
How a spike turned into a database outage, and the fix:
- Normal load is 500 requests per second at 0.2 seconds each, so concurrency is
500 × 0.2 = 100environments and about 100 database connections. - A marketing email drives 3,000 requests per second. The database slows down, each call now takes 1 second, and concurrency jumps to
3,000 × 1 = 3,000. - The database allows 500 connections, so most functions fail to connect, retry immediately and add even more load.
- The fix caps the function at 200 concurrent environments, adds a connection pooling proxy, and moves order confirmations onto a queue. In the next spike, excess requests queue briefly instead of failing.