What should a developer do to solve this problem?
Inspect the frontend logs for API failures. Call the POST API manually by using the requests from the log file.
Create and inspect the Lambda dead-letter queue. Troubleshoot the failed functions. Reprocess the events.
Inspect the Lambda logs in Amazon CloudWatch for possible errors. Fix the errors.
Make sure that caching is disabled for the POST API in API Gateway.
Explanations:
Inspecting the frontend logs and calling the POST API manually may help identify issues at the frontend level, but it does not address the core issue of undelivered asynchronous Lambda invocations. The problem likely lies in Lambda’s processing, not the API call itself.
Creating and inspecting the Lambda dead-letter queue (DLQ) allows the developer to identify failed asynchronous invocations. If an invocation fails, the DLQ can capture the event, and the developer can troubleshoot and reprocess it. This solution directly addresses the issue of missed orders.
Lambda logs in Amazon CloudWatch show successful executions without errors, so there is no indication of processing issues at the Lambda function level. Fixing errors wouldn’t help because no errors are reported.
Disabling caching in API Gateway does not directly relate to the issue of missed orders. Caching would not prevent asynchronous invocations from being processed by Lambda or affect their success.