---
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).

# AWS logs: Lambda

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

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

This is the Logs with Lambda method, which deploys the Lambda Promtail function. The docs recommend it for ALB, CloudFront, and CloudTrail logs stored in S3. You deploy a Lambda function that triggers on events. When the logs are available, Lambda adds labels and forwards them to Grafana Cloud Logs.

## Log types collected with Lambda

| Log type                 | Key insights                           |
|--------------------------|----------------------------------------|
| **ALB access logs**      | Request latency, targets, status codes |
| **CloudFront logs**      | Edge locations, cache hits             |
| **CloudTrail**           | API activity, audit                    |
| **CloudWatch Logs**      | Application events                     |
| **VPC Flow Logs**        | Network traffic                        |
| **Kinesis Data Streams** | Streamed log records                   |

## Considerations

- Event-driven and automatic
- Serverless, with no infrastructure to manage
- Labels and relabeling configured through environment variables
- Cost that scales with log volume

## Documentation

View the [AWS Lambda logs](/docs/grafana-cloud/monitor-infrastructure/monitor-cloud-provider/aws/logs/cloudwatch-logs/) documentation.
