---
title: "AWS logs - Lambda | Grafana Labs"
description: "Collect specific AWS log types using the Lambda agent."
---

> For a curated documentation index, see [llms.txt](/llms.txt). For the complete documentation index, see [llms-full.txt](/llms-full.txt).

## How it works

[AWS logs Lambda architecture: Specific log types trigger Lambda to forward to Grafana Cloud Loki](cp-olly-aws-logs-lambda-light.svg "AWS logs Lambda architecture: Specific log types trigger Lambda to forward to Grafana Cloud Loki")

**Complexity:** Simple | **Infrastructure:** Serverless | **Latency:** Event-driven

## Specific log types collected with Lambda

| Log type            | Format          | Key insights                           |
|---------------------|-----------------|----------------------------------------|
| **ALB Access Logs** | Space-delimited | Request latency, targets, status codes |
| **CloudFront Logs** | Tab-separated   | Edge locations, cache hits             |
| **S3 Access Logs**  | Space-delimited | Bucket access patterns                 |
| **CloudTrail**      | JSON            | API activity, audit                    |

## Trade-offs

| Pros                           | Cons                             |
|--------------------------------|----------------------------------|
| Event-driven, automatic        | Higher cost for high volumes     |
| Serverless (no infrastructure) | Format parsing required          |
| Custom transformation possible | ~3x more expensive than Firehose |

## Documentation

View the full documentation. *Learning path coming soon!*

[AWS Lambda logs](https://grafana.com/docs/grafana-cloud/monitor-infrastructure/monitor-cloud-provider/aws/logs/cloudwatch-logs/)
