Serverless Questions with Answers

20 practice questions on Serverless (Cloud Computing) with answers and step-by-step solutions. Try 10 samples below, then practise all 20 free in the AptiNest app.

Sample questions

Question 1Easy

Which of these is a serverless function service from a major cloud provider?

  1. Azure Virtual Machines
  2. AWS Lambda
  3. Amazon EC2
  4. Google Compute Engine

Answer: B. AWS Lambda

Explanation

Lambda runs functions on demand; EC2, Azure VMs and Compute Engine are IaaS virtual machines.

Step-by-step solution

  1. AWS Lambda runs functions on demand.
  2. EC2, Azure VMs and Compute Engine are IaaS virtual machines.

Why the other options are wrong

  • A. Azure Virtual Machines is IaaS.
  • C. Amazon EC2 is IaaS.
  • D. Google Compute Engine is IaaS.

Question 2Easy

Which of the following is Microsoft Azure's serverless function service?

  1. Azure Virtual Network
  2. Azure Blob Storage
  3. Azure Monitor
  4. Azure Functions

Answer: D. Azure Functions

Explanation

Azure Functions is the event-driven FaaS offering on Azure.

Step-by-step solution

  1. Azure's virtual machines, networking and storage are separate services.
  2. Its event-driven, pay-per-execution compute service is Azure Functions.

Why the other options are wrong

  • A. Virtual Network is networking.
  • B. Blob Storage is object storage.
  • C. Azure Monitor is observability.

Question 3Easy

What does "serverless" mean in cloud computing?

  1. You must buy and manage your own servers
  2. The code runs only on the user's phone
  3. The provider manages the servers; you pay per use
  4. The application runs without any servers anywhere

Answer: C. The provider manages the servers; you pay per use

Explanation

Serverless abstracts servers away: the provider provisions, scales and patches them while you supply code.

Step-by-step solution

  1. Servers still exist.
  2. The provider provisions, scales and patches them.
  3. You deploy code and pay only when it runs.

Why the other options are wrong

  • A. That is on-premises.
  • B. Serverless code runs in the cloud.
  • D. Servers exist; you just do not manage them.

Tip: Serverless = servers you never see.

Question 4Easy

A startup wants to run code only when a file is uploaded to storage, without managing servers. Which model fits best?

  1. A private data centre
  2. An event-triggered serverless function
  3. A reserved virtual machine running 24x7
  4. A desktop application

Answer: B. An event-triggered serverless function

Explanation

Serverless functions run in response to events like uploads and cost nothing while idle.

Step-by-step solution

  1. Code must run only when a file is uploaded.
  2. No server management wanted.
  3. An event-triggered serverless function fits.

Why the other options are wrong

  • A. A data centre means managing servers.
  • C. A 24x7 VM costs money even when idle.
  • D. A desktop app does not react to cloud uploads.

Question 5Medium

What is a "cold start" in serverless computing?

  1. A function that has been deleted
  2. The first deployment of a new application
  3. Delay while a new instance initialises
  4. A function that runs in a very cold data centre

Answer: C. Delay while a new instance initialises

Explanation

When no warm instance exists, the platform must create one and load the code, adding start-up delay.

Step-by-step solution

  1. No warm instance is available.
  2. The platform must create one, load the runtime and the code.
  3. This extra delay is a cold start.

Why the other options are wrong

  • A. A deleted function cannot run at all.
  • B. First deployment is not a cold start.
  • D. A pun; temperature is irrelevant.

Question 6Medium

"Backend as a Service" (BaaS) offerings typically provide:

  1. A desktop operating system
  2. Managed auth, database and storage APIs
  3. Physical servers for rent
  4. Network cables and switches

Answer: B. Managed auth, database and storage APIs

Explanation

BaaS lets mobile and web apps use managed auth, data and storage without writing a server.

Step-by-step solution

  1. BaaS gives ready-made backend features.
  2. Typically authentication, database and file storage via APIs.
  3. Apps use them without writing their own server.

Why the other options are wrong

  • A. BaaS does not provide desktop OSes.
  • C. Physical servers are bare metal or colocation.
  • D. Cables and switches are hardware.

Question 7Medium

How are serverless functions typically billed?

  1. By the size of the source code repository
  2. By the number of developers in the team
  3. A fixed monthly price per server
  4. By invocations and duration x memory

Answer: D. By invocations and duration x memory

Explanation

FaaS pricing typically combines request counts and compute duration (often in GB-seconds).

Step-by-step solution

  1. FaaS billing has two parts.
  2. Number of invocations (requests).
  3. Duration x memory allocated, often in GB-seconds.

Why the other options are wrong

  • A. Repository size is irrelevant.
  • B. Team size is irrelevant.
  • C. That is VM-style pricing.

Tip: Cost ≈ requests + (GB x seconds).

Question 8Medium

Which serverless feature lets a function run on a schedule, for example every night at 2 a.m.?

  1. A container registry
  2. A timer or cron-style trigger
  3. A hypervisor snapshot
  4. A VPN tunnel

Answer: B. A timer or cron-style trigger

Explanation

Functions can be triggered by schedules, HTTP requests, queue messages, storage events and more.

Step-by-step solution

  1. A timer or cron-style trigger runs a function on a schedule.
  2. For example, every night at 2 a.m.

Why the other options are wrong

  • A. A registry stores images.
  • C. Snapshots capture VM state.
  • D. A VPN connects networks.

Question 9Hard

Why should a serverless function triggered by a message queue be idempotent?

  1. A message may be delivered more than once
  2. It makes the function start faster
  3. Queues deliver every message exactly once by design
  4. Idempotent functions are billed at half price

Answer: A. A message may be delivered more than once

Explanation

Many queues offer at-least-once delivery, so duplicate processing must be safe (e.g. using a unique request ID).

Step-by-step solution

  1. Many queues deliver at least once.
  2. A message may arrive twice.
  3. An idempotent function gives the same result even if run twice.

Why the other options are wrong

  • B. Idempotency does not affect start-up time.
  • C. Most queues do not guarantee exactly-once.
  • D. Billing is not affected.

Question 10Hard

What is "function chaining" risk in serverless designs where one function synchronously calls another and waits?

  1. It makes cold starts disappear
  2. Double billing for waiting, and cascading failures
  3. Functions cannot call each other at all
  4. It reduces latency to zero

Answer: B. Double billing for waiting, and cascading failures

Explanation

Synchronous chains double-bill waiting time and couple failures; queues or orchestration services are usually better.

Step-by-step solution

  1. Function A calls function B and waits.
  2. You pay for A's waiting time as well as B's run.
  3. If B fails or slows, A fails or slows too.

Why the other options are wrong

  • A. Chaining can add cold starts, not remove them.
  • C. Functions can call each other; it is just risky.
  • D. Chaining adds latency.

Tip: Connect functions with queues or workflows, not waiting calls.

Practise all 20 questions free

The full question bank with timed practice, progress tracking and Vidya, your AI tutor. Free, no ads.

Open this topic in the app →

Related topics

See all Cloud Computing topics · All topics