Bird
0
0

Consider this AWS Lambda function usage pattern: it runs 1000 times per day, each execution lasts 1 second, and uses 128 MB memory. Which change will reduce cost the most?

medium📝 Predict Output Q13 of 15
AWS - Architecture Best Practices
Consider this AWS Lambda function usage pattern: it runs 1000 times per day, each execution lasts 1 second, and uses 128 MB memory. Which change will reduce cost the most?
AIncrease memory to 512 MB to reduce execution time
BDecrease memory to 64 MB to save memory cost
CIncrease execution time to batch more work per run
DKeep memory at 128 MB and reduce execution time by optimizing code
Step-by-Step Solution
Solution:
  1. Step 1: Understand Lambda cost factors

    Cost depends on memory size and execution duration multiplied by invocations.
  2. Step 2: Evaluate options

    Increasing memory may reduce time but might increase cost; decreasing memory may increase time; optimizing code reduces time without increasing memory.
  3. Final Answer:

    Keep memory at 128 MB and reduce execution time by optimizing code -> Option D
  4. Quick Check:

    Optimize code to reduce time = save cost [OK]
Quick Trick: Lower execution time saves more than just lowering memory [OK]
Common Mistakes:
  • Assuming more memory always saves cost
  • Reducing memory without checking time
  • Increasing execution time to batch

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes