Creating a Serverless Replication

In this step-by-step guide you will create Serverless Replication to migrate data from Oracle or SQL Server database to Amazon Aurora (MySQL or PostgreSQL compatible).

The environment for this lab consists of:

  • A source database (SQL Server or Oracle).

  • An Amazon Aurora instance used as the target database.

  1. Go to AWS DMS Console. On the AWS DMS Console page, click Serverless replications. AWS DMS Serverless Replication is a new concept that abstracts the instances and tasks typically found in standard AWS DMS.

  2. On the Serverless replications page, click the Create Replication button.

  3. Configure Your Replication Provide a name to your Serverless replication and Configure replication to connect to your source and target databases. During this step, you’ll need to specify Source and Target endpoint. You’ll also configure the replication to perform a full load (migrating existing data) and enable Change Data Capture (CDC) to replicate ongoing changes from the source to the target database.

    ParameterValue
    Task identifier**dms-serverless-lab**
    Source database endpointYour source database endpoint (SQL Server or Oracle) , Example: **sql-server-source**
    Target database endpointYour target database endpoint(MySQL or PostgreSQL) , Example: **mysql-target**
    Migration typeFull Load and CDC ( Migrate existing data and replicate ongoing changes)

  4. Configure Additional Settings

    ParameterValueExplanation
    Target table preparation modeDo Nothing This ensures that any existing tables in the target database are not dropped and tables that are not present on target database are created
    Stop task after full load completesDon’t stopThis option allows the replication to continue running even after the initial full load is completed, so it can handle ongoing changes.
    Include LOB columns in replicationLimited LOB modeThis setting ensures that large object (LOB) columns are included in the replication with certain limitations to optimize performance.
    Max LOB size32 KBThis specifies the maximum size for LOB columns that will be replicated.
    Turn on validationKeep it unchecked i.e. OFFValidation can be resource-intensive and is not always necessary for all scenarios.
    Turn on cloudwatch logsturn it on and keep all the “default”.This will allow you to monitor the replication process and troubleshoot any issues that arise.

  5. Set Up Table Selection Rules

    Note: Expand only for the source in your scenario. You can skip the other sources.

    • 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. Set Up Transformation rules Transformation rules allow you to modify the structure or content of the data as it is migrated. 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 Namedbo
      ActionRename to: dms_sample_target

  2. Specify Network related Settings

    Under the Compute settings, choose the VPC and subnet where the replication will be created. Additionally, select the appropriate security group.

    ParameterValue
    VPCSelect VPC ID with DMSVpc in the name from drop down
    Subnet GroupChoose the default one available in your VPC
    Security GroupsSelect the security group that starts with cfn-InstanceSecurityGroup-%
    AWS KMS Key**aws/dms**
  3. Select an Availability Zone

    Under the Availability section, select the availability option suited to your workload and choose the specific AZ where your primary instance will operate. If you select “no preference”, AWS DMS will automatically choose the AZ for you.

    ParameterValue
    AvailabilitySingle-AZ
    Availability ZoneNo Preference

  4. Select Minimum and Maximum DMS Capacity Units (DCU)

    Under Capacity Settings, Select Minimum and Maximum DMS Capacity units (DCU). Replication compute capacity in AWS DMS is measured in DMS Capacity Units (DCU). Each DCU provides 2 GiB of memory along with corresponding compute and networking resources

    ParameterValue
    Minimum DMS Capacity units (DCU)1
    Maximum DMS Capacity units (DCU)4

  5. Review and Create Replication

    Review all your configurations, and then initiate the Serverless replication by clicking Create Replication.

  6. If all parameters were correct and validation was successful then the newly created replication will be visible under Serverless Replication.

  7. Start Replication

    To begin migrating data from the source to the target database, start the serverless replication. Select the replication and, under Actions, choose Start.

    On the Start replication page, Select Don’t stop CDC and then Click on Start Replication.

    The replication process would immidiately start.

This concludes the replication creation process, and your replication is now starting. The Serverless replication process consists of 8 stages, which you can monitor under the Status column. Please proceed to the next page for a detailed overview of each stage.