Skill 1.1.13
Implement resilient application code for third-party service integrations (for example, retry logic, circuit breakers, error handling patterns)
Key Concepts
Calls to external services should use timeouts and retries with exponential backoff and jitter, honouring any rate-limit headers the provider returns. A circuit breaker tracks recent failures and, once a threshold is reached, stops calling the service for a period and fails fast or returns a fallback response, then lets a few trial requests through to check whether the service has recovered. This prevents threads, connections and Lambda concurrency from being used up waiting on a failing dependency.
Putting a queue between your application and the third party lets you absorb outages and control the request rate, with failed messages moved to a dead-letter queue for later reprocessing. Step Functions can implement retry, catch and circuit-breaker logic as part of a workflow, and API keys or credentials for the provider should be stored in Secrets Manager.