A monolithic desktop image-processing app that runs every 5 minutes and completes within 1 minute is being reimplemented as a Python AWS Lambda function. In AWS tests, the Lambda is invoked every 5 minutes but now takes over 2 minutes to finish. Which change will improve the Lambda's performance?
Choose an answer
Tap an option to check your answer.
Correct answer: Increase the amount of memory allocated to the Lambda function..
Why this is the answer
Increasing the memory allocated to a Lambda function also proportionally increases the CPU, network bandwidth, and disk I/O available to it. Since the function is taking longer to complete, it suggests a bottleneck in one of these resources. Allocating more memory will provide more processing power, allowing the image processing tasks to complete faster. Changing the "instance type" is not a direct configuration option for Lambda functions; you allocate memory, and AWS scales other resources accordingly. Switching to the latest Python runtime might offer minor performance improvements but is unlikely to resolve a 2-minute processing time issue if the underlying resource allocation is insufficient. Configuring reserved concurrency ensures that the function always has capacity to run but does not improve the execution duration of a single invocation.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed