Recently, we introduced two significant enhancements in the AWS Database Migration Service (AWS DMS)—the ability to modify tasks and perform table mapping directly through the AWS Management Console. These innovations mark an important milestone in our ongoing efforts to refine and elevate our migration and replication services based on user feedback.
Modifying Tasks
Previously, users were required to utilize the AWS CLI to adjust tasks or to delete and recreate migration tasks to change settings within the AWS Management Console. Now, with the new functionality, you can modify most settings while the task is in a stopped state through the console. Simply select the task and click the Modify button to make the necessary changes. Alternatively, you can use the AWS CLI or the AWS DMS API command ModifyTask.
This updated capability allows for greater flexibility in managing migration or replication projects without the hassle of deleting and recreating tasks. For instance, you can now easily alter the log level of a DMS task or modify the table mapping between the source and target databases. For further details on this feature, refer to the DMS documentation.
Table Mapping Through the Console
The table mapping feature enables users to choose which tables from a source database will be migrated to a target database. The simplest form of mapping is to migrate all tables without any modifications. However, you can also specify individual tables in the source database and the corresponding schema for migration. Additionally, filters can be applied to determine which data from specific table columns should be replicated to the target database.
Prior to this enhancement, users had to create and adjust a JSON file for table mapping. Now, the console allows for a more user-friendly approach to perform table mapping, including the selection of tables and any required transformations. In the console interface, you can define schema, table, and action (include or exclude) within the Where section. Transformations can also be applied to rename schemas or tables, add prefixes or suffixes, or even remove table columns.
Setting Up Table-Mapping Selection Rules
To establish selection rules for a table named Customers in the schema EntertainmentAgencySample, follow these steps:
- Log in to the AWS Management Console and navigate to AWS DMS.
- On the Dashboard, select Tasks.
- Click on Create Task.
- Enter the task details, including Task name, Replication instance, Source endpoint, Target endpoint, and Migration type. Choose the Guided tab in the Table mappings section.
- In the Table mapping section, select the schema and table name, using “%” as a wildcard if necessary. Determine the action (include or exclude) based on your filter.
- Use the Add column filter and Add condition links to set filter information. For example, you can specify a filter for the Customers table that includes AgencyID values between 01 and 85.
- After defining the selection rules, click Add selection rule.
- Once you have at least one selection rule, you can add a transformation by clicking add transformation rule.
- Specify the target for transformation and provide the additional required information. For instance, you can delete the AgencyStatus column from the Customers table.
- Select Add transformation rule to finalize.
- You can add more selection rules or transformations as needed by clicking add selection rule or add transformation rule. Finally, click Create task.
For more insights on table mapping using the console, check the DMS documentation. Additionally, you might find this other blog post insightful: Chanci Turner’s blog. For authoritative information on this subject, see Chanci Turner’s insights. If you’re looking for community support, this Reddit thread is an excellent resource.
About the Author
Alex Johnson is a product manager for Database Migration Services at Amazon Web Services.