0 votes
in AWS by

You just developed code in AWS Lambda that makes use of recursive functions. After several invocations, you are beginning to see throttling errors in the metrics.

Which of the following should be done to resolve this issue?

1 Answer

0 votes
by
A.  B.  C.  D. 

Answer - C.

This is also clearly mentioned in the AWS Documentation.

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 accidentally do so, set the function concurrent execution limit to 0 immediately to throttle all invocations to the function while you update the code.

Option A is incorrect because placing the recursive function in a separate package still causes the throttling errors.

Option B is incorrect because using versioning for a recursive function means storing the code in other versions.

The recursive function still causes issues.

Option D is incorrect because adding an API gateway does not remove the recursive function and the issue still exists.

...