Ravindra BagaleCourses & study guides मराठी

Chapter 93: AWS Lambda and Serverless for DevOps

DevOps

93.1 Why serverless — a function instead of an always-on server

Story (fictional teaching scenario). Priya in Pune and Elena in Lisbon run a fictional ticket shop. Their price calculator is busy for ten seconds after each sale, then idle. They do not want a VM running only to wait. They consider Lambda for the small calculation, but keep the long-running video worker in a container.

Why serverless — a function instead of an always-on server
Why serverless — a function instead of an always-on server

Why

You should choose the running model after you know the job. Small event-driven work can avoid managing an always-on application server.

What

  • Serverless means AWS manages the underlying servers. Servers still exist; you still own code, access rules, data protection and costs.
  • Function is a small program that starts when work arrives.
  • Event is the input describing that work, usually a JSON object.
  • Invocation is one request to run the function. It may succeed or fail.

How

  1. Describe one short job, not the whole company system.

  2. Choose an event shape.

  3. Calculate the result without a running web server.

Example 1: One order calculation

  1. Read the input and the code.
{"qty":3,"unit_paise":4000}
  1. Read the result.

Output (illustrative; not executed on AWS)

{"total_paise":12000,"currency":"INR"}
  1. What each part means: qty is three items. unit_paise is ₹40 in integer paise. Multiplication gives 12000 paise, or ₹120. One such request is one invocation. USD prices could likewise use integer cents. This is not an AWS price quote.

Ravindra Bagale's Tip

Serverless removes server administration, not responsibility.

Did you understand? Let us try it once more.