A Lambda function that receives S3 object-creation events, transforms each record into a typed ProcessedMessage, and publishes it to an SQS queue.
The template sets up:
- Amazon S3 bucket: Generates events when objects are created.
- AWS Lambda function: Transforms S3 event metadata into
ProcessedMessageobjects. - Amazon SQS queue: Receives the processed messages.
- Function code:
templates/s3 - Unit tests:
tests/s3 - Infra stack:
infra/stacks/s3.py
Deploy the stack using:
make deploy STACK=s3| Field | Type | Description |
|---|---|---|
bucket |
string | S3 bucket name |
key |
string | S3 object key |
event_time |
string | ISO-8601 event timestamp |
source |
string | Origin event source (s3) |
| Variable | Description |
|---|---|
SQS_QUEUE_URL |
SQS queue URL to publish processed messages to |
SERVICE_NAME |
Powertools service name |
LOG_LEVEL |
Log level for the Lambda Logger |
