Instrument Ingestion Patterns: Poller, DataSync, or S3 Events

Table of Contents

Three instruments, three capabilities. One writes finished runs to a Windows share. One can call the S3 API directly. One ships files over SFTP to wherever you point it. The team forced all three through one custom poller—and spent a year paying for it in special cases.

This post extends the idempotent poller post into a decision framework: which ingestion pattern fits which instrument, and which parts you need regardless of pattern. The goal is a decision table you can hand to a teammate before the next instrument onboards.

The three patterns at a glance

Custom pollerAWS DataSyncDirect PUT + S3 Events
Instrument capability neededWrites to a share/directoryWrites to NFS/SMB/HDFS/object storeSpeaks S3 SDK (or gateway in front)
“File is done” definitionYours, in codeFile-stability heuristics onlyProducer declares it (it’s writing)
State/quarantine controlFull (your state machine)Limited—retries and filters, little domain logicNone at ingest; all downstream
Ops burdenYou own the agentManaged agent, task schedulingLeast—until validation fails
Bulk/backfill fitSlow without workExcellent (parallel, bandwidth-limited)Depends on producer
Cost shapeAgent host + your timePer-GB-moved + agent hoursS3 requests + event fan-out

When the custom poller wins

  • The source has a real done definition (LIMS flags, sidecar files, settle windows) that heuristics can’t see.
  • You need per-file state, quarantine with reasons, and replay semantics.
  • Instrument diversity is low and long-lived; the state machine is worth building once.

The poller is the most work and the most control. If your validation rules are domain-heavy, this is home.

When DataSync wins

  • Bulk migration or periodic sync from file shares; terabytes, not tricky semantics.
  • Bandwidth control matters (throttle against lab business hours).
  • The producer can’t change but the share is stable.

What DataSync gives you: scheduled/incremental tasks, in-transfer verification, metadata preservation, a managed agent. What it does not give you: run-completeness. A DataSync task ending successfully says “bytes moved,” not “run R is verified.” You still need manifests, markers, and checksum gates on top—DataSync replaces transport, not the contract.

When direct PUT + S3 Events wins

  • The instrument or its control software can call S3 with scoped credentials (IAM Roles Anywhere for on-prem identity—no long-lived keys in config files).
  • You want event-driven validation: EventBridge/SQS on object creation kicks the validator immediately.

The trap: event-per-object tempts you into treating each object as complete. Don’t—per-object events still roll up into per-run manifests and markers, or you rebuild the partial-run bug the hard way.

Honorable mentions

  • AWS Transfer Family (SFTP): vendor instruments that only ship SFTP get a managed endpoint landing into S3—then treat it as direct PUT (events + validation on top).
  • Storage Gateway: when something genuinely needs POSIX-ish file semantics on premises; keep it out of the critical data path if you can.

The decision table

SituationStart with
Legacy instrument, shared folder, fuzzy “done”Poller (or DataSync + poller for backfill)
Modern instrument, SDK-capable vendorDirect PUT + events
SFTP-only vendor softwareTransfer Family + events
One-time or periodic bulk movesDataSync
High-stakes validation rules on every filePoller regardless of transport

Regardless of pattern, you still need

  1. Immutable keys and source checksums—no pattern exempts you from transfer integrity.
  2. Per-run manifests and completion markers—transport success ≠ run readiness.
  3. Quarantine and replay—a pattern that can’t quarantine can’t be trusted with poison files.
  4. One correlation id—run_id from producer to consumer, whichever pipe it rode.

If you only do one thing: choose the pattern per instrument capability, not once for the lab—and keep the validation contract identical behind every pipe, so switching transports later is an implementation detail, not a re-architecture.

Next: whether your raw instrument zone should become Iceberg with S3 Tables.

Previous: The ALCOA+ field guide for platform engineers.

Share :

Related Posts

Moving Instrument Data to S3 Reliably

The object existed in S3. Size looked right. Downstream parsing failed because the transfer cut off mid-write and a later retry never ran—or ran into a different key. Metrics said “uploaded.” Science said “garbage.”

Read More

Observing and Debugging Hybrid Data Transfers

Slack said “files aren’t in S3.” The agent host said “fine.” CloudWatch had three log groups and no shared id. Twenty minutes later someone found the run under a different instrument prefix—and a completion marker that never wrote.

Read More

IAM and KMS Across the Hybrid Lab–Cloud Boundary

Transfer logs said AccessDenied. The bucket policy “allowed S3.” Someone added s3:* on the role and it still failed—because the objects used SSE-KMS and the key policy never trusted the transfer identity.

Read More