Bird
0
0

A Lambda function runs for 1234.7 ms but AWS bills for 1235 ms. Why?

medium📝 Debug Q7 of 15
AWS - Lambda
A Lambda function runs for 1234.7 ms but AWS bills for 1235 ms. Why?
ADuration is rounded up to the nearest 1 ms
BDuration is rounded down to the nearest second
CAWS bills only full seconds
DBilling is based on average run time
Step-by-Step Solution
Solution:
  1. Step 1: Understand Lambda billing duration

    Lambda rounds duration up to the nearest 1 millisecond (1 ms).
  2. Step 2: Calculate billing for 1234.7 ms

    1234.7 ms rounds up to 1235 ms.
  3. Final Answer:

    Duration is rounded up to the nearest 1 ms -> Option A
  4. Quick Check:

    Duration billing rounds up to 1 ms [OK]
Quick Trick: Lambda bills duration rounded up to 1 ms [OK]
Common Mistakes:
  • Thinking billing rounds down
  • Assuming billing is per full second
  • Believing billing uses average run time

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes