
Amazon CloudWatch
BetaThis source is currently in beta. It works end to end, but you may still hit rough edges. Let us know if you do.
Let AI connect your sources for you
Skip the manual setup — run this in your project and the wizard auto-detects your databases and APIs and connects them to PostHog.

Connect Amazon CloudWatch to PostHog to sync your data into the PostHog data warehouse for analysis and modeling.
Sync CloudWatch log events, alarms, alarm history and metric datapoints from one AWS region into the PostHog Data warehouse.
Create an IAM user or role with the logs:DescribeLogGroups, logs:FilterLogEvents, cloudwatch:DescribeAlarms, cloudwatch:DescribeAlarmHistory and cloudwatch:GetMetricData permissions, then paste its access key ID and secret access key. Add a session token too if you are using temporary credentials.
Log events sync from the log groups you list, or from every log group in the region (up to 50) when the list is empty. A log group or metric query added later syncs from the next sync on; resync the table to backfill its history. Any log delivered to CloudWatch Logs works, including Bedrock model invocation logs and CloudFront standard logs. Metric datapoints sync for the metric queries you configure as JSON, for example [{"id": "cpu", "namespace": "AWS/EC2", "metric_name": "CPUUtilization", "dimensions": {"InstanceId": "i-0123456789abcdef0"}, "stat": "Average", "period": 300}]. S3 Storage Lens metrics live in the AWS/S3/Storage-Lens namespace. Older datapoints come back at the resolution CloudWatch keeps for them: 5 minutes after 15 days and 1 hour after 63 days.
Configuration
| Option | Type | Required |
|---|---|---|
AWS access key ID | text | Yes |
AWS secret access key | password | Yes |
AWS session token (only for temporary credentials) | password | No |
AWS region | text | Yes |
Log groups to sync (one per line, empty syncs every log group) | textarea | No |
Metric queries (JSON list) | textarea | No |
Start date (defaults to 7 days back for logs, 14 for metrics, 30 for alarm history) | text | No |
Linking Amazon CloudWatch to PostHog
- Go to the Data pipeline page in PostHog
- Click New source and select Amazon CloudWatch
- Fill in the required configuration fields
- Click Next, select the tables you want to sync, and then press Import
Supported tables
| Table | Description | Sync method | Incremental field | Primary key |
|---|---|---|---|---|
log_groups | Log groups in the region, with retention, stored bytes and encryption settings. | Full refresh | — | — |
log_events | Log events from the configured log groups (or every log group when none is set), one row per event. | Incremental, Full refresh | timestamp | — |
alarms | Metric and composite alarms with their current state, thresholds and actions. | Full refresh | — | — |
alarm_history | State transitions, configuration updates and action executions for every alarm. | Incremental, Full refresh | timestamp | — |
metric_data | Datapoints for the metric queries configured on the source, one row per query and timestamp. | Incremental, Full refresh | timestamp | — |











