AWS Certified Developer – Associate (DVA-C02) — Question 21
A developer has written an AWS Lambda function. The function is CPU-bound. The developer wants to ensure that the function returns responses quickly.
How can the developer improve the function's performance?
Answer options
- A. Increase the function's CPU core count.
- B. Increase the function's memory.
- C. Increase the function's reserved concurrency.
- D. Increase the function's timeout.
Correct answer: B
Explanation
The correct answer is B because increasing the function's memory also raises the CPU allocation, which directly impacts performance for CPU-bound tasks. Options A and C do not directly address the performance issue as increasing CPU cores or reserved concurrency does not inherently enhance the speed of execution for a CPU-bound function. Option D is unrelated, as increasing the timeout allows for longer execution but does not improve performance.