Prerequisites
Before setting up an S3 destination, ensure that you have:- An AWS account with access to S3
- An S3 bucket (or permissions to create one)
- AWS credentials with the following permission:
s3:PutObject
Create an S3 destination
Step 1: Set up your S3 bucket
If you don’t already have an S3 bucket, create one in the AWS Console or using the AWS CLI:Step 2: Create AWS credentials
Create an IAM user or role with permissions to write to your S3 bucket. You need:- AWS Access Key ID
- AWS Secret Access Key
- AWS Session Token (optional, for temporary credentials)
Step 3: Add the destination to Ampersand
Go to the Destinations page in the Ampersand Dashboard and create a new S3 destination. You’ll need to provide:| Field | Type | Required | Description |
|---|---|---|---|
| Destination name | string | Yes | Alias to reference in your amp.yaml file |
| Bucket | string | Yes | Name of your S3 bucket |
| Region | string | Yes | AWS region where your bucket is located (e.g., us-west-2) |
| AWS Access Key ID | string | Yes | AWS access key with S3 permissions |
| AWS Secret Access Key | string | Yes | AWS secret access key |
| AWS Session Token | string | No | Session token for temporary credentials |
| Object key template | string | No | JMESPath template for object key naming |
| Storage class | string | No | S3 storage class for written objects (defaults to STANDARD) |
Ampersand encrypts and stores your AWS credentials securely.
Refer to the destination in your integration
After creating your S3 destination, reference it in youramp.yaml file:
Message format
Ampersand writes each message as a JSON object to your S3 bucket. All data is wrapped in a top-leveldata object.
In addition to the object body, each S3 object carries event metadata as S3 object metadata (x-amz-meta-* headers), including projectId, installationId, connectionId, destinationId, operationId, objectName, event-id, timestamp, and topic.
Read action messages
action: The action type (readorsubscribe)projectId: Your Ampersand project identifierprovider: The SaaS provider name (e.g.,hubspot,salesforce)groupRef/groupName: Customer group identifier and nameconsumerRef/consumerName: End user identifier and nameinstallationId: The installation instance IDinstallationUpdateTime: When the installation was last updatedobjectName: The object being syncedoperationId: Unique identifier for this sync operationoperationTime: When the operation completedresult: Array of records syncedfields: Normalized field dataraw: Original API response from the provider
Subscribe action messages
Subscribe action messages follow the same structure as read actions, but include additional event-related fields within each result entry:subscribeEventType: Normalized event type (create,update,delete,associationUpdate)providerEventType: Raw event type from the provider APIrawEvent: Original webhook event from the provider (when available)
Object key configuration
Each message is written as a separate object in your bucket. You can customize the object key (the object’s path within the bucket) using a JMESPath template. JMESPath is a query language for JSON. See jmespath.org for the full specification. You can specify an object key template when creating an S3 destination in the Ampersand Dashboard. If you don’t specify one, the default key is the message timestamp followed by the message ID:Template context
Your template can reference three namespaces:| Namespace | Fields |
|---|---|
metadata | projectId, installationId, connectionId, destinationId, operationId, objectName, event-id, timestamp, topic |
time | year, month, day, hour, minute, second, date, datetime, unix, rfc3339, rfc3339_nano |
data | The message payload (e.g., data.installationId — see Message format above) |
JMESPath is case-sensitive:
metadata.operationId works, metadata.operationid does not. Fields containing a hyphen must be quoted, e.g. metadata."event-id". Templates are validated when you create or update the destination.Custom object key examples
Group objects by synced object name:Make sure your template produces a unique key for every message — include
metadata."event-id" or metadata.operationId. If two messages evaluate to the same key, the later object overwrites the earlier one.Storage class
By default, objects are written with theSTANDARD storage class. You can choose a different class when creating the destination, such as STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, GLACIER_IR, or DEEP_ARCHIVE. See the AWS docs for a comparison.
Troubleshooting
Objects not appearing in S3
Check destination configuration:- Verify that the bucket name and region are correct in the Ampersand Dashboard.
- Test your AWS credentials:
- Check that IAM permissions for the credential include
s3:PutObjecton the bucket.
Limitations
- Message size: Unlike Kinesis, S3 destinations have no practical message size limit — large payloads are written directly to your bucket.
- One object per message: Each message becomes a separate S3 object. High-volume syncs produce many small objects, which affects S3 request costs.
- Ordering: S3 objects are independent; there are no ordering guarantees. Use the
timestampobject metadata or a time-based key template to order messages.
If you have questions about scaling, contact
support@withampersand.com.
