Linking AWS Config as a source
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.

The AWS Config connector syncs resource configurations, compliance status, evaluation results, conformance packs, remediation executions, and aggregated resources into the PostHog data warehouse. You can query AWS Config data alongside your product data to understand how infrastructure changes affect your users.
Prerequisites
- An AWS account with AWS Config enabled and a configuration recorder set up in the region you want to sync.
- Credentials that can read the data you want to sync. PostHog only reads data, so read access is enough. You can connect with an IAM role or with access keys.
Adding a data source
- In PostHog, go to the Sources tab of the data pipeline section.
- Click + New source and click Link next to this source.
- Enter your credentials (see Configuration below) and click Next.
- Select the tables you want to sync, choose a sync method and frequency, then click Import.
Once the syncs are complete, you can start querying this data in PostHog.
When linking AWS Config, you need:
- AWS region – the AWS region to sync data from (e.g.
us-east-1). Defaults tous-east-1. Only the selected region is synced. - An authentication method – either an IAM role or access keys.
AWS authentication
IAM role (recommended)
With IAM role assumption, PostHog uses AWS STS to assume a role in your AWS account and obtain short-lived credentials. This avoids storing long-lived access keys. Credentials refresh hourly, and the role session is scoped to only the IAM actions AWS Config needs.
To set up IAM role authentication:
- In the AWS Config setup form, select the IAM role tab.
- Create an IAM role in your AWS account with a trust policy that allows PostHog's warehouse sources role to assume it. The PostHog role ARN depends on your cloud region:
- US Cloud –
arn:aws:iam::309986977637:role/posthog-external-warehouse-sources - EU Cloud –
arn:aws:iam::623789312881:role/posthog-external-warehouse-sources
- US Cloud –
- Add an
sts:ExternalIdcondition to the trust policy. Set the value toposthog-<your_organization_id>(your organization ID is shown in the setup modal). PostHog verifies this condition is enforced – syncs fail without it. - Attach a permissions policy to the role that grants the AWS Config read actions for the tables you want to sync.
- Paste the role ARN (e.g.
arn:aws:iam::123456789012:role/posthog-warehouse-config) into the IAM role ARN field in the setup form.
Here's an example trust policy for US Cloud:
For EU Cloud, replace the principal ARN with arn:aws:iam::623789312881:role/posthog-external-warehouse-sources.
Access keys
With access keys, you provide an AWS access key ID and secret access key that PostHog stores encrypted. This method works but uses long-lived credentials. Prefer IAM role assumption when possible.
To set up access key authentication:
- In the AWS Config setup form, select the Access keys tab.
- Enter your AWS access key ID (starts with
AKIA...) and AWS secret access key. - If you're using temporary STS credentials, also enter the AWS session token. Temporary credentials expire, so update them before scheduled syncs run.
Required IAM permissions
The IAM permissions you need depend on which tables you select. To enable all tables, attach this policy to your IAM role or user:
If you only need specific tables, grant just the permissions for those tables:
| Table | Required permissions |
|---|---|
resources | config:SelectResourceConfig |
config_rules | config:DescribeConfigRules |
rule_compliance | config:DescribeComplianceByConfigRule |
conformance_packs | config:DescribeConformancePacks |
conformance_pack_compliance_scores | config:ListConformancePackComplianceScores |
rule_evaluation_results | config:DescribeConfigRules, config:GetComplianceDetailsByConfigRule |
aggregated_resources | config:DescribeConfigurationAggregators, config:SelectAggregateResourceConfig |
resource_config_history | config:SelectResourceConfig, config:GetResourceConfigHistory |
conformance_pack_evaluation_results | config:DescribeConformancePacks, config:GetConformancePackComplianceDetails |
remediation_execution_statuses | config:DescribeConfigRules, config:DescribeRemediationExecutionStatus |
resource_evaluations | config:ListResourceEvaluations |
Creating an IAM user (access keys)
- In the AWS Console, go to IAM > Users and create a new user (or use an existing one).
- Attach a policy with the permissions for the tables you want.
- Create an access key for the user under Security credentials > Access keys.
- Copy the Access key ID and Secret access key – you need both when linking the source in PostHog.
Sync modes
Each table can be synced in one of several modes, depending on what the source supports:
- Webhook (when available) – the source pushes changes to PostHog in real time. Fastest freshness, lowest ongoing cost, and the only mode that reliably captures updates and deletes.
- Incremental – only new or updated rows are synced on each run, using a cursor field (such as an
updated_attimestamp). Cheaper than a full refresh, but deletes aren't captured. - Append only – new rows are appended using a cursor field; existing rows are never updated. Ideal for immutable, append-only tables like event logs.
- Full refresh – the whole table is reloaded on every sync. Use it when a table has no reliable cursor or when you need deletions reflected.
See sync methods for a full explanation of how each mode works and how to choose between them.
| Table | Sync mode | Notes |
|---|---|---|
resources | Full refresh | Current configurations of recorded resources in the selected region. Excludes deleted resources. |
config_rules | Full refresh | AWS Config rules, their evaluation settings, and resource scopes. |
rule_compliance | Full refresh | Current compliance status and counts of noncompliant resources for each rule. |
conformance_packs | Full refresh | Conformance packs and their deployment settings in the selected region. |
conformance_pack_compliance_scores | Full refresh | Percentage of compliant rule and resource combinations in each conformance pack. |
rule_evaluation_results | Full refresh | Latest evaluation result for each resource that each AWS Config rule evaluated. |
aggregated_resources | Full refresh | Current configurations of resources across the accounts and regions of each configuration aggregator. |
resource_config_history | Incremental | Configuration items recorded for each current resource. Without a saved incremental value, reads the last 90 days. |
conformance_pack_evaluation_results | Full refresh | Latest evaluation result for each rule and resource in each conformance pack. |
remediation_execution_statuses | Full refresh | State and step details of the latest remediation execution for each resource and rule. |
resource_evaluations | Incremental | Proactive evaluations of resource configurations, usually run before deployment. |
Duplicate rows are merged by primary key, so re-read periods don't create duplicates.
Configuration
| Option | Description |
|---|---|
AuthenticationType: select Required: True | With an IAM role, PostHog reads with short-lived credentials and stores no key. Create a role connection with your role's ARN, then grant the role the permissions listed above. |
AWS regionType: text Required: False | Defaults to us-east-1. Only the selected region is synced. |
Supported tables
| Table | Description | Sync method | Incremental field | Primary key |
|---|---|---|---|---|
resources | Current configurations of recorded resources in the selected region. Excludes deleted resources. | Full refresh | — | — |
config_rules | AWS Config rules, their evaluation settings, and resource scopes. | Full refresh | — | — |
rule_compliance | Current compliance status and counts of noncompliant resources for each rule. | Full refresh | — | — |
conformance_packs | Conformance packs and their deployment settings in the selected region. | Full refresh | — | — |
conformance_pack_compliance_scores | Percentage of compliant rule and resource combinations in each conformance pack. | Full refresh | — | — |
rule_evaluation_results | Latest evaluation result for each resource that each AWS Config rule evaluated. | Full refresh | — | — |
aggregated_resources | Current configurations of resources across the accounts and regions of each configuration aggregator in the selected region. | Full refresh | — | — |
resource_config_history | Configuration items recorded for each current resource in the selected region. Without a saved incremental value, the table reads the last 90 days. | Incremental, Full refresh | configuration_item_capture_time | — |
conformance_pack_evaluation_results | Latest evaluation result for each rule and resource in each conformance pack. | Full refresh | — | — |
remediation_execution_statuses | State and step details of the latest remediation execution for each resource and rule. | Full refresh | — | — |
aggregate_rule_compliance | Compliance status of each rule in each account and region of each configuration aggregator in the selected region. | Full refresh | — | — |
resource_compliance | Overall compliance status of each evaluated resource, with the count of rules it does not comply with. | Full refresh | — | — |
rule_evaluation_statuses | Last successful and failed invocation and evaluation times, and the last error, of each rule. | Full refresh | — | — |
remediation_configurations | Remediation action set up for each rule, with its SSM document, parameters, and automatic retry settings. | Full refresh | — | — |
resource_evaluations | Proactive evaluations of resource configurations, usually run before deployment. | Incremental, Full refresh | evaluation_start_timestamp | — |
Troubleshooting
- Authorization or access denied error – the IAM role or user doesn't have the required permissions for the selected tables. Check the permissions table and update the policy.
- Signature or credential error – re-enter the secret access key. If you're using temporary credentials, the session token may have expired.
- "Enable AWS Config" or "Set up a recorder" error – AWS Config isn't enabled in the selected region, or no configuration recorder is set up. Enable AWS Config and create a recorder in the AWS Console.
- No rows synced for a table – the credential may not have access to that data, or the feature may not be configured. For example, the
aggregated_resourcestable requires at least one configuration aggregator, andconformance_packsrequires conformance packs to be deployed. - IAM role assumption fails – verify the trust policy includes the correct PostHog role ARN for your cloud region and that the external ID matches
posthog-<your_organization_id>. PostHog checks that the external ID condition is enforced.
If your sync is failing or data looks wrong, see the Data warehouse troubleshooting guide. If that doesn't help, contact support – we're happy to help.





