Configure the Target Database


During the full load process, AWS DMS as default does not load tables in any particular order, so it might load child table data before parent table data. As a result, foreign key constraints might be violated if they are enabled. Also, if triggers are present on the target database, they might change data loaded by AWS DMS in unexpected ways. To overcome this, we drop the constraints on the target database.

  1. Open MySQL Workbench 8.0 CE from within the EC2 server, and create a new database connection for the target Aurora database using the following values:

    Parameter Value
    Connection Name Target Aurora RDS (MySQL)
    Host Name <TargetAuroraMySQLEndpoint>
    Port 3306
    Username awssct
    Password Password1

    \[SqlDms04\]

  2. After you receive a message stating “Successfully made the MySQL connection”, click OK.

  3. Click on the Target Aurora RDS (MySQL) from the list of MySQL Connections in SQL Workbench to connect to the target database.

    \[SqlDms05\]

  4. In this step you are going to drop the foreign key constraint from the target database:

    1. Within MySQL Workbench, click on the File menu, and choose New Query Tab.
    2. Open DropConstraintsSQLServer.sql with a text editor on your computer.
    3. Copy the content to MySQL Workbench query editor.
    4. Execute the script.

    \[SqlDms06\]