Skill 4.3.3

Configuring S3 events to process log files (for example, by using Lambda) and deliver log files to another destination (for example, OpenSearch Service, CloudWatch Logs)

Key Concepts

S3 Event Notifications on s3:ObjectCreated:* (optionally filtered by prefix and suffix) send events to Lambda, SQS or SNS, or all events can be sent to EventBridge for richer filtering and multiple targets. A Lambda function downloads and parses the file (for example gzip ALB or CloudTrail logs) and writes documents to OpenSearch Service or events to CloudWatch Logs.

For high volumes, putting an SQS queue between S3 and Lambda smooths bursts and adds retries with a dead-letter queue. The function's role needs read access to the bucket (and KMS decrypt), plus write access to the destination.