AWS Certified Developer – Associate (DVA-C02) — Question 234
A developer is troubleshooting an application in an integration environment. In the application, an Amazon Simple Queue Service (Amazon SQS) queue consumes messages and then an AWS Lambda function processes the messages. The Lambda function transforms the messages and makes an API call to a third-party service.
There has been an increase in application usage. The third-party API frequently returns an HTTP 429 Too Many Requests error message. The error message prevents a significant number of messages from being processed successfully.
How can the developer resolve this issue?
Answer options
- A. Increase the SQS event source’s batch size setting.
- B. Configure provisioned concurrency for the Lambda function based on the third-party API’s documented rate limits.
- C. Increase the retry attempts and maximum event age in the Lambda function’s asynchronous configuration.
- D. Configure maximum concurrency on the SQS event source based on the third-party service’s documented rate limits.
Correct answer: D
Explanation
The correct answer is D because configuring maximum concurrency on the SQS event source allows the developer to control the number of messages processed simultaneously, aligning with the third-party service's rate limits and preventing HTTP 429 errors. Option A does not address the issue of rate limiting and could exacerbate the problem. Option B is incorrect because provisioned concurrency applies to Lambda's execution and doesn't directly mitigate the rate limit issue from the API. Option C does not resolve the underlying rate limiting problem and only increases the chances of hitting the limit again.