Creating a task - 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).

Creating a task

To create an Amazon DMS migration task, you do the following:

  • Create a source endpoint, a target endpoint, and a replication instance before you create a migration task.

  • Choose a migration method:

    • Migrating data to the target database – This process creates files or tables in the target database and automatically defines the metadata that is required at the target. It also populates the tables with data from the source. The data from the tables is loaded in parallel for improved efficiency. This process is the Migrate existing data option in the Amazon Web Services Management Console and is called Full Load in the API.

    • Capturing changes during migration – This process captures changes to the source database that occur while the data is being migrated from the source to the target. When the migration of the originally requested data has completed, the change data capture (CDC) process then applies the captured changes to the target database. Changes are captured and applied as units of single committed transactions, and you can update several different target tables as a single source commit. This approach guarantees transactional integrity in the target database. This process is the Migrate existing data and replicate ongoing changes option in the console and is called full-load-and-cdc in the API.

    • Replicating only data changes on the source database – This process reads the recovery log file of the source database management system (DBMS) and groups together the entries for each transaction. In some cases, Amazon DMS can't apply changes to the target within a reasonable time (for example, if the target isn't accessible). In these cases, Amazon DMS buffers the changes on the replication server for as long as necessary. It doesn't reread the source DBMS logs, which can take a large amount of time. This process is the Replicate data changes only option in the Amazon DMS console.

  • Determine how the task should handle large binary objects (LOBs) on the source. For more information, see Setting LOB support for source databases in an Amazon DMS task.

  • Specify migration task settings. These include setting up logging, specifying what data is written to the migration control table, how errors are handled, and other settings. For more information about task settings, see Specifying task settings for Amazon Database Migration Service tasks.

  • Set up table mapping to define rules to select and filter data that you are migrating. For more information about table mapping, see Using table mapping to specify task settings. Before you specify your mapping, make sure that you review the documentation section on data type mapping for your source and your target database.

  • Enable and run premigration task assessments before you run the task. For more information about premigration assessments, see Enabling and working with premigration assessments for a task.

  • Specify any required supplemental data for the task to migrate your data. For more information, see Specifying supplemental data for task settings.

You can choose to start a task as soon as you finish specifying information for that task on the Create task page. Alternatively, you can start the task from the Dashboard page later as well.

The following procedure assumes that you have already specified replication instance information and endpoints. For more information about setting up endpoints, see Creating source and target endpoints.

To create a migration task
  1. Sign in to the Amazon Web Services Management Console and open the Amazon DMS console at

    If you are signed in as an Amazon Identity and Access Management (IAM) user, make sure that you have the appropriate permissions to access Amazon DMS. For more information about the permissions required, see IAM permissions needed to use Amazon DMS.

  2. On the navigation pane, choose Database migration tasks, and then choose Create task.

  3. On the Create database migration task page, in the Task configuration section, specify the task options. The following table describes the settings.

    Create task
    For this option Do this

    Task identifier

    Enter a name for the task.

    Descriptive Amazon Resource Name (ARN) - optional

    A friendly name to override the default Amazon DMS ARN. You can't change this name after you create the task.

    Replication instance

    Shows the replication instance to be used.

    Source database endpoint

    Shows the source endpoint to be used.

    Target database endpoint

    Shows the target endpoint to be used.

    Migration type

    Choose the migration method you want to use. You can choose to have just the existing data migrated to the target database or have ongoing changes sent to the target database in addition to the migrated data.

  4. In the Task Settings section, specify values for editing your task, target table preparation mode, stop task, LOB settings, validation, and logging.

    For this option Do this

    Editing mode

    Choose whether to use the Wizard or the JSON editor to specify your task settings. If you choose Wizard, the following options will be displayed.

    CDC start mode for source transactions

    This setting is only visible if you choose Replicate data changes only for Migration type in the preceding section.

    Disable custom CDC start mode – If you choose this option, you can start your task either automatically by using the Automatically on create option following, or manually by using the console.

    Enable custom CDC start mode – If you choose this option, you can specify a custom UTC start time to start processing changes.

    Target table preparation mode

    This setting is only visible if you choose Migrate existing data or Migrate existing data and replicate ongoing changes for Migration type in the preceding section.

    Do nothing – In Do nothing mode, Amazon DMS assumes that the target tables have been pre-created on the target. If the tables aren't empty, conflicts might occur during data migration and can result in a DMS task error. If the target table doesn't exist, DMS creates the table for you. Your table structure remains as is and any existing data is left in the table. Do nothing mode is appropriate for CDC-only tasks when the target tables have been backfilled from the source and ongoing replication is applied to keep the source and target in sync. To pre-create tables, you can use the Amazon Schema Conversion Tool (Amazon SCT). For more information, see Installing Amazon SCT.

    Drop tables on target – In Drop tables on target mode, Amazon DMS drops the target tables and recreates them before starting the migration. This approach ensures that the target tables are empty when the migration starts. Amazon DMS creates only the objects required to efficiently migrate the data: tables, primary keys, and in some cases, unique indexes. Amazon DMS doesn't create secondary indexes, nonprimary key constraints, or column data defaults. If you are performing a full load plus CDC or CDC-only task, we recommend that you pause the migration at this point. Then, create secondary indexes that support filtering for update and delete statements.

    You might need to perform some configuration on the target database when you use Drop tables on target mode. For example, for an Oracle target, Amazon DMS can't create a schema (database user) for security reasons. In this case, you precreate the schema user so Amazon DMS can create the tables when the migration starts. For most other target types, Amazon DMS creates the schema and all associated tables with the proper configuration parameters.

    Truncate – In Truncate mode, Amazon DMS truncates all target tables before the migration starts. If the target table doesn't exist, DMS creates the table for you. Your table structure remains as is but tables are truncated at the target. Truncate mode is appropriate for full load or full load plus CDC migrations where the target schema has been precreated before the migration starts. To precreate tables, you can use Amazon SCT. For more information, see Installing Amazon SCT.


    If your target is MongoDB, Truncate mode doesn’t truncate tables at the target. Instead, it drops the collection and loses all the indices. Avoid Truncate mode when your target is MongoDB.

    Stop task after full load completes

    This setting is only visible if you choose Migrate existing data and replicate ongoing changes for Migration type in the preceding section.

    Don't stop – Don't stop the task but immediately apply cached changes and continue on.

    Stop before applying cached changes – Stop the task before the application of cached changes. Using this approach, you can add secondary indexes that might speed the application of changes.

    Stop after applying cached changes – Stop the task after cached changes have been applied. Using this approach, you can add foreign keys if you are using transactional apply.

    Include LOB columns in replication

    Don't include LOB columns – LOB columns are excluded from the migration.

    Full LOB mode – Migrate complete LOBs regardless of size. Amazon DMS migrates LOBs piecewise in chunks controlled by the LOB Chunk size parameter. This mode is slower than using Limited LOB mode.

    Limited LOB mode – Truncate LOBs to the value of the Max LOB size parameter. This mode is faster than using Full LOB mode.

    Maximum LOB size (kb)

    In Limited LOB Mode, LOB columns that exceed the setting of Max LOB size are truncated to the specified Max LOB Size value.

    Enable validation

    Enables data validation, to verify that the data is migrated accurately from the source to the target. For more information, see Amazon DMS data validation.

    Enable CloudWatch logs

    Enables logging by Amazon CloudWatch.

  5. In the Premigration assessment section, choose whether to run a premigration assessment. A premigration assessment warns you of potential migration issues before starting your database migration task. For more information, see Enabling and working with premigration assessments.

  6. In the Migration task startup configuration section, specify whether to start the task automatically after creation.

  7. In the Tags section, specify any tags you need to organize your task. You can use tags to manage your IAM roles and policies, and track your DMS costs. For more information, see Tagging resources.

  8. After you have finished with the task settings, choose Create task.