Answer – B
The question`s focus is on the best practice methods for Lambda functions. Since the question asks us to choose the best option that the developer might have done to prevent this throttling issue, he should have written a code that avoids the recursive call of the function within itself as it is not recommended as a best practice.
For the "Lambda function code" best practice, it is recommended that we should avoid recursive code in the Lambda function.
"Avoid using recursive code in your Lambda function, wherein the function automatically calls itself until some arbitrary criteria are met. This could lead to an unintended volume of function invocations and escalated costs. If you do accidentally do so, set the function concurrent execution limit to `0` (Zero) immediately to throttle all invocations to the function, while you update the code."
Option A is incorrect since using IAM Policies will not help in resolving the issue.
Option C is incorrect since this is about concurrency on the number of AWS Lambda executions.
Option D is incorrect since the issue here is with the number of executions and not on the amount of memory used for the executions.
For more information, please refer to the below Link-
https://docs.aws.amazon.com/lambda/latest/dg/best-practices.html