---
agent:
  instructions: "Use this search API to find relevant content across this site with keywords or natural-language queries, instead of crawling individual pages. Results are returned in Markdown."
  endpoint: "https://mixpeek.com/.well-known/search?q={query}"
  method: GET
  documentation: "https://mixpeek.com/llms.txt"
---

Infrastructure

8 min read

Updated 2026-11-10

# How Do I Make Files Searchable as Soon as They Land in S3? Events, Polling and the Gaps Between

Use S3 event notifications (SQS, Lambda or EventBridge) for freshness and a scheduled listing as a backstop, since events arrive at least once and sometimes a minute late. Covers duplicate and missed events, uploads skipped during a running job, listing cost per 1,000 keys, metadata and presigned URLs.

![Ethan Steininger](/people/ethan.webp)

By [Ethan Steininger](/blog/authors/ethan), Founder & CEO, Mixpeek

S3

Object Storage

Ingestion

EventBridge

Indexing

Infrastructure

[Run this on your own data. Try it as you read.Search your own archive →](https://studio.mixpeek.com/namespaces/create?mode=managed&utm_source=homepage&utm_medium=guide_cta&utm_campaign=mvs_onramp)

[One-click templatesStart from a templateEach template deploys a working search app on your own files.Browse templates](/templates)

## How do I make files searchable as soon as they land in S3?

  
  
Have S3 tell your indexer when an object is created, through an event notification to SQS, Lambda or EventBridge, and keep a slower scheduled listing of the bucket as a backstop. S3 delivers events at least once, usually within seconds but sometimes a minute or more later, so the indexer has to drop duplicates and catch what the events miss. Search freshness is then the event delay plus the time to fetch, embed and index the file, and for video the processing time dominates.  
  

## What are the ways to detect new files in an S3 bucket?

  
  
There are four, and most production setups combine two of them.  
  

Approach

How a new upload is found

Typical delay

What you run

Main risk

Scheduled listing (polling)

LIST the prefix on a timer and compare LastModified with the last pass

Up to one interval

A scheduler

Large prefixes make each pass slow and add request charges

Event notification to SQS

S3 puts a message on a queue, a worker reads it

Seconds

A queue and a worker

Duplicate or late events

Event notification to Lambda

S3 invokes a function per event

Seconds

A function

One invocation per upload gets costly at high volume

EventBridge rule

S3 sends events to EventBridge, a rule filters by prefix or suffix and calls a target, such as an HTTPS API destination

Seconds

A rule and a target

A target that answers success but did nothing loses the event

  
  
S3 supports SNS, SQS, Lambda and EventBridge as notification destinations ([AWS docs](https://docs.aws.amazon.com/AmazonS3/latest/userguide/EventNotifications.html)). EventBridge adds content filtering and lets one bucket feed several consumers without changing the bucket's notification configuration ([Using EventBridge](https://docs.aws.amazon.com/AmazonS3/latest/userguide/EventBridge.html)).  
  

## Can I rely on S3 events alone?

  
  
No. AWS states that S3 event notifications "are designed to be delivered at least once" and are "typically delivered in seconds but can sometimes take a minute or longer" ([AWS docs](https://docs.aws.amazon.com/AmazonS3/latest/userguide/EventNotifications.html)). That gives three rules for the consumer:  
  
1\. **Make processing idempotent.** Key each file on bucket, key and version id (or ETag), so a second delivery of the same event is a no-op. 2. **Expect late events.** An event can arrive after the file was overwritten again, so read the object's current state instead of trusting the event body. 3. **Reconcile on a schedule.** A periodic listing finds anything the events missed, including uploads made while the consumer was down. It can run every few minutes or hourly, since it only catches stragglers.  
  
S3 has had strong read-after-write consistency for PUT and LIST on all objects ([Amazon S3 consistency](https://aws.amazon.com/s3/consistency/)), so a listing taken after an upload completes includes it.  
  

## Why does an upload get skipped while an indexing job is running?

  
  
Because the event arrived during a run that had already listed past the new key, and the trigger was dropped as a duplicate run. This is the most common gap in event-driven indexing. A typical indexer holds a lock so only one run per bucket happens at a time. If a second trigger arrives during a run and is answered "already running", the new file waits for the next scheduled pass.  
  
EventBridge makes this worse in one specific way: it retries a target only on retriable errors, by default for up to 24 hours and 185 attempts ([retry policy](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-rule-retry-policy.html)). A target that answers 200 "skipped" has accepted the event, so nothing retries it.  
  
The fix is to coalesce triggers: when a trigger arrives during a run, set a pending flag, and when the run releases its lock, start one more incremental run if the flag is set. Any number of events during one run then cost exactly one follow-up run, and none is lost. Configure a dead-letter queue on the EventBridge target as well, so events that exhaust their retries are kept.  
  

## How long does an incremental listing take?

  
  
It grows with the number of keys under the prefix, because S3 returns at most 1,000 keys per LIST page and the indexer has to page through all of them to compare timestamps. In our measurements through Mixpeek's S3 sync, an incremental listing cost about 0.2 seconds per 1,000 keys: 36 to 42 seconds on a prefix of 200,000 keys. So an event that triggers a full-prefix listing stays fast up to a prefix of about 20,000 keys. Past that, split the bucket into prefixes, or process the event's own key directly.  
  
LIST requests are billed at the PUT, COPY and POST rate, which is higher than the GET rate ([S3 pricing](https://aws.amazon.com/s3/pricing/)), so a short polling interval over a large prefix also adds up on the AWS bill.  
  

## How do I carry metadata with the file?

  
  
Pick the source by how big the metadata is and whether it changes after upload.  
  

Source

Limit

Can change after upload

Notes

User metadata (x-amz-meta-\* headers)

2 KB per object ([AWS docs](https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingMetadata.html))

Only by copying the object onto itself

Read with one HeadObject; the copy changes LastModified, so a poll notices it

Object tags

10 per object ([AWS docs](https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-tagging.html))

Yes, in place

Read with GetObjectTagging; a tag edit leaves LastModified unchanged, so only a tagging event reveals it

S3 annotations

1 MB of UTF-8 text per annotation ([AWS docs](https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingMetadata.html))

Yes, without changing the object

A newer S3 feature for rich payloads such as AI-generated labels; check that your indexer reads them before you rely on it

The indexing API request body

Set by the API

Yes

Your code sends the fields when it registers the file

A sidecar JSON file

None

Yes

The file and its sidecar can arrive in either order, so pairing has to wait for both

  
  

## Can I index a private S3 object from a presigned URL?

  
  
Yes, if the indexer fetches it with the method the URL was signed for. A presigned URL is signed for one HTTP method, so a presigned GET URL answers a HEAD request with 403. An indexer that validates URLs with HEAD will reject every presigned GET URL unless it falls back to a ranged GET of the first byte, which the GET signature allows. Give the URL an expiry long enough to cover the time until the file is fetched, which for a queued backlog can be longer than you expect.  
  

## How Mixpeek does this

  
  
[Mixpeek](https://mixpeek.com) is a multimodal data warehouse: it indexes video, images, audio and documents where they already live in object storage and makes them searchable through retrievers. Three of the patterns above are available for S3:  
  
*   **Polling sync.** A [sync](https://mixpeek.com/docs/platform/syncs) lists your bucket or prefix with a read-only IAM role every polling\_interval\_seconds (minimum 30, default 300) and processes new and changed objects. A sync can map user metadata and, since November 2026, [object tags](https://mixpeek.com/docs/integrations/object-storage/s3#object-tags) into document fields.
*   **EventBridge to the sync trigger.** Point an EventBridge rule's API destination at POST /v1/buckets/{bucket\_id}/syncs/{sync\_config\_id}/trigger?queue\_follow\_up=true. A trigger during a run queues one follow-up incremental run instead of being skipped, which is the coalescing described above, and the polling schedule stays on as the backstop. [Run the sync on every upload](https://mixpeek.com/docs/integrations/object-storage/s3#run-the-sync-on-every-upload) has the rule and target setup.
*   **Push through the API.** Your Lambda or service creates an object with a presigned GET URL and auto\_process=true, and processing starts within seconds.
  
  
[S3 ingest patterns](https://mixpeek.com/docs/integrations/object-storage/s3-ingest-patterns) in the docs compares them, and [AWS S3](https://mixpeek.com/docs/integrations/object-storage/s3) covers the IAM role. Once files are indexed, the [vector store runs on the same object storage](https://mixpeek.com/mvs) ([pricing](https://mixpeek.com/pricing)).  
  

## Frequently Asked Questions

  
  

### How do I trigger indexing when a file is uploaded to S3?

  
  
Send S3 event notifications for object-created events to SQS, Lambda or EventBridge, and have the consumer register or process the file. Because events are delivered at least once and can arrive a minute or more late, make the processing idempotent on bucket, key and version, and keep a scheduled listing of the bucket to catch missed events.  
  

### Are S3 event notifications guaranteed to arrive?

  
  
They are designed to be delivered at least once, so you can get duplicates, and AWS says they usually arrive in seconds but sometimes take a minute or longer. Pair them with a periodic listing of the bucket as a backstop, and configure a dead-letter queue on EventBridge targets for events that exhaust their retries.  
  

### Should I poll S3 or use events?

  
  
Use both. Polling alone is simplest and works when a delay of one interval is fine; a 30 to 60 second interval suits many search use cases. Events cut the delay to seconds, and they need idempotent processing and a reconciliation pass behind them.  
  

### Why did my file upload not get indexed?

  
  
The most common cause is an event that arrived while an indexing run was already in progress and was dropped as a duplicate run. Coalesce triggers into one follow-up run instead. Other causes are a prefix or suffix filter that did not match the key, a missing s3:GetObject or s3:GetObjectTagging permission, and a presigned URL that expired before the indexer fetched it.  
  

### How fast can a video in S3 become searchable?

  
  
Detection takes seconds with events, or up to one interval with polling. After that the file has to be downloaded, split into scenes or frames, embedded and indexed, which for a long video takes longer than detection, so measure end-to-end time on your own files.

## Run this on your own data

Point Mixpeek at the storage you already have and search your video, images, audio, and documents the way this guide describes. Build starts at $25/mo for up to 1M vectors.

[Search your own archive](https://studio.mixpeek.com/namespaces/create?mode=managed&utm_source=homepage&utm_medium=guide_cta&utm_campaign=mvs_onramp)[Read Docs](/docs)

[Explore MVS](/mvs)[See pricing](/pricing)

## Related guides

[

Infrastructure

### Why Is the First Vector Search Query on S3 Slow? Cold, Warm and Cached Latency, Measured

The first vector search query on S3 or GCS is slow because the index must be fetched from the bucket before anything can be ranked. Measured on Mixpeek's vector store: a cold query at 1M x 768 had a p50 of 0.697 s, a whole-partition layout read 391 MB where a range-read layout read 3.1 MB, and cached queries ran at a p50 of about 50 ms. What drives cold latency, why recall drops on large indexes, and how to make the first query faster.

Read guide →](/guides/why-first-vector-search-query-on-s3-is-slow)[

Infrastructure

### Write-Ahead Logs on Object Storage: How S3 Becomes a Database's Durability Layer

A write-ahead log acknowledges a write the moment it is durable, before any index work happens. Move that log onto S3 or GCS and the bucket becomes the durability layer: recovery, read replicas and change feeds all become readers of one chain of sequenced objects. Covers what a WAL is, why object storage changes the design, the two coordination problems it creates (writer fencing and garbage collection that could delete the only copy of a write), how conditional writes solve them, and the shipped write path in Mixpeek MVS.

Read guide →](/guides/write-ahead-log-object-storage)[

Infrastructure

### Can You Run a Vector Database on S3? Object-Storage-Backed Vector Search, Explained

Object-storage-backed vector search became mainstream in 2026: S3 Vectors went GA, turbopuffer and LanceDB proved the architecture, and costs dropped ~10x versus RAM-resident clusters. How it actually works (immutable segments, coarse partitioning, quantization plus rescoring, cache tiers) when it is the wrong choice, and what bring-your-own-bucket adds.

Read guide →](/guides/vector-database-on-s3-object-storage)