Skip to content

S3 to SQS

A Lambda function that receives S3 object-creation events, transforms each record into a typed ProcessedMessage, and publishes it to an SQS queue.

  • Trigger: S3 Bucket (Object Created)
  • Destination: SQS Queue (Standard or FIFO)

Code

ProcessedMessage model

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)

Environment variables

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