AWS DataSync: Moving Petabytes Without Moving Mountains
An advanced, engine-level look at how AWS DataSync actually moves data between storage systems — parallelized transfer, delta detection, agent architecture, and the operational guardrails that let terabytes migrate safely without babysitting a script.
Picture a moving company tasked with relocating an entire library — millions of books — from one building to another, across town, without losing a single volume, without duplicating any, and without shutting the library down while the move happens. A naive approach would be one person carrying one book at a time. A professional moving crew instead splits the library into sections, assigns multiple trucks running in parallel, keeps a manifest to verify nothing is missing on arrival, and on the second trip only moves the books that actually changed since the first trip. AWS DataSync is that professional moving crew for data. It doesn’t just copy files — it parallelizes the transfer across many concurrent streams, intelligently detects exactly what has changed since the last run, verifies every byte arrived intact, and does all of this whether the data sits in an on-premises NAS, another cloud, or one AWS storage service to another. This tutorial goes past the basics of pointing a source at a destination. It goes inside the transfer engine itself: how the agent architecture actually works, how DataSync decides what to re-transfer on an incremental run, how to size a deployment for genuine multi-gigabit throughput, and how expert teams design DataSync tasks that survive years of recurring migrations and replication without becoming a source of silent data loss.
1Advanced Core Concepts
These are the building blocks that separate a DataSync novice from a DataSync architect. Each one exists to solve a specific problem that only shows up once real data volumes and real network constraints enter the picture.
Locations: Endpoints With Their Own Protocol Semantics
A Location is a registered source or destination — NFS, SMB, an on-premises object store, Amazon S3, Amazon EFS, Amazon FSx (for Windows, Lustre, OpenZFS, or NetApp ONTAP), HDFS, or another cloud provider’s object storage. Each Location type carries its own protocol-specific configuration, and critically, DataSync preserves file metadata — permissions, ownership, timestamps — in ways specific to what the source and destination protocols actually support, which is why a transfer between two NFS locations preserves POSIX permissions faithfully in a way a transfer into S3, which has no native concept of a Unix UID, fundamentally cannot.
Tasks and Task Executions
A Task is the reusable definition binding one source Location to one destination Location, along with the options that govern how the transfer behaves — filters, bandwidth limits, verification mode, and what to do with files that exist at the destination but not the source. Every time a Task actually runs, it produces a Task Execution, an individual, independently-tracked record of that specific run’s progress, bytes transferred, files transferred, and final status. A single Task definition is typically executed many times over its lifetime — once for an initial full migration, and repeatedly afterward for incremental synchronization or scheduled replication.
A Task is like a standing shipping route between two ports, with fixed rules about what cargo is allowed and how it’s inspected. A Task Execution is one specific voyage along that route — the same route can be sailed hundreds of times, and each voyage has its own manifest, its own delays, and its own outcome.
Agents: The Bridge Into Non-AWS Environments
When a Location lives outside of AWS’s own managed network — an on-premises NFS share, a self-managed SMB server — DataSync needs an Agent, a virtual machine deployed inside that environment (as a VMware, Hyper-V, or KVM image, or as an EC2 instance for cloud-to-cloud transfers) that DataSync’s managed service directs to actually read and write data locally. The agent does the heavy lifting of talking the source protocol; the managed DataSync service orchestrates, tracks, and reports on the transfer.
Location
A registered source or destination with protocol-specific configuration and metadata semantics.
Task
The reusable configuration binding a source and destination Location together with transfer rules.
Task Execution
One individual run of a Task, with its own independently tracked progress and outcome.
Agent
A deployed VM or EC2 instance that gives DataSync’s managed service read/write access into a non-AWS-native environment.
Enhanced Mode
An agentless mode for object-storage-to-object-storage transfers (like S3-to-S3) that scales transfer workers automatically without any deployed VM.
Filters
Include and exclude patterns that scope precisely which files and folders within a location actually participate in a given transfer.
Enhanced Mode: When the Agent Disappears Entirely
For transfers between object storage systems — S3 to S3, S3 to a compatible on-premises or third-party object store reachable over the network — DataSync offers an Enhanced Mode Task that requires no deployed agent at all. Instead, AWS automatically provisions and scales the transfer workers needed behind the scenes, which removes an entire category of operational overhead (agent sizing, agent patching, agent availability) for the specific workloads where object storage is on both ends.
Location Metadata Preservation in Practice
Different location pairs preserve different subsets of metadata, and understanding this ahead of a migration prevents an unpleasant surprise after the fact. An NFS-to-NFS transfer can preserve full POSIX ownership, permission bits, and extended attributes. An SMB-to-SMB transfer preserves Windows ACLs and security descriptors. A transfer into S3 maps whatever metadata it can into S3 object metadata and tags, but has no way to represent a native filesystem ACL, since S3 simply has no equivalent concept. Advanced teams treat “what metadata survives this specific location pairing” as a question to answer explicitly during design, not an assumption to carry over from a different pairing they’ve used before.
Object Tags and Storage Class Selection at Transfer Time
When the destination is S3, a Task can be configured to apply specific object tags and even select a target storage class as part of the transfer itself, rather than requiring a separate lifecycle policy or manual reclassification step after the data has already landed in the default storage class. This is a small detail with real cost implications for archival migrations, since it avoids paying for a more expensive storage tier even temporarily during the gap between transfer and a later lifecycle transition.
2Internal Working of the Transfer Engine
DataSync’s core value isn’t the ability to copy files — plenty of tools can do that. It’s the engineering underneath that makes a multi-terabyte, recurring transfer fast, verifiable, and genuinely incremental.
Enumeration: Building the Work List Before Moving a Single Byte
Before transferring anything, DataSync enumerates the source location — walking the directory tree or object listing to build a complete inventory of what exists, including metadata like size and last-modified timestamp. This enumeration phase is itself parallelized, and its output is what every subsequent decision depends on: it’s the “manifest” the entire move is planned against.
Change Detection: Why Incremental Runs Are Fast
On any run after the first, DataSync compares the freshly enumerated source metadata against what it recorded from the destination during the prior run, and transfers only files that are new, whose size has changed, or whose modification timestamp is newer — never re-reading and re-writing unchanged files. This metadata-based delta detection is precisely what lets a recurring synchronization task on a mostly-static dataset complete in minutes rather than repeating a full, multi-hour transfer every single time it runs.
graph TD
A[Task Execution Starts] --> B[Enumerate Source Location]
B --> C[Enumerate Destination Location]
C --> D{Compare Metadata:
Size & Modified Time}
D -->|Changed or New| E[Queue for Parallel Transfer]
D -->|Unchanged| F[Skip — No Transfer Needed]
E --> G[Multiple Parallel Transfer Threads]
G --> H[Write to Destination]
H --> I[Verify Integrity]
I --> J[Task Execution Report]
Parallelization: Many Streams, Not One
Rather than transferring files sequentially one at a time, DataSync opens many concurrent transfer streams simultaneously — both across multiple files and, for very large individual files, by splitting a single file into multiple parallel chunks. This is the single biggest reason DataSync dramatically outperforms a naive single-threaded copy tool over the same network link: it saturates available bandwidth using concurrency rather than being limited by the latency of one connection waiting on one file at a time.
Integrity Verification as Part of the Engine, Not an Afterthought
After data is written to the destination, DataSync performs a verification pass, comparing checksums (or, depending on the configured verification mode, metadata) between source and destination to confirm the transfer was byte-accurate. This verification is built into the core execution flow of every task, not a separate manual step an operator has to remember to run afterward.
The Role of the Managed Control Plane
Even when an Agent is doing the actual reading and writing of data at the source, the DataSync managed service itself acts as the control plane — deciding what to transfer based on the enumeration comparison, coordinating parallel transfer streams, tracking progress, and ultimately producing the Task Execution’s status and report. This split between a managed control plane and a locally-deployed data plane is precisely what lets DataSync offer consistent scheduling, monitoring, and reporting behavior across wildly different underlying source environments, from an on-premises NFS share to a completely different cloud provider’s object storage.
Why Re-Runs Are Safe by Design
Because every Task Execution re-enumerates and re-compares rather than assuming a prior execution’s plan is still accurate, simply re-running a Task after a partial failure is a safe, idempotent operation — DataSync will naturally pick up exactly where the previous run left off, re-attempting only what’s still missing or changed, rather than requiring an operator to manually figure out which files failed and craft a targeted re-transfer.
3Data Flow & Task Execution Lifecycle
A Task Execution moves through a well-defined sequence of phases, and understanding exactly where an execution sits in that sequence is what makes a stalled or slow transfer diagnosable rather than mysterious.
Location and Agent Registration
Source and destination Locations are registered, with an Agent deployed and activated for any location that requires one.
Task Creation
A Task binds the two Locations together with filters, bandwidth limits, a schedule (if recurring), and options like what to do with files present at the destination but not the source.
Preparing (Enumeration)
The Task Execution begins in a Preparing state, enumerating both source and destination to build the transfer plan.
Transferring
Files identified as new or changed are copied in parallel from source to destination, respecting any configured bandwidth throttle.
Verifying
Transferred data is checked against the source according to the configured verification mode, catching any corruption or incomplete write.
Success or Error, With a Task Report
The execution settles into Success or Error, and an optional detailed Task Report — a CSV-style breakdown of exactly what transferred, skipped, or failed — becomes available.
What Happens to Files Deleted at the Source
By default, a file removed from the source since the last run is left untouched at the destination — DataSync’s default behavior only adds and updates, it does not delete. A Task can optionally be configured to also remove destination files that no longer exist at the source, turning it into a true mirror rather than an additive synchronization — a distinction that matters enormously for backup-style workloads, where accidental destination deletion could be catastrophic, versus true-mirror replication workloads, where it’s exactly the desired behavior.
Scheduling and Recurring Execution
A Task can carry a recurring schedule, expressed as a standard cron-style expression, which automatically triggers new Task Executions at the configured interval without any external orchestration needed — turning a one-time migration tool into an ongoing, hands-off replication or backup pipeline running entirely within DataSync itself.
Concurrent Executions and Queuing Behavior
A given Task does not run multiple overlapping executions simultaneously against itself — if a scheduled execution is triggered while a previous execution of the same Task is still running, DataSync queues the new one rather than starting it in parallel, avoiding the inconsistent state that two simultaneous passes over the same comparison logic could otherwise produce. This matters directly for schedule design: a recurring interval set tighter than the Task typically takes to complete simply results in executions backing up in a queue rather than actually running more frequently.
4Advantages, Disadvantages & Trade-offs
DataSync solves a specific, narrow problem extremely well. Knowing exactly where that problem boundary sits is what prevents reaching for it when a different tool would actually fit better.
Advantages
- Parallelized transfer dramatically outperforms naive single-threaded copy tools (rsync, scp) over the same network link.
- Built-in metadata-based delta detection makes recurring incremental runs fast without any custom scripting.
- Native, protocol-aware metadata preservation (permissions, ownership, timestamps) where the source and destination both support it.
- Built-in integrity verification is part of the core engine, not a bolt-on step someone has to remember to run.
- Broad location support spans on-premises NFS/SMB, object storage, HDFS, and virtually every major AWS storage service.
- Enhanced Mode removes agent management entirely for object-storage-to-object-storage transfers.
Disadvantages / Trade-offs
- Very large counts of very small files transfer far less efficiently than a smaller number of large files, since per-file overhead dominates.
- Agent-based locations require deploying, sizing, and maintaining a VM or EC2 instance, adding real operational overhead compared to a fully managed, agentless service.
- Not designed for continuous, sub-second real-time replication — it’s a scheduled or on-demand batch transfer tool, not a streaming replication system.
- Cross-account or cross-region setups introduce networking complexity (VPC endpoints, security groups, firewall rules) that takes real planning to get right.
- Cost scales with data volume transferred, which for very large, frequently-changing datasets can accumulate meaningfully over time.
For a one-time, modest-sized migration, the simplicity of pointing DataSync at a source and destination usually outweighs any setup overhead. For an ongoing, multi-petabyte, constantly-changing dataset, the agent sizing and network planning genuinely matter and deserve dedicated design time before the first production run.
It’s also worth comparing DataSync against the alternative of writing a custom transfer script using standard tools like rsync. A hand-rolled script can technically move the same data, but it typically lacks parallelization sophisticated enough to saturate a high-bandwidth link, has no built-in integrity verification beyond what the underlying tool itself provides, and produces no structured, auditable execution history without significant additional engineering. The trade-off is rarely “can this be done another way” — it almost always can — but rather “how much custom engineering and ongoing maintenance is the team willing to take on to replicate what DataSync already provides out of the box.”
5Performance & Scalability
DataSync’s throughput ceiling is determined by a combination of agent sizing, network bandwidth, and — perhaps most underappreciated — the shape of the dataset itself.
Agent Sizing Directly Bounds Throughput
An Agent’s allocated CPU, memory, and network capacity set a hard ceiling on how much data it can push through concurrently, independent of how much bandwidth the underlying network link could otherwise support. Under-provisioning an agent’s host resources is one of the most common causes of a transfer that runs far below the available network bandwidth, and right-sizing the agent’s virtual hardware is a genuine, deliberate capacity-planning exercise rather than an afterthought.
The Small-Files Problem
DataSync’s parallelization shines with large files, where the per-file overhead of enumeration and verification is a small fraction of total transfer time. A dataset composed of millions of very small files inverts this: enumeration time and per-file transfer overhead can dominate total execution time, sometimes making an otherwise modest total data volume take far longer than a raw bandwidth calculation would suggest. Advanced teams profile a representative sample of their actual dataset’s file-size distribution before committing to a migration timeline, specifically because this factor is so easy to underestimate.
Multiple Agents for Higher Aggregate Throughput
A single Task can be associated with multiple Agents deployed against the same source environment, letting DataSync distribute the transfer workload across them for higher aggregate throughput than any single agent could achieve alone — the standard scaling lever once one agent’s ceiling is reached.
Bandwidth Throttling as a Deliberate Constraint
A Task can be configured with an explicit bandwidth limit, intentionally capping how much of the available network capacity DataSync consumes — critical in environments where the same network link also carries production traffic, and an unthrottled transfer running at full speed would otherwise degrade application performance during business hours.
Scaling Enhanced Mode Transfers
Because Enhanced Mode has no agent to size, its scaling characteristics differ fundamentally from agent-based transfers — throughput scales automatically with the number and size of objects being moved, managed entirely by AWS behind the scenes. This removes the agent-sizing capacity-planning exercise altogether for object-storage-to-object-storage workloads, though the underlying object count and size distribution still shapes total transfer time in much the same way it does for agent-based transfers.
Network Path Quality as a Hidden Ceiling
Raw advertised bandwidth between two sites rarely reflects sustained real-world throughput once latency, packet loss, and shared usage with other traffic are accounted for. Advanced teams measure actual sustained throughput along the real network path an Agent will use — not just the link’s rated capacity — since a high-latency or lossy path can bottleneck a transfer well below what either the agent’s hardware or the network’s theoretical bandwidth would otherwise support.
Enumeration Cost at Very Large File Counts
Separate from transfer throughput, the enumeration phase itself has its own scaling characteristics — walking tens of millions of files takes real, measurable time even before a single byte is transferred. For datasets at this scale, splitting a single enormous location into several narrower, filter-scoped Tasks that can run in parallel against different subsets of the same source is a common technique to reduce the wall-clock time of the enumeration phase, in addition to whatever it does for transfer parallelism.
6High Availability & Reliability
A migration or replication tool that silently loses data or silently stalls is worse than no tool at all — DataSync’s reliability model is built specifically around making failures loud and recoverable rather than silent.
Automatic Retries on Transient Failures
Individual file transfer failures caused by transient network issues are automatically retried within a Task Execution without requiring operator intervention. A failure that persists past the automatic retry logic surfaces as a specific error against that specific file in the Task Execution’s results, rather than silently skipping it or failing the entire execution outright.
Verification Modes and What Each One Actually Guarantees
DataSync supports multiple verification modes with genuinely different guarantees: verifying only metadata that was transferred (fast, catches most transfer-level mistakes), verifying only files that were transferred during that specific execution (a balance of speed and thoroughness), or verifying the entire destination against the entire source regardless of what changed in that run (the slowest but most exhaustive option, useful for periodic full-integrity audits of a dataset that’s otherwise synchronized incrementally).
Agent High Availability
Because a single Agent is a single point of failure for any Task depending on it, deployments with strict reliability requirements run multiple Agents against the same source environment, both for the throughput benefit described in the previous chapter and for resilience — if one agent becomes unavailable mid-deployment window, a subsequent scheduled execution can still proceed using the remaining healthy agents.
Treating a single successful Task Execution as proof the entire dataset is now fully and correctly replicated is a mistake if verification was configured in its fastest, least exhaustive mode. Periodic full-verification runs are the only way to catch slow, cumulative drift between source and destination that a lighter verification mode wouldn’t detect.
Task Execution History as an Audit Trail
Every past Task Execution remains queryable, with its status, timing, and byte/file counts preserved — giving an operator a genuine historical record to answer “when did this last successfully run, and how much data moved” without needing separate external logging just to answer that basic operational question.
Handling Partial Failures Within a Single Execution
An execution that transfers the overwhelming majority of files successfully but fails on a small subset does not silently report overall success — the execution’s final status reflects the presence of those per-file failures, and the specific failed files remain identifiable in the results. This granularity is what allows an operator to distinguish “everything worked” from “almost everything worked, here specifically is what didn’t,” a distinction a coarser pass/fail signal would obscure entirely.
Cross-Region Resilience for the Control Plane Itself
Because Locations and Tasks are regional resources, disaster-recovery planning for the DataSync configuration itself — not just the data it moves — matters for organizations with strict resilience requirements. Defining Locations and Tasks as code, rather than only through manual console configuration, makes it straightforward to recreate an equivalent DataSync setup in a secondary region if needed, rather than depending on tribal knowledge of how the original configuration was built.
7Security
Moving large volumes of potentially sensitive data between environments demands the same security rigor as the storage systems on either end — DataSync provides the mechanisms, but applying them correctly is the operator’s responsibility.
Encryption in Transit by Default
Data transferred by DataSync is encrypted in transit using TLS between the Agent and the DataSync managed service, and between the managed service and AWS storage destinations, without requiring any additional configuration — encryption in transit is the default behavior, not an opt-in setting an operator might forget to enable.
VPC Endpoints for Private Network Paths
Rather than routing transfer traffic over the public internet, DataSync supports VPC (interface) endpoints, keeping traffic between an Agent and the DataSync service entirely within private AWS networking — critical for regulated workloads where data must never traverse the public internet, even in encrypted form, and a common requirement in healthcare and financial-services migrations specifically.
IAM Roles Scoped to Each Location
Locations that involve AWS storage services (S3, EFS, FSx) require an IAM role granting DataSync exactly the permissions needed to read from or write to that specific location — and, following the same least-privilege discipline as any other AWS service, that role should be scoped narrowly to the specific bucket, file system, or path the task actually needs, not broad account-wide storage access.
Agent Activation and Network Trust
Deploying an Agent requires an activation step that establishes a trust relationship between that specific agent instance and the DataSync managed service, using an activation key generated for that agent alone — this activation process is what prevents an unauthorized VM from posing as a legitimate agent and gaining access to a DataSync account’s configured locations and tasks.
Resource-Level Access Control for Tasks and Locations
Beyond the location-specific roles that govern what a Task can actually read or write, standard IAM policies control who within an organization is permitted to create, modify, or start execution of DataSync Tasks and Locations in the first place — a distinction worth making deliberately, since the ability to configure a Task and the ability to trigger it are two separate permissions that some organizations intentionally split between platform engineers and application teams.
Data Residency and Cross-Border Transfer Considerations
For organizations subject to data residency requirements, the combination of Location region selection and Task configuration is what actually determines where data physically lands and, transiently, where it passes through during transfer — a consideration that deserves explicit review for any migration involving data classified as subject to jurisdictional restrictions, since DataSync itself enforces no residency policy on your behalf beyond respecting the specific regions and locations configured.
TLS by Default
Encryption in transit between agent, service, and destination requires no extra configuration.
VPC Endpoints
Keeps transfer traffic entirely within private AWS networking, avoiding the public internet.
Scoped IAM Roles
Each AWS-storage Location’s role should be narrowly scoped to exactly the resource that specific location needs.
Agent Activation
A per-agent activation key establishes trust before an agent can act on behalf of the account.
8Monitoring, Logging & Metrics
Because DataSync transfers can involve enormous data volumes running unattended on a schedule, real observability is what turns “it probably worked” into “I can prove exactly what moved and when.”
CloudWatch Metrics for Live Progress
Each running Task Execution publishes CloudWatch metrics including bytes transferred, files transferred, and files verified, letting an operator watch a large transfer’s progress in real time and, more importantly, build automated CloudWatch Alarms — for example, alerting if a Task Execution’s transfer rate drops well below its historical baseline, often a sign of an agent resource constraint or a degraded network path.
Task Reports: A Detailed, File-Level Manifest
Beyond aggregate metrics, DataSync can generate a detailed Task Report — a structured, file-level breakdown of exactly what was transferred, skipped, deleted, or failed during a specific execution, written to an S3 bucket. This is the artifact compliance and audit teams typically want: proof, at the individual file level, of precisely what moved during a specific migration window.
Choosing Between Summary and Full Task Reports
A Task Report can be generated at a summary level, listing only aggregate counts by category, or at a full, per-file level of detail. The full report is considerably larger and takes measurably longer to generate for very large datasets, so teams typically reserve it for compliance-critical transfers or periodic full-verification runs, while relying on the lighter summary report and CloudWatch metrics for routine, frequent incremental executions where that level of per-file detail adds cost without adding much practical value.
CloudTrail for Configuration and API Auditing
Every DataSync API call — creating a Task, starting an execution, modifying a Location — is captured by CloudTrail, giving a complete record of who configured or triggered a transfer, separate from the Task Report’s record of what data actually moved as a result.
EventBridge for Automated Reaction to Execution Status
DataSync emits Task Execution status-change events to EventBridge, which lets teams build automated downstream reactions — triggering a Lambda function to kick off a validation job the moment a migration Task Execution reports Success, or paging an on-call engineer the moment a scheduled replication run reports Error.
| Signal | Source | Best For |
|---|---|---|
| CloudWatch Metrics | Live Task Execution | Real-time progress and rate-based alerting |
| Task Report | S3 (generated per execution) | File-level audit and compliance evidence |
| CloudTrail | DataSync API Calls | Who configured or triggered a transfer |
| EventBridge | Task Execution Events | Automated downstream reactions to success or failure |
9Deployment & Cloud Architecture Patterns
DataSync serves a handful of distinct architectural patterns, and recognizing which one a given use case falls into shapes almost every downstream configuration decision.
One-Time Bulk Migration
The most common pattern: an initial full transfer moving an entire on-premises dataset into AWS storage once, typically followed by a small number of incremental “catch-up” runs closer to the actual cutover date to transfer only what changed since the bulk transfer, minimizing the final downtime window needed to complete the migration.
Ongoing Hybrid Synchronization
A recurring, scheduled Task keeps an AWS copy of an on-premises dataset continuously up to date — common for hybrid architectures where on-premises applications keep writing to local storage while cloud-based analytics or backup systems consume a synchronized copy in AWS, with DataSync as the standing bridge between the two.
Cross-Region and Cross-Account Replication for Disaster Recovery
A scheduled Task replicating from a primary region’s storage to a secondary region’s storage implements storage-level disaster recovery, keeping a secondary copy warm and current without needing a custom-built replication pipeline — commonly paired with cross-account Locations so the DR copy lives in a genuinely separate AWS account, isolating it from a compromise or misconfiguration in the primary account.
graph LR
OnPrem[On-Premises NFS/SMB] -->|Agent| DS[DataSync Managed Service]
DS --> S3[Amazon S3]
DS --> EFS[Amazon EFS]
DS --> FSx[Amazon FSx]
S3 -->|Enhanced Mode
No Agent| S3DR[S3 in DR Region]
Cloud-to-Cloud Migration
For migrating data from another cloud provider’s object storage directly into S3, an Agent deployed as an EC2 instance (or Enhanced Mode, where both endpoints are compatible object storage) lets DataSync perform the transfer without routing data through an intermediate on-premises hop, which is both faster and architecturally simpler than staging the data anywhere in between.
Integration With AWS Storage Gateway
Organizations already running Storage Gateway for on-premises access to cloud storage sometimes layer DataSync alongside it specifically for the bulk, scheduled transfer role — Storage Gateway optimizes for ongoing low-latency access to cloud-backed storage from on-premises applications, while DataSync optimizes for efficient, high-throughput bulk movement, and the two are frequently deployed together rather than as competing choices.
Feeding Downstream Analytics and Data Lake Pipelines
A recurring DataSync Task landing new data into an S3-based data lake is a common pattern for organizations bridging on-premises data generation with cloud-based analytics — the scheduled synchronization becomes, in effect, the ingestion layer for a downstream pipeline, with EventBridge execution-completion events often used to trigger the next stage of processing automatically once a given batch of new data has finished arriving.
10Design Patterns & Anti-patterns
The difference between a DataSync deployment that runs quietly for years and one that becomes a recurring operational headache almost always comes down to decisions made before the first production execution.
Pattern: Filter Narrowly, Task per Dataset
Rather than one enormous Task covering an entire file server with a complex web of include/exclude filters, experienced teams create separate, narrowly-scoped Tasks per logical dataset — one for a specific application’s data directory, another for a separate department’s archive. This keeps each Task’s filter configuration simple and auditable, and lets different datasets run on independent schedules and bandwidth limits suited to their own criticality.
Pattern: Staged Cutover for Large Migrations
Large migrations are rarely done as a single execution. The standard staged pattern runs an initial full transfer well ahead of the cutover date, then a series of incremental catch-up runs closer to cutover, with the final, shortest possible incremental run happening during an actual maintenance window — minimizing real downtime to the time needed for just the last few changes, not the entire dataset.
Problem
Configuring a Task to delete destination files not present at the source, without fully understanding that this behavior is opt-in and genuinely destructive, on a Task that is meant to function as a backup.
Why It’s Harmful
A backup destination that mirrors deletions is not really a backup at all — a source-side accidental deletion or ransomware event propagates straight through to the destination on the very next scheduled run, destroying the recovery copy along with the original.
Correct Approach
Leave destination deletion disabled for backup-oriented tasks, relying on the destination storage’s own versioning or retention features instead; reserve destination-deletion mode strictly for genuine mirror/replication use cases where that behavior is intentional.
Problem
Deploying a single, under-sized Agent to handle an entire organization’s multi-petabyte migration without any capacity planning against the dataset’s actual file-size distribution.
Why It’s Harmful
Migration timelines built on theoretical network bandwidth alone, ignoring agent resource limits and small-file overhead, are routinely wrong by a wide margin — leading to missed cutover dates and last-minute scrambling to add agents under time pressure.
Correct Approach
Run a representative pilot transfer against a real sample of the dataset first, measure actual achieved throughput, and size agent count and hardware based on that measured reality rather than a theoretical bandwidth calculation.
Pattern: Idempotent, Re-Runnable Automation
Because Task Executions are naturally safe to re-run, mature automation around DataSync is built to simply re-trigger a Task on failure rather than attempting complex custom recovery logic — treating “run it again” as the default remediation, with escalation to a human only after a configured number of consecutive automated retries have all failed, which is a far simpler and more reliable operational model than trying to programmatically reason about exactly what a partial failure left in an inconsistent state.
11Best Practices & Common Mistakes
These are the habits that separate teams who trust their DataSync pipeline to run unattended from teams who manually double-check every transfer out of quiet uncertainty.
Run a Pilot Transfer First
Always measure real throughput against a representative sample before committing to a migration timeline built on theoretical bandwidth.
Schedule Periodic Full Verification
Even with fast, lightweight verification on routine runs, schedule an occasional full-dataset verification pass to catch slow drift a lighter check would miss.
Enable Task Reports for Anything Compliance-Sensitive
A file-level Task Report is the difference between “we believe it transferred” and documented, auditable proof of exactly what moved.
Throttle Bandwidth During Business Hours
An unthrottled transfer sharing a link with production traffic is a common, entirely avoidable cause of unrelated application slowdowns.
Assuming Metadata Transfers Identically Everywhere
Permissions and ownership that transfer faithfully between two NFS locations may not have an equivalent representation once the destination is S3 — verify what actually carries over for your specific location pair.
Treating One Successful Run as Permanent Proof
A successful execution proves that run’s data moved correctly — it says nothing about a future run failing silently if verification is configured too loosely to catch it.
Name Tasks after the dataset and purpose they serve — “finance-archive-nightly-backup” rather than “task-1” — since Task names appear throughout CloudWatch metrics, Task Reports, and EventBridge events, and a descriptive name turns an alert notification into an immediately actionable signal instead of a lookup exercise.
12Real-World & Industry Examples
Seeing how organizations actually apply these mechanisms in specific industries makes them feel far less abstract.
Media & Entertainment: Petabyte-Scale Archive Migration
Media companies migrating decades of video archive footage from on-premises storage into S3 or FSx rely heavily on DataSync’s parallelized transfer and multi-agent scaling to move genuinely enormous, large-file-dominated datasets within realistic project timelines, using scheduled incremental runs to keep the cloud archive current with newly ingested footage even after the initial bulk migration completes.
Healthcare: Compliant Data Migration With Private Networking
Healthcare organizations migrating patient-record storage systems commonly configure DataSync with VPC endpoints specifically to keep protected health information off the public internet entirely during transfer, pairing that with Task Reports as documented evidence for compliance audits of exactly what data moved and when.
Financial Services: Cross-Region Disaster Recovery Replication
Financial institutions with strict recovery-point objectives use scheduled DataSync tasks to keep a secondary region’s storage continuously synchronized with production, treating the recurring replication schedule itself as a measurable, auditable recovery-point-objective commitment rather than an informal best-effort backup.
Research Institutions: Hybrid Compute Data Staging
Research organizations running large-scale simulations partly on-premises and partly on cloud compute use DataSync to stage datasets into S3 or FSx for Lustre ahead of a cloud compute job, and to sync results back afterward, treating DataSync as the data-movement layer that lets compute genuinely burst into the cloud without a bespoke data pipeline being built for every project.
Manufacturing: Edge-to-Cloud Sensor Data Aggregation
Manufacturers collecting sensor and machine-log data at edge locations use scheduled DataSync tasks running against local NFS or SMB shares to continuously aggregate that data into a central S3-based repository, giving centralized analytics teams a consistently updated view across many geographically distributed facilities without building a custom aggregation service per site.
13Filters, Scheduling & Bandwidth — A Deeper Look
These three configuration surfaces are where a Task’s real-world behavior is actually shaped. Getting them right is often more consequential than the choice of source and destination protocol itself.
Include and Exclude Filters in Combination
Filters can be layered — an include filter narrowing the transfer to a specific set of paths or patterns, combined with an exclude filter removing specific subsets even within that included scope, such as temporary files or a known-large cache directory that never needs to be migrated. DataSync evaluates these filters during the enumeration phase, meaning excluded files are never even inspected for transfer, which keeps a well-filtered task’s enumeration phase fast even against a much larger overall dataset.
Scheduling Cadence and Its Relationship to Delta Size
A tighter recurring schedule means each individual execution’s delta is smaller and faster, at the cost of more frequent enumeration overhead; a looser schedule means fewer executions but each one potentially transferring a larger accumulated delta. Advanced teams tune this cadence against the actual rate of change in the source dataset — a slowly-changing archive rarely benefits from an hourly schedule, while an actively-written application data directory supporting a tight recovery-point objective genuinely does.
Bandwidth Throttling as a Time-of-Day Lever
Because bandwidth throttle settings are part of the Task configuration, some teams programmatically adjust a Task’s throttle value on a schedule of their own — loosening it during off-hours and tightening it during business hours — using a simple scheduled automation that calls the DataSync API to update the Task’s bandwidth setting, rather than accepting a single fixed throttle value around the clock.
| Lever | Controls | Trade-off |
|---|---|---|
| Filters | Which files are even considered | Narrower scope speeds enumeration but requires careful upkeep as source structure changes |
| Schedule Cadence | How often a delta is computed and transferred | Tighter cadence means smaller deltas but more frequent enumeration overhead |
| Bandwidth Throttle | How much network capacity a transfer consumes | Protects production traffic at the cost of longer transfer windows |
14Troubleshooting Advanced Failure Scenarios
Every experienced DataSync operator has faced these situations. Knowing the pattern in advance turns a confusing failure into a quick, confident diagnosis.
A Task Execution Is Stuck in Preparing
A prolonged Preparing phase almost always points to the enumeration step struggling against the source — commonly an extremely large file count, a slow underlying storage system, or, for agent-based locations, an under-resourced agent struggling to walk the directory tree quickly. Checking agent-level resource utilization is the standard first diagnostic step before assuming anything is wrong with the DataSync service itself.
Throughput Is Far Below Expected Network Bandwidth
This is rarely a network problem on its own. The usual culprits, roughly in order of likelihood, are an under-sized agent hitting its own CPU or memory ceiling, a dataset dominated by small files where per-file overhead dominates total time, or an active bandwidth throttle left configured from a prior, more conservative setting that was never revisited.
Files Are Missing at the Destination Despite a Successful Execution
A Success status confirms every file the Task’s filters selected was transferred and verified — it does not confirm the filters themselves captured everything the operator intended. This is almost always a filter-configuration issue, not a transfer failure, and reviewing the exact include/exclude patterns against the specific missing files is the fastest path to the root cause.
Repeated Failures on the Same Small Set of Files
Files that fail consistently across multiple executions, rather than transiently, often indicate a permissions issue at the source that prevents the agent from reading that specific file, or a file actively locked by another process for the entire duration of every transfer window. The per-file error detail in the Task Execution results, or the Task Report if enabled, typically names the specific underlying cause directly.
15Testing and Validation Strategies
A migration plan that has never been tested against real data at real scale is an estimate, not a plan. Advanced teams validate in layers before ever running a production cutover.
Small-Scale Representative Pilot
Before configuring a production Task against a full dataset, running a Task scoped via filters to a small, genuinely representative subset — including a realistic mix of file sizes and any known edge cases like deeply nested directories or unusual permissions — surfaces configuration problems and realistic throughput numbers far more cheaply than discovering them mid-way through a multi-day production run.
Metadata Fidelity Checks
For migrations where preserving permissions, ownership, or timestamps genuinely matters to downstream applications, an explicit post-transfer check comparing source and destination metadata — beyond DataSync’s own built-in verification, which focuses on data integrity rather than confirming every metadata field landed as expected — catches subtle metadata-mapping issues specific to a given source/destination protocol pairing.
Full Staged Rehearsal Before Cutover
For a production cutover with a hard deadline, running the entire staged sequence — full transfer, incremental catch-up runs, final verification — once as a full rehearsal against production-scale data, well ahead of the actual cutover date, is what turns an estimated maintenance-window duration into a measured one, removing most of the uncertainty from the actual go-live event.
Representative Pilot
Transfer a small, realistic subset to validate configuration and measure real throughput.
Metadata Fidelity Check
Confirm permissions, ownership, and timestamps landed as expected for the specific source/destination pairing.
Full-Scale Rehearsal
Run the entire staged migration sequence at production scale ahead of the real cutover date to measure true timing.
Production Cutover
Execute the final, shortest incremental run during the actual maintenance window, now with a measured, trusted duration.
16Cost Optimization and Governance
DataSync’s own pricing scales with data volume transferred, and because it’s frequently used as the gateway into a much larger storage cost footprint, cost discipline around DataSync usage is really discipline about the destination storage decisions being made through it.
Narrow Filters Reduce Both Transfer and Destination Cost
Every file needlessly included in a transfer carries a double cost: the DataSync transfer cost itself, and the ongoing storage cost of a file now sitting in the destination that may never actually be needed there. Careful, deliberate filter scoping — excluding known temporary files, cache directories, and clearly obsolete data before migration rather than after — is one of the highest-leverage, lowest-effort cost controls available.
Right-Sizing Schedule Cadence Against Actual Change Rate
An overly aggressive schedule on a slowly-changing dataset incurs enumeration overhead on every run for little benefit, while an overly loose schedule on a rapidly-changing, latency-sensitive dataset can force a much larger, more expensive delta transfer than a tighter cadence would have. Matching cadence to the dataset’s genuine rate of change, rather than defaulting to either extreme, keeps both cost and operational overhead proportionate to actual need.
Choosing the Right Destination Storage Class
Because DataSync itself is destination-agnostic within a given storage service, the real cost decision often lives one layer up — whether data lands in a frequently-accessed storage tier or a lower-cost archival tier. Data migrated for long-term archival purposes that DataSync can write directly into a colder storage class from the outset avoids the extra cost and complexity of a subsequent, separate lifecycle transition after the fact.
Monitoring Cumulative Transfer Volume Over Time
Because DataSync’s own cost scales with data transferred, tracking cumulative bytes transferred per Task over time — using the same CloudWatch metrics gathered for performance monitoring — doubles as a cost-trend signal. A Task whose per-execution transfer volume is steadily growing over successive runs, beyond what the dataset’s expected growth rate would explain, is often the first visible sign of either an unintended filter change or a source dataset accumulating unexpected churn worth investigating before it becomes a significant recurring cost.
Tag Tasks and their destination resources consistently with the same cost-allocation conventions used elsewhere in the organization, so recurring DataSync-driven storage growth is visible in cost reports attributed to the correct team or project, rather than appearing as unexplained storage growth discovered later.
17Frequently Asked Questions
Only if explicitly configured to. The default behavior is additive — new and changed files are copied, but files removed from the source are left untouched at the destination. Enabling destination deletion turns the Task into a true mirror, which is appropriate for replication use cases but should generally be avoided for backup-oriented tasks.
Enumeration time is largely driven by the total number of files in the location, not by how many actually changed — DataSync still has to walk and compare metadata for the entire dataset to determine what’s different. A dataset with millions of files but only a handful of changes can still have a meaningfully long enumeration phase even though the actual transfer phase is nearly instant.
No. DataSync is designed to move data between an environment and AWS, or between two AWS-integrated locations — it always involves the DataSync managed service as an intermediary orchestrator, even when the actual bytes flow through an agent. It is not a general-purpose on-premises-to-on-premises file transfer tool.
Agent-based transfer requires deploying and sizing a VM or EC2 instance that DataSync directs to read or write data locally, and applies to virtually every location type. Enhanced Mode is a fully managed, agentless mode available specifically for object-storage-to-object-storage transfers, where AWS automatically provisions and scales the transfer workers, removing agent management entirely for that narrower set of use cases.
It depends entirely on whether both the source and destination protocols support an equivalent concept. A transfer between two NFS locations preserves POSIX permissions faithfully. A transfer into S3, which has no native Unix ownership model, cannot preserve that same metadata in the same form — always verify what actually carries over for your specific source and destination pairing before relying on it.
Wire the Task’s EventBridge execution-status events to an automated notification — a Lambda function posting to Slack, or an alarm on the CloudWatch metrics a failed or unusually slow execution would trigger. Relying on manually checking the console after every scheduled run defeats the purpose of scheduling it in the first place.
Yes. Every Task Execution re-enumerates and re-compares source against destination from scratch, so re-running a Task after a partial or full failure will naturally pick up exactly where things were left incomplete, re-attempting only what’s still missing or changed. There is no need for custom logic to figure out which specific files failed before retrying.
Yes. Bandwidth throttle, schedule, and most other Task-level settings can be updated on an existing Task without needing to delete and recreate it, which is exactly what enables patterns like programmatically loosening a throttle during off-hours and tightening it again during business hours.
18Summary and Key Takeaways
AWS DataSync’s real value isn’t simply moving files from one place to another — it’s the engineering underneath that makes moving enormous, recurring, verifiable datasets genuinely practical: parallelized transfer that saturates available bandwidth, metadata-based delta detection that keeps recurring runs fast, and built-in integrity verification that replaces blind trust with actual proof. Mastering DataSync at an advanced level means designing Tasks, Agents, and schedules with that engine in mind — thinking in terms of dataset shape, network constraints, and verification guarantees, not just source and destination endpoints.
Key Takeaways
- Parallelization and delta detection are the core engine. They’re why DataSync outperforms naive copy tools and why recurring runs stay fast.
- File-size distribution matters as much as raw bandwidth. A dataset dominated by small files can take far longer than a bandwidth calculation alone would predict.
- Agent sizing is a genuine capacity-planning exercise. Under-provisioned agents are one of the most common causes of throughput well below available bandwidth.
- Destination deletion is opt-in and genuinely destructive. Never enable it on a Task meant to function as a backup.
- Verification mode determines what “success” actually proves. Schedule periodic full verification to catch slow drift a lighter check would miss.
- Filters, schedule cadence, and bandwidth throttling are the real behavior-shaping levers. Tuning them against actual dataset characteristics matters more than the choice of protocol alone.
- Test in layers before a production cutover. A representative pilot and a full-scale rehearsal turn an estimated migration timeline into a measured one.
- Re-runs are safe by design. Because every execution re-enumerates and re-compares from scratch, simply retrying a failed Task is almost always the right first response.
- The control plane and data plane are deliberately separate. This split is what lets DataSync offer consistent scheduling and reporting across wildly different source environments.