A Lambda function starts from the principle that "it runs only when someone invokes it". Depending on who that "someone" is, Lambda's behavior — retry counts, error handling, ordering guarantees — changes completely. If you don't understand this, you end up with accidents where SQS messages get processed in an infinite loop, an entire Kinesis shard gets blocked, or S3 processing falls into an infinite loop.
Lambda's invocation styles fall into three categories. First, Synchronous Invocation: the caller directly calls the InvokeFunction API in RequestResponse mode. API Gateway, ALB, and Cognito belong here