Scheduled Data Exports
BillDog exports customers, subscriptions, transactions, raw events, daily revenue and cohort snapshots to your own storage every hour, day or week. For Amazon S3, let BillDog assume an IAM role (or give it an access key) that can only s3:PutObject. For Google Cloud Storage, give it a service-account key (or an HMAC key) with Storage Object Creator. For Azure Blob, give it a container SAS URL. BillDog signs every upload itself, so a daily job keeps delivering without you creating new URLs.
Exports are set up under Dashboard → Data Exports and need a CortX plan. Saving a job writes a small _billdog_connection_check.txt to the destination first, so a credential that can’t write is rejected at save time, not on the first scheduled run.
Which credential each destination takes
| Destination | Credential | Minimum permission |
|---|---|---|
| Amazon S3 | IAM role ARN (recommended) or access key ID + secret, bucket, region | s3:PutObject on arn:aws:s3:::BUCKET/PREFIX/* |
| Google Cloud Storage | Service-account key file (recommended) or HMAC key, bucket | Storage Object Creator on the bucket |
| Azure Blob Storage | Container SAS URL with {key} where the blob name goes | Create + Write on the container |
| BigQuery | Service-account email + private key, project, dataset, table | BigQuery Data Editor on the dataset |
| Snowflake, Redshift, Databricks | Your ingest endpoint URL + optional bearer token | — |
This matches how other subscription and analytics platforms take bucket credentials: RevenueCat’s scheduled exports offer an IAM role or an access key for S3 and recommend a service-account JSON key for GCS, and PostHog’s batch exports recommend an IAM role, accept access keys and reach GCS through HMAC keys (both docs read 17 November 2026).
Amazon S3
IAM role (recommended)
BillDog stores no long-lived key. Each run, its own AWS identity assumes your role for 15 minutes using STS AssumeRole, and the trust policy only accepts that call with your project’s External ID.
- In the job form, choose IAM role. It shows BillDog’s principal ARN, your External ID (
billdog-<project id>) and both policies, ready to copy. - Create a role with that trust policy: it allows
sts:AssumeRolefor BillDog’s principal only whensts:ExternalIdmatches. - Attach a permissions policy allowing only
s3:PutObjecton your bucket and prefix (the same policy as below). - Paste the role ARN, bucket and region into the job.
The External ID is derived from your project, never typed in, so another BillDog customer who pastes your role ARN can’t use it: their job sends their own project’s External ID. A refused assume-role shows up as AccessDenied in the job’s last error.
Access key
- Create an IAM user for BillDog (no console access).
- Attach this inline policy, replacing the bucket and prefix:
{
"Version": "2012-10-17",
"Statement": [{
"Effect": "Allow",
"Action": "s3:PutObject",
"Resource": "arn:aws:s3:::my-company-exports/billdog/*"
}]
}- Create an access key for the user and paste the key ID and secret into the job, with the bucket’s region (for example
eu-west-1).
Uploads are signed with AWS Signature Version 4 on every request. If the bucket uses SSE-KMS with a customer-managed key, also allow kms:GenerateDataKey on that key. A wrong region shows up as AuthorizationHeaderMalformed in the job’s last error.
Google Cloud Storage
Service-account key (recommended)
- Create a service account, and on the bucket grant it Storage Object Creator.
- Create a JSON key for it and paste the whole file into the job.
BillDog exchanges the key for a short-lived OAuth token on each run and uploads through the JSON API.
HMAC key
Under Cloud Storage → Settings → Interoperability, create an HMAC key for a service account that has Storage Object Creator on the bucket. BillDog signs uploads to the XML API with it, the same way as S3. Organisation policies that restrict HMAC keys block this option.
Azure Blob Storage
Create a SAS for the container with Create and Write permissions, and paste its URL with {key} after the container name, for example https://acct.blob.core.windows.net/exports/{key}?sv=…&sig=…. A container SAS works for every blob name, but it has an expiry you set: the job fails once it passes, so pick a long expiry or a stored access policy you can extend.
Files, schedule and failures
- Each run writes one NDJSON file:
PREFIX/<table>-<timestamp>.ndjson. - Runs are incremental: only rows new or changed since the last successful run, up to 50,000 per run.
- A failed run keeps its cursor, so the next run re-sends the same rows. The job card shows the last error.
- Jobs saved with a presigned S3 or GCS URL under the earlier setup fail with a message asking you to re-create them with a key.
To pull data into BillDog rather than out of it, see Revenue & Subscription Metrics for what each exported revenue figure means, and the webhooks reference for real-time events.
FAQ
Why can't I paste a presigned S3 or GCS URL?
A presigned URL is signed for one object key and expires, at most 7 days after it is created for both S3 and GCS. A scheduled export writes a new file every run, so one stored URL cannot cover it. BillDog signs each upload itself with a credential you can scope to write-only access.
What is the least access I can give BillDog?
On S3, an IAM role (or an access key) whose only permission is s3:PutObject on your bucket or prefix. On GCS, a service account with Storage Object Creator on the bucket. BillDog only writes new objects; it never lists, reads or deletes them.
How are my credentials stored?
The secret part (S3 secret access key, GCS key file or HMAC secret, Azure SAS URL, BigQuery private key, webhook bearer token) is encrypted with AES-256-GCM before it is written, and the dashboard can't write it to the database directly. It is never shown again after you save.
Can BillDog assume an IAM role instead of using an access key?
Yes, and it's the recommended option. You create a role that trusts BillDog's AWS principal on the condition of your project's External ID, and paste the role ARN. BillDog stores no long-lived key: each run it assumes the role for 15 minutes. Another BillDog customer can't use your role, because their jobs send their own project's External ID.
What does a file look like?
Newline-delimited JSON, one row per line, named <table>-<timestamp>.ndjson under your key prefix (billdog/ by default). Each run exports rows changed since the previous successful run, up to 50,000 rows.
Sources
- AWS, Sharing objects with presigned URLs — maximum 7-day expiry (read 17 Nov 2026).
- Google Cloud, Signed URLs — signed per object, maximum 7 days (read 17 Nov 2026).
- AWS, Signature Version 4 for API requests (read 17 Nov 2026).
- Google Cloud, Signatures — AWS4-HMAC-SHA256 with HMAC keys (read 17 Nov 2026).
- RevenueCat, Scheduled Data Exports (read 17 Nov 2026).
- PostHog, S3 batch exports (read 17 Nov 2026).
Was this page helpful?
Or rate this page: