S3
handle_record(record)
Handle a single S3 event record.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
record
|
S3EventRecord
|
The S3 event record to process. |
required |
Source code in templates/s3/handler.py
19 20 21 22 23 24 25 26 27 28 | |
main(event, context)
Lambda entry point for the S3-to-SQS handler.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
event
|
S3Event
|
The S3 event containing object-creation records. |
required |
context
|
LambdaContext
|
The Lambda execution context. |
required |
Returns:
| Type | Description |
|---|---|
dict
|
A dictionary containing batchItemFailures (empty if all succeed). |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the event shape is invalid. |
Exception
|
If any record fails to ensure retry by the S3 event source. |
Source code in templates/s3/handler.py
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | |