Set up an Amazon DMS replication instance - Database Migration Guide
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).

Set up an Amazon DMS replication instance

To provision an Amazon DMS replication instance, download the DMS_CF.yaml template.

  1. On the Amazon Web Services Management Console, under Services, choose CloudFormation.

  2. Choose Create stack.

  3. For Specify template, choose Upload a template file.

  4. Select Choose File.

  5. Choose the DMS_CF.yaml file.

  6. Choose Next.

  7. On the Specify Stack Details page, edit the predefined values as needed, and then choose Next:

    • Stack name — Enter a name for the stack.

    • AllocatedStorageSize — Enter the storage size in GB. The default is 200 GB.

    • DMSReplicationSubnetGroup — Enter the subnet group for DMS replication.

    • DMSSecurityGroup — Enter the security group for DMS replication.

    • InstanceType — Enter the instance type.

    • SourceDBPort — Enter the source database port.

    • SourceDatabaseName — Enter the source database name.

    • SourceServerName — Enter the IP address of the source database server.

    • SourceUsername — Enter the source database user name.

    • SourcePassword — Enter the source database password.

    • TargetDBPort — Enter the target database port.

    • TargetDatabaseName — Enter the target database name.

    • TargetServerName — Enter the IP address of the target database server.

    • TargetUsername — Enter the target database user name.

    • TargetPassword — Enter the target database password.

  8. On the Configure stack options page, for Tags, specify any optional tags, and then choose Next.

  9. On the Review page, choose I acknowledge that Amazon CloudFormation might create IAM resources.

  10. Choose Create Stack.

This Amazon CloudFormation template creates a replication instance named mariadb-mysql. This replication instance has a source endpoint named maria-on-prem and a target endpoint named mysqltrg-rds. This target endpoint has extra connection attributes to disable foreign key constraint checks during the Amazon DMS replication, as shown following.

ExtraConnectionAttributes : "initstmt=SET FOREIGN_KEY_CHECKS=0;parallelLoadThreads=1"