Bird
0
0

If a serverless function executes for 5 seconds and is allocated 512 MB of memory, how is the billing calculated?

medium📝 Predict Output Q5 of 15
AWS - Lambda
If a serverless function executes for 5 seconds and is allocated 512 MB of memory, how is the billing calculated?
ABilled for 5 seconds at 512 MB memory allocation
BBilled for 1 second regardless of execution time
CBilled for 5 seconds at minimum 1 GB memory allocation
DBilled only if execution exceeds 10 seconds
Step-by-Step Solution
Solution:
  1. Step 1: Understand serverless billing

    AWS Lambda bills based on execution duration and memory size.
  2. Step 2: Apply to scenario

    Function runs 5 seconds with 512 MB memory, so billed accordingly.
  3. Final Answer:

    Billed for 5 seconds at 512 MB memory allocation -> Option A
  4. Quick Check:

    Billing = duration x memory size [OK]
Quick Trick: Billing depends on execution time and memory size [OK]
Common Mistakes:
  • Assuming minimum 1 GB memory billing
  • Thinking billing is fixed per invocation
  • Believing billing starts only after 10 seconds

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes