How many times does one failed downstream call actually get attempted? If you cannot answer that for your own services without opening three consoles, you probably have a retry multiplier you did not choose. This guide is a reasoning exercise with documented defaults, not an incident report: the arithmetic the defaults make possible, and the decisions worth making about it. For every hop in a call chain, four things should be known: who owns the retry, how many attempts it makes, whether it backs off, and whether the work is safe to repeat. If two layers both answer "I do", the attempts multiply instead of adding. Two reasonable defaults that together form a multiplier Take a Lambda function invoked asynchronously that calls another service through an AWS SDK client. Both layers have their own retry behavior. Layer Default behavior Worst-case attempts Lambda asynchronous invocation A failed invocation is retried up to two more times 3 handler runs AWS SDK clie...
A request arrives with a valid token, a malformed JSON body and a path the caller has no business touching. Which component should reject it, and what does each rejection cost? In an API Gateway plus Lambda design there are three candidates: the gateway's request validation, the Lambda authorizer and your handler. Each can say "no", but each can only reason about different information. This guide is a design analysis based on AWS documentation, built around four questions: What information does the check need? Header presence, body shape, caller identity and the target resource's owner are four different inputs. What does a rejection cost? A rejection at the gateway never invokes your code. A rejection in the handler pays for an invocation. How widely is the result cached? A cached decision is only correct if it holds for everything it covers. Who changes the rule, and how fast must a change take effect? Revoking access is a different problem from tightening...