A developer maintains an AWS Lambda function that is invoked synchronously through an API Gateway API. The Lambda function processes payments by calling a third-party platform. The Lambda function includes retry logic that will make five attempts for each invocation.
The third-party platform occasionally experiences outages that last 10–20 minutes. During outages, the Lambda function makes five retry attempts for each incoming request before failing. The request retry process generates thousands of wasted API calls and increases Lambda compute costs.
The developer needs a solution to detect third-party platform outages and to ensure that invocations of the Lambda function stop when a platform outage is detected. The developer must also ensure that the invocations resume when the platform is operational and accessible.
Which solution will meet these requirements?
Submit