DVA-C02 Question 362
Select 3Your team is developing a serverless application using AWS Lambda. The application processes uploaded images in an S3 bucket. The function must automatically scale based on the number of uploaded images. However, during testing, you notice that the Lambda function is throttling when processing a large number of images. Which of the following actions can resolve the throttling issue?
- A
Request a service quota increase for AWS Lambda concurrency limits.
- B
Use SQS as an event source to decouple the processing and control the invocation rate of Lambda.
- C
Increase the memory allocation for the Lambda function.
- D
Enable Lambda reserved concurrency to allocate a portion of concurrency specifically for your function.
- E
Enable S3 Transfer Acceleration to speed up image uploads to the bucket.
Show answer and explanation
Correct answers: A, B, D
Explanation
Lambda throttling occurs when the function's concurrency exceeds the account's concurrency limit or the function's reserved concurrency. To address this, you can request a service quota increase to raise the concurrency limit, use an SQS queue to control the invocation rate and decouple processing, or enable Lambda reserved concurrency to allocate concurrency specifically for your function. Increasing memory allocation and enabling S3 Transfer Acceleration do not resolve concurrency-related throttling issues.
- A. Correct.
Requesting a service quota increase for AWS Lambda concurrency limits can resolve throttling if your account is hitting the default concurrency limit. This is a valid solution.
- B. Correct.
Using SQS as an event source allows you to decouple the invocation of the function and control the rate of execution through the SQS queue, effectively managing the throttling issue.
- C. Incorrect.
Increasing the memory allocation can improve the performance of the function but does not directly address throttling caused by concurrency limits.
- D. Correct.
Enabling Lambda reserved concurrency ensures that a specific portion of the concurrency limit is reserved for your function, preventing throttling due to other functions consuming all available concurrency.
- E. Incorrect.
Enabling S3 Transfer Acceleration speeds up uploads to S3 but does not impact Lambda throttling or concurrency.