Two ways events reach processing code
How Lambda invokes processing code for S3 events and SQS batches, including how retries and partial failures affect safe processing. · associate
A Lambda handler is the entry point that receives an event and runs your processing code. With a direct S3 notification, S3 invokes Lambda asynchronously: Lambda accepts the notification and queues it internally before running the handler. The event identifies the bucket and object key; it does not contain the object's contents. Your code reads the object when needed.
With SQS, a Lambda event source mapping polls the queue and invokes the handler synchronously with a batch of messages. The handler must inspect each record in the batch. SQS is not calling the function directly, and this route does not use Lambda's asynchronous invocation queue.
The diagram shows two independent inputs, not an S3-to-SQS pipeline. Both processors write to a separate results bucket. It shows event delivery, output writes, and failure routing, not every API call. S3 needs permission to invoke its function; each function's execution role needs the data-access permissions its route requires.
1 / 8 The incoming bucket stores uploaded objects. Its configured object-created notifications select which uploads start processing.
AWS architecture icons are the property of Amazon Web Services. BlowStack is not affiliated with or endorsed by AWS.