AWS Certified Developer – Associate (DVA-C02) — Question 256

A company has built a serverless application for its ecommerce website. The application includes a REST API in Amazon API Gateway that invokes an AWS Lambda function. The Lambda function processes data and stores the data in Amazon DynamoDB table. The Lambda function calls a third-party stock application API to process the order. After the ordered is processed, the Lambda function returns an HTTP 200 status code with no body to the client.

During peak usage when the API calls exceeds a certain threshold, the third-party stock application sometimes fails to process the data and responds with error messages. The company needs a solution that will not overwhelm the third-party stock application.

Which solution will meet these requirements?

Answer options

Correct answer: B

Explanation

Option B is correct because it implements a queue system (Amazon SQS) that allows for controlled processing of requests, preventing overload on the third-party stock application. The other options either eliminate the Lambda function or do not incorporate a mechanism to manage the volume of requests effectively, leading to potential failures.