Working with Amazon DMS tasks - Amazon Database Migration Service
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Working with Amazon DMS tasks

An Amazon Database Migration Service (Amazon DMS) task is where all the work happens. You specify what tables (or views) and schemas to use for your migration and any special processing, such as logging requirements, control table data, and error handling.

A task can consist of three major phases:

  • Migration of existing data (Full load)

  • The application of cached changes

  • Ongoing replication (Change Data Capture)

For more information and an overview of how Amazon DMS migration tasks migrate data, see High-level view of Amazon DMS

When creating a migration task, you need to know several things:

  • Before you can create a task, make sure that you create a source endpoint, a target endpoint, and a replication instance.

  • You can specify many task settings to tailor your migration task. You can set these by using the Amazon Web Services Management Console, Amazon Command Line Interface (Amazon CLI), or Amazon DMS API. These settings include specifying how migration errors are handled, error logging, and control table information. For information about how to use a task configuration file to set task settings, see Task settings example.

  • After you create a task, you can run it immediately. The target tables with the necessary metadata definitions are automatically created and loaded, and you can specify ongoing replication.

  • By default, Amazon DMS starts your task as soon as you create it. However, in some situations, you might want to postpone the start of the task. For example, when using the Amazon CLI, you might have a process that creates a task and a different process that starts the task based on some triggering event. As needed, you can postpone your task's start.

  • You can monitor, stop, or restart tasks using the console, Amazon CLI, or Amazon DMS API. For information about stopping a task using the Amazon DMS API, see StopReplicationTask in the Amazon DMS API Reference.

The following are actions that you can do when working with an Amazon DMS task.

Task Relevant documentation

Creating a task

When you create a task, you specify the source, target, and replication instance, along with any migration settings.

Creating a task

Creating an ongoing replication task

You can set up a task to provide continuous replication between the source and target.

Creating tasks for ongoing replication using Amazon DMS

Applying task settings

Each task has settings that you can configure according to the needs of your database migration. You create these settings in a JSON file or, with some settings, you can specify the settings using the Amazon DMS console. For information about how to use a task configuration file to set task settings, see Task settings example.

Specifying task settings for Amazon Database Migration Service tasks

Using table mapping

Table mapping specifies additional task settings for tables using several types of rules. These rules allows you to specify the data source, source schema, tables and views, data, any table and data transformations that are to occur during the task, and settings for how these tables and columns are migrated from the source to the target.

Selection rules

Selection rules and actions

Transformation rules

Transformation rules and actions

Table-settings rules

Table and collection settings rules and operations

Running premigration task assessments

You can enable and run premigration task assessments showing issues with a supported source and target database that can cause problems during a migration. This can include issues such as unsupported data types, mismatched indexes and primary keys, and other conflicting task settings. These premigration assessments run before you run the task to identify potential issues before they occur during a migration.

Enabling and working with premigration assessments for a task

Data validation

Data validation is a task setting you can use to have Amazon DMS compare the data on your target data store with the data from your source data store.

Amazon DMS data validation.

Modifying a task

When a task is stopped, you can modify the settings for the task.

Modifying a task

Moving a task

When a task is stopped, you can move the task to a different replication instance.

Moving a task

Reloading tables during a task

You can reload a table during a task if an error occurs during the task.

Reloading tables during a task

Applying filters

You can use source filters to limit the number and type of records transferred from your source to your target. For example, you can specify that only employees with a location of headquarters are moved to the target database. You apply filters on a column of data.

Using source filters

Monitoring a task

There are several ways to get information on the performance of a task and the tables used by the task.

Monitoring Amazon DMS tasks

Managing task logs

You can view and delete task logs using the Amazon DMS API or Amazon CLI.

Viewing and managing Amazon DMS task logs