Question 1 · choose 1
A Lambda function resizes and compresses images. It is configured with 512 MB of memory, uses less than 200 MB of it, and takes 40 seconds per image because it is CPU-bound. The team wants each invocation to finish faster with the smallest possible change. What should a solutions architect recommend?
- ATurn on provisioned concurrency so that execution environments stay initialized
- BSet reserved concurrency on the function so that it always has capacity available
- CRaise the function's memory setting, which also raises its allocated CPU power
- DIncrease the function's timeout so that each image has more time to finish processing
Show the answer and why
ATurn on provisioned concurrency so that execution environments stay initialized
Incorrect
Provisioned concurrency removes cold-start initialization. It does not make the code inside an invocation run faster.
BSet reserved concurrency on the function so that it always has capacity available
Incorrect
Reserved concurrency guarantees and caps the number of concurrent instances. It does not add CPU to an invocation.
CRaise the function's memory setting, which also raises its allocated CPU power
Correct
Lambda allocates CPU power in proportion to memory, so a CPU-bound function gets faster when memory is raised even if it does not need the memory.
DIncrease the function's timeout so that each image has more time to finish processing
Incorrect
A longer timeout only lets a slow invocation run longer; it does not speed it up.
In Lambda, memory is the CPU dial. Concurrency settings change how many invocations run, not how fast each one runs.
AWS documentation