AWS Database Migration Service
User Guide (Version API Version 2016-01-01)

Creating a Task

There are several things you must do to create an AWS DMS migration task:

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

  • Select a migration method:

    • Migrating Data to the Target Database – This process creates files or tables in the target database, automatically defines the metadata that is required at the target, and 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 AWS 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 several different target tables can be updated 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 AWS 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. If AWS DMS can't apply changes to the target within a reasonable time (for example, if the target is not accessible), AWS 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 AWS 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 the AWS 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 AWS 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 you review the documentation section on data type mapping for your source and your target database.

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

The procedure following assumes that you have chosen the AWS DMS console wizard and specified replication instance information and endpoints using the console wizard. Note that you can also do this step by selecting Tasks from the AWS DMS console's navigation pane and then selecting Create task.

To create a migration task

  1. On the Create Task page, specify the task options. The following table describes the settings.

    
                    Create task
    For This Option Do This

    Task name

    Type a name for the task.

    Task description

    Type a description for the task.

    Source endpoint

    Shows the source endpoint that will be used.

    Target endpoint

    Shows the target endpoint that will be used.

    Replication instance

    Shows the replication instance that will 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.

    Start task on create

    When this option is selected, the task begins as soon as it is created.

  2. Choose the Task Settings tab, shown following, and specify values for your target table, LOB support, and to enable logging. The task settings shown depend on the Migration type value you select. For example, when you select Migrate existing data, the following options are shown:

    
                            Task settings
    For This Option Do This

    Target table preparation mode

    Do nothing - In Do nothing mode, AWS DMS assumes that the target tables have been pre-created on the target. If the migration is a full load or full load plus CDC, you must ensure that the target tables are empty before starting the migration. Do nothing mode is an appropriate choice for CDC-only tasks when the target tables have been pre-backfilled from the source, and ongoing replication is applied to keep the source and target in-sync. You can use the AWS Schema Conversion Tool (AWS SCT), to pre-create target tables for you.

    Drop tables on target - In Drop tables on target mode, AWS DMS drops the target tables and recreates them prior to starting the migration. This ensures that the target tables are empty when the migration starts. AWS DMS creates only the objects required to efficiently migrate the data: tables, primary keys, and in some cases, unique indexes. AWS DMS does not create secondary indexes, non-primary 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 and create secondary indexes that support filtering for update and delete statements.

    You may need to perform some configuration on the target database when you use Drop tables on target mode. For example, for an Oracle target, AWS DMS cannot create a schema (database user) for security reasons. In that case, you have to pre-create the schema user so AWS DMS can create the tables when the migration starts. For most other target types, AWS DMS creates the schema and all associated tables with the proper configuration parameters.

    Truncate - In Truncate mode, AWS DMS truncates all target tables before the migration starts. Truncate mode is appropriate for full load or full load plus CDC migrations where the target schema has been pre-created before the migration starts. You can use the AWS Schema Conversion Tool (AWS SCT) to pre-create target tables for you.

    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. AWS DMS migrates LOBs piecewise in chunks controlled by the Max LOB 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.

    Max LOB size (kb)

    In Limited LOB Mode, LOB columns which exceed the setting of Max LOB size will be truncated to the specified Max LOB Size.

    Enable validation

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

    Enable logging

    Enables logging by Amazon CloudWatch.

    When you select Migrate existing data and replicate for Migration type, the following options are shown:

    
                            Task settings
    For This Option Do This

    Target table preparation mode

    Do nothing - Data and metadata of the target tables are not changed.

    Drop tables on target - The tables are dropped and new tables are created in their place.

    Truncate - Tables are truncated without affecting table metadata.

    Stop task after full load completes

    Don't stop - Do not stop the task, immediately apply cached changes and continue on.

    Stop before applying cached changes - Stop the task prior to the application of cached changes. This will allow you to add secondary indexes which may speed the application of changes.

    Stop after applying cached changes - Stop the task after cached changes have been applied. This will allow you to add foreign keys, triggers etc. if you are using Transactional Apply.

    Include LOB columns in replication

    Don't include LOB columns - LOB columns will be excluded from the migration.

    Full LOB mode - Migrate complete LOBs regardless of size. LOBs are migrated piecewise in chunks controlled by the LOB chunk size. This method is slower than using Limited LOB Mode.

    Limited LOB mode - Truncate LOBs to ‘Max LOB Size’ This method is faster than using Full LOB Mode.

    Max LOB size (kb)

    In Limited LOB Mode, LOB columns which exceed the setting of Max LOB Size will be truncated to the specified Max LOB Size.

    Enable validation

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

    Enable logging

    Enables logging by Amazon CloudWatch.

  3. Choose the Table mappings tab, shown following, to set values for schema mapping and the mapping method. If you choose Custom, you can specify the target schema and table values. For more information about table mapping, see Using Table Mapping to Specify Task Settings.

    
                            Table mapping
  4. Once you have finished with the task settings, choose Create task.