Create a DMS Migration Task

AWS DMS uses Database Migration Tasks to migrate the data from source to the target database.

  1. Click on Database migration tasks on the left-hand menu, then click on the Create task button on the top right corner.

    Create task

  2. Create a data migration task with the following values for migrating the **dms_sample** database.

    Expand this if your target type is Aurora (MySQL)
    Expand this if your target type is Aurora (PostgreSQL)
    Expand this if your target type is RDS Microsoft SQL Server:
    Expand this if your target type is Oracle:
    Expand this if your target type is Amazon S3:

    Create task

    Create task

  3. Expand the Table mappings section, and select Wizard for the editing mode.

    Create task

  4. Click on Add new selection rule button and enter the following values in the form:

    • For Oracle source, use:
    ParameterValue
    SchemaDMS_SAMPLE%
    Table name%
    ActionInclude
    • For SQL Server source, use:
    ParameterValue
    Schemadbo%
    Table name%
    ActionInclude

If the Create Task screen does not recognize any schemas, make sure to go back to endpoints screen and click on your endpoint. Scroll to the bottom of the page and click on Refresh Button (⟳) in the Schemas section. If your schemas still do not show up on the Create Task screen, click on the Guided tab and manually select **dbo** schema and all tables.

  1. Next, expand the Transformation rules section, and click on Add new transformation rule using the following values:

    • For Oracle source, use:

      • Rule 1:
      ParameterValue
      TargetSchema
      Schema NameDMS_SAMPLE
      ActionMake lowercase
      • Rule 2:
      ParameterValue
      TargetTable
      Schema NameDMS_SAMPLE
      Table Name%
      ActionMake lowercase
      • Rule 3:
      ParameterValue
      TargetColumn
      Schema NameDMS_SAMPLE
      Table Name%
      Column Name%
      ActionMake lowercase
    • For SQL Server Source, use:

      ParameterValue
      TargetSchema
      Schema Name% (if Microsoft SQL is used) or %dbo
      ActionRename to: dms_sample_dbo or dms_sample_target
  2. Uncheck Turn on premigration assessment this should collapse this section for our workshop this part there isn’t time for and it isn’t required.

  3. After entering the values, make sure Migration task startup configuration is set to start Automatically on create, then click on Create task.

    Create task

  4. At this point, the task should start running and replicating data from the **dms_sample** database running on your source to the Amazon Aurora RDS (PostgreSQL) instance. Note the DMS task will take a moment to create (Status=creating), then it will transition into Status=Ready, followed by Status=Starting, and then Status=Running. You can use the circular arrow refresh button to update the status for the task.

    Create task