Destinations

AWS S3

Store events in an Amazon S3 bucket.

Configuration

Config

FieldTypeRequiredDescription
config.bucketstringYesThe S3 bucket name
config.regionstringYesAWS region (e.g., us-east-1)
config.key_templatestringNoJMESPath expression for S3 object key
config.storage_classstringNoS3 storage class (e.g., STANDARD, GLACIER)
config.endpointstringNoCustom endpoint URL (for LocalStack, etc.)

Credentials

FieldTypeRequiredDescription
credentials.keystringYesAWS Access Key ID
credentials.secretstringYesAWS Secret Access Key
credentials.sessionstringNoAWS Session Token (for temporary credentials)

Example

curl --location 'https://<OUTPOST_API_URL>/api/v1/<TENANT_ID>/destinations' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer <API_KEY>' \ --data '{ "type": "aws_s3", "topics": ["orders"], "config": { "bucket": "my-events-bucket", "region": "us-east-1" }, "credentials": { "key": "<AWS_ACCESS_KEY_ID>", "secret": "<AWS_SECRET_ACCESS_KEY>" } }'
sh

Object Key

By default, objects are stored with keys in the format: {timestamp}_{event-id}.json

You can customize the key using a JMESPath expression in key_template:

{ "config": { "bucket": "my-events-bucket", "region": "us-east-1", "key_template": "join('/', [data.customer_id, metadata.\"event-id\", '.json'])" } }
json

Object Format

Events are stored as JSON files containing the event's data field. For example, if you publish an event:

{ "topic": "orders", "data": { "order_id": "123", "status": "created" }, "metadata": { "source": "checkout-service" } }
json

The S3 object body will be:

{ "order_id": "123", "status": "created" }
json

Event metadata is stored in the S3 object's metadata (not in the body). This includes system metadata and any event metadata from the published event:

Metadata KeySourceDescription
event-idSystemThe unique event ID
topicSystemThe event topic
timestampSystemEvent timestamp (Unix)
*EventAny additional metadata from the published event's metadata field

IAM Permissions

The IAM user or role needs the following permission:

{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": "s3:PutObject", "Resource": "arn:aws:s3:::my-events-bucket/*" } ] }
json

Storage Classes

Supported storage classes:

  • STANDARD (default)
  • REDUCED_REDUNDANCY
  • STANDARD_IA
  • ONEZONE_IA
  • INTELLIGENT_TIERING
  • GLACIER
  • DEEP_ARCHIVE
  • GLACIER_IR