DVA-C02 · Question #462
A developer is building an application on AWS. The application has an Amazon API Gateway API that sends requests to an AWS Lambda function. The API is experiencing increased latency because the…
The correct answer is B. Increase the amount of memory that is allocated to the Lambda function. In AWS Lambda, the CPU available to a function is proportional to the amount of memory that is allocated to it. By increasing the memory, you also increase the CPU power allocated to the Lambda function. Therefore, increasing memory is the way to improve both the processing…
Question
A developer is building an application on AWS. The application has an Amazon API Gateway API that sends requests to an AWS Lambda function. The API is experiencing increased latency because the Lambda function has limited available CPU to fulfill the requests. Before the developer deploys the API into production, the developer must configure the Lambda function to have more CPU. Which solution will meet this requirement?
Options
- AIncrease the virtual CPU (vCPU) cores quota of the Lambda function.
- BIncrease the amount of memory that is allocated to the Lambda function.
- CIncrease the ephemeral storage size of the Lambda function.
- DIncrease the timeout value of the Lambda function.
How the community answered
(22 responses)- A5% (1)
- B91% (20)
- C5% (1)
Explanation
In AWS Lambda, the CPU available to a function is proportional to the amount of memory that is allocated to it. By increasing the memory, you also increase the CPU power allocated to the Lambda function. Therefore, increasing memory is the way to improve both the processing power (CPU) and performance of the function to reduce latency. Options like increasing ephemeral storage, timeout, or virtual CPU cores are not valid in the context of AWS Lambda, as Lambda does not provide direct control over CPU cores but ties CPU power to memory allocation.
Community Discussion
No community discussion yet for this question.