I want to create an AWS Database Migration Service (AWS DMS) task to use for validation purposes, such as for previewing and validating data.
AWS DMS allows you to create validation only tasks using either the AWS DMS console or the AWS Command Line Interface (AWS CLI). You can use validation only tasks to validate your data without performing any migration or data replication. When you use validation only tasks, there is no overhead on your existing migration task because the validation itself is decoupled from migration.
There are two types of validation only tasks: Full load validation only tasks, and change data capture (CDC) validation only tasks.
Full load validation only tasks complete much faster than their CDC equivalent when many failures are reported. But, in full load mode, changes to the source or target endpoint are reported as failures, which can be a disadvantage.
CDC validation only tasks delay validation based on average latency. They then retry failures multiple times before reporting them. If the majority of the data comparisons result in failures, then a CDC validation only task is very slow, which is a potential disadvantage.
For more information on how you can use validation only tasks, see the Validation only use cases section of Validation only tasks.
Create a validation only task using the AWS DMS console
1. Open the AWS DMS console, and then from the navigation pane, choose Database migration tasks.
2. Choose Create task, and then under Task configuration, enter the details for your task.
3. Under Migration type, choose Replicate data changes only.
4. Under Task settings, select the JSON editor, and then change these settings:
5. For Migration Type, choose one of these options:
For a full load validation only task, choose Migrate existing data.
For a CDC validation only task, choose Replicate data changes only.
6. Under Migration task startup configuration, choose Manually later. This allows you to verify the task settings before starting the task. Note: The default TargetTablePrepMode is set to DO_NOTHING. If TargetTablePrepMode has been modified, set the TargetTablePrepMode to DO_NOTHING.
7. Choose Create task.
Create validation only task using AWS CLI
1. For Linux and Windows environments, run the create-replication-task command to create a validation only task. You can also specify a cdc-start-time, which might be useful if you need to start validation from a specific timestamp. See these examples:
These examples create a CDC validation only task. Use the same settings for a full load validation only task, but change the --migration-type to full-load when you run the create-replication-task command.