Linking Amazon SES 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 Amazon SES connector syncs your SES account data into PostHog, so you can monitor sending health, quota, verified identities, and suppressed recipients alongside your product data.
This source syncs account-level data from the SES API. Per-message send, bounce, and complaint events are only available through SES event destinations, not the SES API, so they are not included.
Prerequisites
You need an AWS account that sends email through Amazon SES.
You also need an IAM user or role with the following permissions:
ses:GetAccountses:ListConfigurationSetsses:GetConfigurationSetses:ListEmailIdentitiesses:GetEmailIdentityses:ListSuppressedDestinationsses:ListEmailTemplatesses:GetEmailTemplateses:ListContactListsses:GetContactListses:ListDedicatedIpPoolsses:GetDedicatedIpPoolses:GetDedicatedIpsses:ListCustomVerificationEmailTemplatesses:GetCustomVerificationEmailTemplateses:ListMultiRegionEndpoints
SES data is regional. Connect one source per AWS region you send email from.
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 Amazon SES, you choose between two authentication methods: IAM role (recommended) or access keys.
You'll also need:
- AWS region: the region your SES account sends from, like
us-east-1.
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.
To set up IAM role authentication:
- Create an IAM role in your AWS account with the SES permissions listed in Prerequisites.
- Add a trust policy that allows PostHog's role to assume it. The PostHog role ARN depends on your cloud region:
- US Cloud -
arn:aws:iam::309986977637:role/posthog-external-batch-exports - EU Cloud -
arn:aws:iam::623789312881:role/posthog-external-batch-exports
- 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). - Paste the role ARN into the IAM role ARN field when linking the source.
Here's an example trust policy:
And an example permissions policy:
Note: Self-hosted users should check with their instance administrator for the correct PostHog role ARN to trust.
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 Console, go to IAM > Users and create a new user (or use an existing one).
- Attach a policy with the SES permissions listed in Prerequisites. You can use the same permissions policy shown in the IAM role section.
- Create an access key for the user under Security credentials > Access keys.
- Copy the Access key ID and Secret access key. You'll need both when linking the source in PostHog.
If you grant only some of these permissions, the tables you can't read are flagged in the table picker so you can deselect them.
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.
The suppressed_destinations table supports incremental sync using last_update_time as the cursor, so each sync only fetches addresses added or updated since the last one. Addresses removed from the suppression list in AWS are not deleted from the synced table.
The other tables are small and sync as a full refresh. The account table is a snapshot: it holds one row describing the account at the time of the latest sync.
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: True |
Supported tables
| Table | Description | Sync method | Incremental field | Primary key |
|---|---|---|---|---|
account | Sending status, quota, and reputation enforcement for the connected AWS Region. One row per sync. | Full refresh | — | — |
configuration_sets | Configuration sets with their tracking, delivery, reputation, sending, and suppression options. | Full refresh | — | — |
contact_lists | Contact lists that store your contacts, with their topics, description, and timestamps. | Full refresh | — | — |
custom_verification_email_templates | Custom verification email templates, with their sender, subject, content, and redirect URLs. | Full refresh | — | — |
dedicated_ip_pools | Dedicated IP pools in the account, with the scaling mode of each pool. | Full refresh | — | — |
dedicated_ips | Dedicated IP addresses assigned to the account, with their warm-up progress and pool assignment. | Full refresh | — | — |
email_identities | Verified email identities (domains and addresses) with DKIM, MAIL FROM, and verification details. | Full refresh | — | — |
email_templates | Email templates stored in SES, with their subject line and HTML and plain-text bodies. | Full refresh | — | — |
multi_region_endpoints | Multi-region endpoints (global endpoints), with their status and the AWS Regions they route sending to. | Full refresh | — | — |
suppressed_destinations | Email addresses on the account-level suppression list, with the reason and time they were added. | Incremental, Full refresh | last_update_time | — |
Troubleshooting
- If you see "AWS rejected the access key", check that the access key ID and secret access key are correct and that the key is still active in IAM. If you're using an IAM role, check that the role ARN is correct and the trust policy allows PostHog to assume it.
- If the connection fails with an
sts:AssumeRoleerror, verify the trust policy includes the correct PostHog role ARN andsts:ExternalIdcondition. - If you see a signature error, re-enter the secret access key. If you are using temporary credentials, the session token may have expired.
- If you see "missing SES read permissions", grant the
ses:permissions listed in Prerequisites to the IAM user or role. - If a sync fails with a region error, check that the region is a valid AWS region code like
us-east-1and that your SES account sends from that region.
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.





