Skip to main content
connic

AWS S3

Run an agent on every file that lands in your bucket. It gets the key and event details, and with Include Content the file itself.

Modes
Inbound
Set up in
Dashboard or connectors/*.yaml
Documentation
AWS S3 docs
Publisher
By connic

Point your bucket at one URL

S3 sends its event notifications through an SNS subscription or an EventBridge rule straight to the connector, with no function in between.

SNS subscription
Subscribe the connector URL with ?secret= appended. connic confirms the subscription, checks the AWS signature on every message and unwraps the envelope.
EventBridge
Use the same URL with its secret as the API destination of an EventBridge rule. EventBridge events reach the agent in the same payload shape.
A secret on every call
Send it as a secret query parameter, an X-Connic-Secret header or a Bearer token. A wrong secret gets a 401, and no run starts.
setup-sns.sh
# 1. Create an SNS topic
aws sns create-topic --name s3-events

# 2. Subscribe the connector URL
aws sns subscribe \
  --topic-arn arn:aws:sns:eu-central-1:123456789012:s3-events \
  --protocol https \
  --notification-endpoint '<connector-url>?secret=<secret-key>'

# 3. Send the bucket's events to the topic
aws s3api put-bucket-notification-configuration \
  --bucket example-invoices \
  --notification-configuration '{
    "TopicConfigurations": [{
      "TopicArn": "arn:aws:sns:eu-central-1:123456789012:s3-events",
      "Events": ["s3:ObjectCreated:*"]
    }]
  }'

Get the event, or the file with it

Every matching object starts its own run. Turn on Include Content, and connic downloads the file and hands it to the model with the event.

Metadata by default
Bucket, key, size, ETag, event name and time, plus the AWS region, request ID and source IP under _s3.
Include Content
Text, JSON and XML arrive as UTF-8 text, everything else as base64, up to a Max File Size you set between 1 and 10 MiB.
Files over the limit
The run still starts with the metadata, and content.skipped and file_issues say why. Turn on Files required on the agent link to stop those runs before they start.
Read access only
Downloads need s3:GetObject on the bucket. Without Include Content, the connector never reads from it.
event-payload.json
{
  "bucket": "example-invoices",
  "key": "incoming/inv-2041.pdf",
  "size": 182344,
  "etag": "9b2cf535f27731c974343645a3985328",
  "event_name": "ObjectCreated:Put",
  "event_time": "2026-10-13T09:00:00.000Z",
  "_s3": {
    "event_source": "aws:s3",
    "aws_region": "eu-central-1",
    "request_id": "C3D13FE58DE4C810",
    "source_ip": "192.0.2.1"
  }
}
with-include-content.json
{
  "bucket": "example-invoices",
  "key": "incoming/inv-2041.pdf",
  "size": 182344,
  "etag": "9b2cf535f27731c974343645a3985328",
  "event_name": "ObjectCreated:Put",
  "event_time": "2026-10-13T09:00:00.000Z",
  "content": {
    "base64": "JVBERi0xLjcKJeLjz9MK...",
    "content_type": "application/pdf",
    "size_bytes": 182344,
    "encoding": "base64"
  },
  "_s3": { ... }
}

Keep the trigger next to your agents

Declare it as a YAML file in connectors/. Your AWS keys and region stay in a Connection that the file names, and connic generates the URL and secret on the first deploy.

connectors/invoice-uploads.yaml
type: s3
name: Invoice uploads
connection: invoices-aws
config:
  bucket_name: example-invoices
  prefix: incoming/
  suffix: .pdf
  include_content: true
agents:
  - name: invoice-pipeline
    files_required: true
create: connectors/invoice-uploads.yaml (s3)

Let AWS retry without duplicate runs

connic skips the events you filter out before any run starts, and a redelivered event reuses the run it already started.

Event types
Object Created is the default and covers Put, Post, Copy and CompleteMultipartUpload. All Events adds deletes and restores.
Prefix and suffix
Limit runs to keys such as incoming/ and .pdf. Other keys are ignored without a run.
Private storage
Route file downloads through a bridge when your storage endpoint sits inside your network.
  1. Notification arrives

    SNS or EventBridge posts up to 100 records in a body of up to 10 MiB.

  2. connic filters

    Records for another bucket, another event type or a key outside your prefix and suffix are skipped.

  3. Runs start

    Each remaining record starts one run per linked agent, with a run ID derived from the event.

  4. Failures ask for a retry

    If a run can't start, connic answers 503. The retry produces the same run IDs, so runs that already started are reused.

Where an S3 trigger fits

Pick a setup to see what lands in the bucket, what the agent receives and where the result goes.

Scanned invoices land in incoming/, and an outbound webhook posts the extracted fields to your ERP.

Invoice scanner
S3 inbound
invoice-pipeline
Fields in your ERP
event-payload.json
{
  "bucket": "example-invoices",
  "key": "incoming/inv-2041.pdf",
  "size": 182344,
  "etag": "9b2cf535f27731c974343645a3985328",
  "event_name": "ObjectCreated:Put",
  "event_time": "2026-10-13T09:00:00.000Z",
  "content": {
    "base64": "JVBERi0xLjcKJeLjz9MK...",
    "content_type": "application/pdf",
    "size_bytes": 182344,
    "encoding": "base64"
  },
  "_s3": { ... }
}
outbound-payload.json
{
  "run_id": "550e8400-e29b-41d4-a716-446655440000",
  "agent_name": "invoice-pipeline",
  "status": "completed",
  "output": "Invoice 2041, Example Supplies, 1,240 EUR net, due Nov 12.",
  "error": null,
  "started_at": "2026-10-13T09:00:00Z",
  "ended_at": "2026-10-13T09:00:09Z",
  "token_usage": {
    "input_tokens": 2140,
    "output_tokens": 72,
    "thinking_tokens": 0,
    "cached_input_tokens": 0,
    "total_tokens": 2212
  }
}

Signed contracts land in contracts/, and the agent posts the term, notice period and renewal to Slack.

Legal team
S3 inbound
contract-reviewer
Summary in Slack
event-payload.json
{
  "bucket": "example-contracts",
  "key": "contracts/msa-example-gmbh.pdf",
  "size": 264511,
  "etag": "4c1e8f0b7d2a93e65f10a8c7b3d94e21",
  "event_name": "ObjectCreated:Put",
  "event_time": "2026-10-13T09:00:00.000Z",
  "content": {
    "base64": "JVBERi0xLjcKJeLjz9MK...",
    "content_type": "application/pdf",
    "size_bytes": 264511,
    "encoding": "base64"
  },
  "_s3": { ... }
}
connector-payload.json
{
  "text": "Example GmbH MSA: 24 months, 3 months notice, auto-renews.",
  "channel_id": "C01234567"
}

Partners drop CSV exports into imports/, and the agent emails them the rows that need fixing.

Partner export
S3 inbound
import-checker
Email to the partner
event-payload.json
{
  "bucket": "example-imports",
  "key": "imports/products-2026-10.csv",
  "size": 53,
  "etag": "e7a2c94b0f1d36852b8e4a7f0c9d1b63",
  "event_name": "ObjectCreated:Put",
  "event_time": "2026-10-13T09:00:00.000Z",
  "content": {
    "text": "sku,qty,price\nA-100,4,19.90\nA-101,,24.50\nB-207,2,9.99",
    "content_type": "text/csv",
    "size_bytes": 53,
    "encoding": "utf-8"
  },
  "_s3": { ... }
}
connector-payload.json
{
  "to": "imports@example.com",
  "subject": "2 rows to fix in products-2026-10.csv",
  "body": "Row 3 has no quantity. Row 4 uses the unknown SKU B-207."
}

New photos land in the media bucket, and an outbound webhook sends alt text and tags to your CMS.

Photo studio
S3 inbound
catalog-tagger
Alt text in your CMS
event-payload.json
{
  "bucket": "example-media",
  "key": "products/shirt-0412.jpg",
  "size": 734002,
  "etag": "b05d7e3a91c84f26e0a3d58b7c12f9e4",
  "event_name": "ObjectCreated:Put",
  "event_time": "2026-10-13T09:00:00.000Z",
  "content": {
    "base64": "/9j/4AAQSkZJRgABAQAAAQABAAD...",
    "content_type": "image/jpeg",
    "size_bytes": 734002,
    "encoding": "base64"
  },
  "_s3": { ... }
}
outbound-payload.json
{
  "run_id": "550e8400-e29b-41d4-a716-446655440000",
  "agent_name": "catalog-tagger",
  "status": "completed",
  "output": "Blue linen shirt on white. Tags: shirt, linen, blue.",
  "error": null,
  "started_at": "2026-10-13T09:00:00Z",
  "ended_at": "2026-10-13T09:00:09Z",
  "token_usage": {
    "input_tokens": 2140,
    "output_tokens": 72,
    "thinking_tokens": 0,
    "cached_input_tokens": 0,
    "total_tokens": 2212
  }
}

AWS S3 FAQ

Add an S3 connector to the agent with a Connection that holds your AWS keys and region. Then send the bucket's event notifications to the connector URL through an SNS subscription or an EventBridge rule. Every matching upload starts a run with the object's details. The S3 docs list the AWS CLI commands for both routes.

Metadata by default. With Include Content, connic downloads each object up to the Max File Size of 1 to 10 MiB and passes it to the model with the event. Text and JSON arrive as UTF-8 text, other formats as base64. For larger files, the agent can fetch the object itself with the bucket and key.

No. The bucket's notifications go through SNS or EventBridge straight to the connector URL, and your agent does the processing.

The run ID is derived from the event, so a repeated delivery to the same agent reuses the run that already exists. That makes retries after a 503 safe.

Only s3:GetObject on the bucket, and only with Include Content. Without it, the connector works from the notification alone and never reads from your bucket.