How newrelic/aws_s3_log_ingestion_lambda works
This is an AWS Lambda log shipper: an S3-triggered invocation reads an object, optionally interprets CloudTrail records, batches and compresses log payloads, then sends them to New Relic. The implementation is concentrated in one file, so its distinct runtime responsibilities share that source path. The README documents the S3-to-New-Relic purpose; omitted handler and configuration details limit certainty about event wiring and deployment setup.
Main entry points: handler.py Object reader
Components 11
S3 ingestion
- S3 bucket
- Lambda handler
src/handler.py - Object reader
src/handler.py
Log processing
- CloudTrail conversion
src/handler.py - Log batching
src/handler.py - Payload compression
src/handler.py
New Relic delivery
- Endpoint selection
src/handler.py - Request creation
src/handler.py - Async delivery
src/handler.py
Other components
- S3 event
- New Relic Logs
Connections 10
- S3 event → Lambda handler: invokes
README.md - Lambda handler → Object reader: fetches object
src/handler.py - Object reader → S3 bucket: reads object
src/handler.py - Object reader → CloudTrail conversion: converts records
src/handler.py - Object reader → Log batching: batches logs
src/handler.py - Log batching → Payload compression: packages payload
src/handler.py - Payload compression → Request creation: creates request
src/handler.py - Request creation → Endpoint selection: selects endpoint
src/handler.py - Request creation → Async delivery: sends request
src/handler.py - Async delivery → New Relic Logs: posts logs
src/handler.py