DVA-C02 · Question #174
A developer migrated a legacy application to an AWS Lambda function. The function uses a third- party service to pull data with a series of API calls at the end of each month. The function then proces
The correct answer is B. Use an Amazon Simple Queue Service (Amazon SQS) queue to hold the API calls. Configure the. Solution (B) is the most operationally efficient way to refactor the serverless application to accommodate this change. This solution allows the Lambda function to continue executing API calls even if the API call limit is reached. The Amazon SQS queue will act as a buffer for AP
Question
A developer migrated a legacy application to an AWS Lambda function. The function uses a third- party service to pull data with a series of API calls at the end of each month. The function then processes the data to generate the monthly reports. The function has been working with no issues so far. The third-party service recently issued a restriction to allow a fixed number of API calls each minute and each day. If the API calls exceed the limit for each minute or each day, then the service will produce errors. The API also provides the minute limit and daily limit in the response header. This restriction might extend the overall process to multiple days because the process is consuming more API calls than the available limit. What is the MOST operationally efficient way to refactor the serverless application to accommodate this change?
Options
- AUse an AWS Step Functions state machine to monitor API failures. Use the Wait state to delay
- BUse an Amazon Simple Queue Service (Amazon SQS) queue to hold the API calls. Configure the
- CUse an Amazon CloudWatch Logs metric to count the number of API calls. Configure an Amazon
- DUse Amazon Kinesis Data Firehose to batch the API calls and deliver them to an Amazon S3
How the community answered
(48 responses)- A6% (3)
- B75% (36)
- C4% (2)
- D15% (7)
Explanation
Solution (B) is the most operationally efficient way to refactor the serverless application to accommodate this change. This solution allows the Lambda function to continue executing API calls even if the API call limit is reached. The Amazon SQS queue will act as a buffer for API calls that exceed the limit. The Lambda function can then poll the queue within the API limits.
Community Discussion
No community discussion yet for this question.