Bird
0
0

You want to reduce AWS Lambda costs for a function running 1 million times with 512 MB memory for 1 second each. Which action will reduce the cost most?

hard📝 Application Q8 of 15
AWS - Lambda
You want to reduce AWS Lambda costs for a function running 1 million times with 512 MB memory for 1 second each. Which action will reduce the cost most?
AIncrease memory allocation to 1024 MB
BIncrease number of executions
CIncrease function timeout to 2 seconds
DReduce memory allocation to 256 MB
Step-by-Step Solution
Solution:
  1. Step 1: Understand cost drivers

    Cost depends on memory size and duration multiplied by number of executions.
  2. Step 2: Evaluate options

    Reducing memory from 512 MB to 256 MB halves the GB-seconds, lowering cost. Increasing memory or timeout or executions increases cost.
  3. Final Answer:

    Reduce memory allocation to 256 MB -> Option D
  4. Quick Check:

    Lower memory reduces GB-seconds cost [OK]
Quick Trick: Lower memory reduces cost more than other factors [OK]
Common Mistakes:
  • Increasing memory to reduce cost
  • Increasing timeout thinking it saves money
  • Ignoring memory size impact

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes