Skip to main content
AWS S3

AWS S3

AWS S3 allows publishers to securely store and manage large volumes of advertising and audience data in the cloud.

Setup

Troubleshooting

Overview

The AWS S3 integration enables publishers to leverage Permutive’s bi-directional data capabilities with their S3 storage. This integration operates in two modes: Routing (Destination): Export first-party event data from Permutive to S3 buckets. Permutive offers two distinct routing modes:
  • S3 Streaming: Near real-time streaming, ideal for low-latency data pipelines and analytics
  • S3 Batch: Daily scheduled exports, suitable for data warehouse ingestion and batch processing workflows
Read more in Routing documentation.
Routing capability requires the Routing package in addition to Core Platform. Contact your Customer Success Manager to enable Routing.
Connectivity (Source): Import audience data from your S3 storage into Permutive for cohort building and activation across your publisher inventory. Both Routing modes support exporting event data, identity data (aliases), and segment metadata to customer-owned S3 buckets with Hive-style partitioning and compression.

Environment Compatibility

Prerequisites

For Routing (exporting data to S3):
  • AWS account with permissions to create S3 buckets
  • S3 bucket created in the appropriate AWS region
  • Ability to configure S3 bucket policies with specific permissions
Permutive writes to your bucket using a Permutive-owned IAM role. You do not need to create an IAM user or share AWS access keys.

Setup

S3 Streaming routing exports your first-party event data to an S3 bucket in near real-time as GZIP-compressed JSONL files with Hive-style partitioning. Data arrives with approximately 5-minute latency, making it ideal for low-latency data pipelines and ingestion into AWS services such as Athena, Redshift, or EMR.Setup requires coordination with Permutive support. You will need to create an S3 bucket, attach a bucket policy granting a Permutive-owned IAM role write access, and then share your bucket details with the Permutive team.

Prerequisites

  • AWS account with permissions to create S3 buckets
  • An S3 bucket in a region-specific location (e.g., us-east-1, eu-west-1) with public access blocked and ACLs disabled
  • A bucket policy granting arn:aws:iam::941252478151:role/permutive-s3-routing the s3:PutObject, s3:GetObject and s3:DeleteObject actions on the target path, plus s3:ListBucket on the bucket
For complete setup steps, see Setting up S3 Streaming Routing.

What Happens After Setup

Once routing is active:
  1. Files stream to S3 in near real-time with approximately 5-minute latency
  2. Hive-style partitions are created automatically by hour
  3. Event data is written as GZIP-compressed JSONL files
  4. File naming follows the pattern {timestamp}-{hash}-{worker_id}.jsonl.gz
See the Streaming Schema section below for detailed schema information.

Data Types

Streaming Schema

Events in S3 Streaming are exported in newline-delimited JSON format with the following structure:
string
required
Unix timestamp in milliseconds as a string
string
required
Unique identifier for this event
string
required
Permutive user ID
string
required
Name of the event (e.g., Pageview, slotclicked)
string
required
Organization identifier
string
required
Workspace/project identifier
string
Session identifier (optional)
string
Page view identifier (optional)
string
Source URL (optional)
array[integer]
Array of segment IDs the user belongs to
array[string]
Array of cohort codes the user belongs to at the time of the event
object
Custom event properties as key-value pairs

Example Event

Identity synchronization events contain cross-device and identity mapping data.
string
required
Unix timestamp in milliseconds as a string
string
required
Permutive user ID
string
required
Organization identifier
string
required
Workspace/project identifier
array
required
Array of alias objects, each containing:
  • id: The alias identifier value
  • tag: The alias type (e.g., email_sha256, device_id)

Example Sync Alias

Segment metadata snapshots containing segment definitions. These files are NOT date-partitioned.
string
required
Segment UUID
integer
required
Segment number/ID used in the segments array of events
string
required
Human-readable segment name
array[string]
Array of tags associated with the segment
object
Additional segment metadata
string
required
Workspace identifier
array[string]
Array of ancestor workspace/organization IDs
string
State of the workspace (e.g., “Active”, “Deleted”)
boolean
Whether the segment has been deleted

Example Segment

Batch Schema

Batch exports create separate tables for each event type (e.g., pageview_events, videoview_events). All event tables share a common structure:
timestamp
Timestamp for when the event was received by Permutive (in UTC)
string
Unique identifier for each individual event
string
Identifier unique to a particular user
string
Identifier unique to a user’s session. Sessions last 30 minutes unless a user stays on site
string
Identifier unique to a particular page or screen view
string
Identifier for the workspace which the event originated from
array[integer]
A list of all segment IDs the user was in when the event fired
array[string]
A list of all cohort codes the user was in when the event fired
object
Event-specific properties as a nested object. Structure varies by event type.

Example Pageview Event

Identity data and alias mappings for cross-device tracking.
timestamp
required
Timestamp when the alias was captured
string
Type of alias event
string
required
Permutive user identifier
string
required
External identity value (e.g., hashed email, device ID)
string
required
Identity tag or namespace (e.g., email_sha256, device_id)
string
Workspace identifier

Example Alias

Domain-level metadata. This is a snapshot table that is fully replaced with each export.
string
required
Domain name
string
Workspace identifier

Example Domain

Segment definitions and metadata. This is a snapshot table that is fully replaced with each export.
integer
required
Segment ID number
string
required
Segment name
array[string]
Array of tags associated with the segment
string
JSON string containing additional segment metadata
string
Workspace identifier

Example Segment Metadata

File Formats and Compression

  • Format: Newline-delimited JSON (.jsonl)
  • Compression: GZIP (.gz)
  • File Extension: .jsonl.gz
  • Character Encoding: UTF-8

JSON Format

  • Format: Newline-delimited JSON
  • Compression: GZIP
  • File Extension: .json.gz
  • Character Encoding: UTF-8

Parquet Format

  • Format: Apache Parquet columnar format
  • Compression: Snappy
  • File Extension: .snappy.parquet
  • Schema: Derived from BigQuery table structure
Parquet format is recommended for data warehouse ingestion and analytics workloads due to better compression and query performance.

Troubleshooting

Symptom: Files are not appearing in S3 bucket, or logs show permission errors.Solution:
  1. Verify the bucket policy grants arn:aws:iam::941252478151:role/permutive-s3-routing all required permissions:
    • s3:PutObject
    • s3:GetObject
    • s3:DeleteObject
    • s3:ListBucket
  2. Check that the bucket policy includes the correct bucket ARN:
  3. If the policy is scoped to a prefix, confirm the Resource ends with /* after the prefix (.../permutive/*, not .../permutive*) — a wildcard does not match across /
  4. Confirm the policy is attached to the bucket, not to an IAM user or role in your own account
  5. If your bucket’s default encryption uses a customer-managed KMS key, confirm the Permutive role also has permissions on that key (see KMS Encryption Issues below)
If your integration was set up using AWS access keys rather than a bucket policy, contact Technical Services — we can migrate it to role-based access so you no longer need to rotate credentials.
Symptom: No files appearing in S3 bucket after setup, or files stopped appearing.Solution:
  1. Verify the Permutive SDK is properly deployed and events are being collected (check Event Inspector in the Dashboard)
  2. Low-traffic sites may see longer delays between files due to batch size thresholds
  3. Verify the bucket region matches the configured region:
    • Region must be specific (e.g., eu-central-1, not just EU)
  4. Verify bucket path structure is correct:
  5. If issues persist, contact Permutive support at technical-services@permutive.com with your integration details
Symptom: Daily batch exports are missing or delayed.Solution:
  1. Batch exports run on 24-hour cycles. Check if sufficient time has passed since the last export window.
  2. Verify the Permutive SDK is properly deployed and events are being collected
  3. Contact Permutive support at technical-services@permutive.com to check batch export job logs and status
Symptom: Files appearing in unexpected locations or wrong folder structure.Solution:
  1. Verify the bucketPrefix configuration:
    • Should NOT include leading / unless intentional
    • Should NOT include bucket name
    • Example: permutive/ not /permutive/ or s3://bucket/permutive/
  2. For Streaming, data uses Hive-style partitioning:
    • type=events/year=2026/month=01/day=15/hour=14/
    • This is expected behavior and cannot be customized
  3. For Batch, data is organized by table name:
    • data/{table_name}/year=2026/month=1/day=15/
    • This is expected behavior and cannot be customized
Symptom: AWS returns validation errors when applying bucket policy.Solution:
  1. Ensure the bucket policy JSON is valid:
    • Check for missing commas, brackets, or quotes
    • Use AWS Policy Generator or an online JSON validator
  2. Verify ARN format is correct:
    • Bucket ARN: arn:aws:s3:::BUCKET_NAME
    • Object ARN: arn:aws:s3:::BUCKET_NAME/*
    • Note the three colons ::: before bucket name
  3. Confirm the StringEquals condition is correctly formatted:
Symptom: Some event types or fields are not appearing in exported data.Solution:
  1. Verify events are being collected in Permutive:
    • Check Event Inspector in the Dashboard to confirm events are tracked
    • Use browser developer console to verify SDK is firing events
  2. Check event schema matches expected structure:
    • Events must include required fields: event_id, user_id, event_name, etc.
    • Custom properties are in the properties object
  3. Schema changes may require integration reconfiguration:
    • Contact Permutive support if you’ve made significant schema changes
Symptom: Errors related to KMS encryption when writing to S3.Solution:
  1. If using customer-managed KMS keys, verify the Permutive role (arn:aws:iam::941252478151:role/permutive-s3-routing) has KMS permissions:
  2. Confirm the KMS key policy allows the Permutive role to use the key
  3. Verify the S3 bucket’s default encryption settings are compatible
SSE-S3 (AES256) works with no additional configuration. Customer-managed KMS keys require permissions on both sides — contact Permutive support. Note that an AWS-managed KMS key (aws/s3) cannot be used, as AWS does not permit resources encrypted under an AWS managed key to be shared with other accounts.

Changelog

No changes listed yet. For detailed changelog information, visit our Changelog.