Amazon CloudWatch

Amazon CloudWatch

Beta
Beta release

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

Learn more
PostHog Wizard hedgehog

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

OptionTypeRequired
AWS access key IDtextYes
AWS secret access keypasswordYes
AWS session token (only for temporary credentials)passwordNo
AWS regiontextYes
Log groups to sync (one per line, empty syncs every log group)textareaNo
Metric queries (JSON list)textareaNo
Start date (defaults to 7 days back for logs, 14 for metrics, 30 for alarm history)textNo

Linking Amazon CloudWatch to PostHog

  1. Go to the Data pipeline page in PostHog
  2. Click New source and select Amazon CloudWatch
  3. Fill in the required configuration fields
  4. Click Next, select the tables you want to sync, and then press Import

Supported tables

TableDescriptionSync methodIncremental fieldPrimary 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 refreshtimestamp—
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 refreshtimestamp—
metric_data

Datapoints for the metric queries configured on the source, one row per query and timestamp.

Incremental, Full refreshtimestamp—