Menu
AWS Database Migration Service
User Guide (Version API Version 2016-01-01)

Getting Started with AWS Database Migration Service

AWS Database Migration Service (AWS DMS) helps you migrate databases to AWS easily and securely. You can migrate your data to and from most widely used commercial and open-source databases, such as Oracle, MySQL, and PostgreSQL. The service supports homogeneous migrations such as Oracle to Oracle, and also heterogeneous migrations between different database platforms, such as Oracle to PostgreSQL or MySQL to Oracle.

For information on the cost of database migration using AWS Database Migration Service, see the AWS Database Migration Service pricing page.

Start a Database Migration with AWS Database Migration Service

On the Dashboard page in the AWS DMS console, you can use a wizard to help create your first data migration. Following the wizard process, you allocate a replication instance that performs all the processes for the migration, specify a source and a target database, and then create a task or set of tasks to define what tables and replication processes you want to use. AWS DMS then creates your replication instance and performs the tasks on the data being migrated.

To start an AWS DMS database migration by using the console

  1. Sign in to the AWS Management Console and choose AWS DMS. Note that if you are signed in as an AWS Identity and Access Management (IAM) user, you must have the appropriate permissions to access AWS DMS. For more information on the permissions required, see IAM Permissions Needed to Use AWS DMS.

  2. On the Dashboard page, choose Create Migration.

Step 1: Welcome

You start migration from the console's Welcome page, shown following, which explains the process of database migration using AWS DMS.

Get started with AWS DMS

To start a database migration from the console's Welcome page

  • Choose Next.

Step 2: Create a Replication Instance

Your first task in migrating a database is to create a replication instance that has sufficient storage and processing power to perform the tasks you assign and migrate data from your source database to the target database. The required size of this instance varies depending on the amount of data you need to migrate and the tasks that you need the instance to perform. For more information about replication instances, see Replication Instances for AWS Database Migration Service.

The procedure following assumes that you have chosen AWS DMS from the AWS Management Console and started the replication task wizard.

To create a replication instance by using the AWS console

  1. On the Create replication instance page, specify your replication instance information. The following table describes the settings.

    Create a replication instance
    For This Option Do This

    Name

    Type a name for the replication instance that contains from 8 to 16 printable ASCII characters (excluding /,", and @). The name should be unique for your account for the region you selected. You can choose to add some intelligence to the name, such as including the region and task you are performing, for example west2-mysql2mysql-instance1.

    Description

    Type a brief description of the replication instance.

    Instance class

    Choose an instance class with the configuration you need for your migration. Keep in mind that the instance must have enough storage, network, and processing power to successfully complete your migration. For more information on how to determine which instance class is best for your migration, see Replication Instances for AWS Database Migration Service.

    VPC

    Choose the Amazon Virtual Private Cloud (Amazon VPC) you want to use. If your source or your target database is in an VPC, choose that VPC. If your source and your target databases are in different VPCs, ensure that they are both in public subnets and are publicly accessible, and then choose the VPC where the replication instance is to be located. The replication instance must be able to access the data in the source VPC. If neither your source nor your target database is in a VPC, select a VPC where the replication instance is to be located.

    Multi-AZ

    Use this optional parameter to create a standby replica of your replication instance in another Availability Zone for failover support. If you intend to use change data capture (CDC) or ongoing replication, you should enable this option.

    Publicly accessible

    Choose this option if you want the replication instance to be accessible from the Internet.

  2. Choose the Advanced tab, shown following, to set values for network and encryption settings if you need them.

    Advanced Tab
  3. Specify the additional settings. The following table describes the settings.

    For This Option Do This

    Allocated storage (GB)

    Choose the amount of storage, in gigabytes, to allocate for the replication instance.

    Replication Subnet Group

    Choose the replication subnet group in your selected VPC where you want the replication instance to be created. If your source database is in a VPC, choose the subnet group that contains the source database as the location for your replication instance. For more information about replication subnet groups, see Creating a Replication Subnet Group.

    Availability zone

    Choose the Availability Zone where your source database is located.

    KMS encryption key

    Choose the encryption key to use to encrypt replication storage and connection information. If you choose None, the default AWS Key Management Service (AWS KMS) key associated with your account and region is used. For more information on using the encryption key, see Setting an Encryption Key for AWS Database Migration Service.

  4. Choose Next.

Step 3: Specify Database Endpoints

While your replication instance is being created, you can specify the source and target databases. The source and target databases can be on an Amazon Elastic Compute Cloud (Amazon EC2) instance, an Amazon Relational Database Service (Amazon RDS) DB instance, or an on-premises database.

The procedure following assumes that you have chosen AWS DMS from the AWS Management Console and specified your replication instance information in the replication task wizard.

To specify source and target database endpoints using the AWS console

  1. In the AWS DMS console, choose Endpoints from the navigation pane.

  2. Choose Create Endpoint.

  3. On the Connect source and target database endpoints page, specify your connection information for the source and target databases. The following table describes the settings.

    Create source and target DB endpoints
    For This Option Do This

    Endpoint type

    Choose whether this endpoint is the source or target endpoint.

    Endpoint identifier

    Type the name you want to use to identify the endpoint. You might want to include in the name the type of endpoint, such as oracle-source or PostgreSQL-target. The name must be unique for all replication instances.

    Source engine or Target engine

    Choose the type of database engine that is the endpoint.

    Server name

    Type the server name.

    Port

    Type the port used by the database.

    SSL mode

    Choose an SSL mode if you want to enable connection encryption for this endpoint. Depending on the mode you select, you might be asked to provide certificate and server certificate information.

    User name

    Type the user name with the permissions required to allow data migration. For information on the permissions required, see the security section for the source database in this user guide.

    Password

    Type the password for the account with the required permissions.

  4. Choose the Advanced tab, shown following, to set values for connection string and encryption key if you need them. You can test the endpoint connection by choosing Run test.

    Create source or target DB endpoints

    For This Option Do This

    Extra connection attributes

    Type any additional connection parameters here. For more information about extra connection attributes, see Using Extra Connection Attributes with AWS Database Migration Service.

    KMS encryption key

    Choose the encryption key to use to encrypt replication storage and connection information. If you choose None, the default AWS Key Management Service (AWS KMS) key associated with your account and region is used. For more information on using the encryption key, see Setting an Encryption Key for AWS Database Migration Service.

Step 4: Create a Task

Create a task to specify what tables to migrate, to map data using a target schema, and to create new tables on the target database. As part of creating a task, you can choose the type of migration: to migrate existing data, migrate existing data and replicate ongoing changes, or replicate data changes only.

Using AWS DMS, you can specify precise mapping of your data between the source and the target database. Before you specify your mapping, make sure you review the documentation section on data type mapping for your source and your target database.

You can choose to start a task as soon as you finish specifying information for that task on the Create task page, or you can start the task from the Dashboard page once you finish specifying task information.

The procedure following assumes that you have chosen AWS DMS from the AWS Management Console and specified replication instance information and endpoints in the replication task wizard.

To create a task

  1. On the Create Task page, specify the task options. The following table describes the settings.

    Create task

    For This Option Do This

    Task name

    Type a name for the task.

    Task description

    Type a description for the task.

    Source endpoint

    Shows the source endpoint that will be used.

    Target endpoint

    Shows the target endpoint that will be used.

    Replication instance

    Shows the replication instance that will be used.

    Migration type

    Choose the migration method you want to use. You can choose to have just the existing data migrated to the target database or have ongoing changes sent to the target database in addition to the migrated data.

    Start task on create

    When this option is selected, the task begins as soon as it is created.

  2. Choose the Task Settings tab, shown following, and specify values for your target table, LOB support, and to enable logging. The task settings shown depend on the Migration type value you select. For example, when you select Migrate existing data, the following options are shown:

    Task settings
    For This Option Do This

    Target table preparation mode

    Do nothing - Data and metadata of the target tables are not changed.

    Drop tables on target - The tables are dropped and new tables are created in their place.

    Truncate - Tables are truncated without affecting table metadata.

    Include LOB columns in replication

    Don't include LOB columns - LOB columns will be excluded from the migration.

    Full LOB mode - Migrate complete LOBs regardless of size. LOBs are migrated piecewise in chunks controlled by the LOB chunk size. This method is slower than using Limited LOB Mode.

    Limited LOB mode - Truncate LOBs to ‘Max LOB Size’ This method is faster than using Full LOB Mode.

    Max LOB size (kb)

    In Limited LOB Mode, LOB columns which exceed the setting of Max LOB Size will be truncated to the specified Max LOB Size.

    Enable logging

    Enables logging by Amazon CloudWatch.

    When you select Migrate existing data and replicate for Migration type, the following options are shown:

    Task settings
    For This Option Do This

    Target table preparation mode

    Do nothing - Data and metadata of the target tables are not changed.

    Drop tables on target - The tables are dropped and new tables are created in their place.

    Truncate - Tables are truncated without affecting table metadata.

    Stop task after full load completes

    Don't stop - Do not stop the task, immediately apply cached changes and continue on.

    Stop before applying cached changes - Stop the task prior to the application of cached changes. This will allow you to add secondary indexes which may speed the application of changes.

    Stop after applying cached changes - Stop the task after cached changes have been applied. This will allow you to add foreign keys, triggers etc. if you are using Transactional Apply.

    Include LOB columns in replication

    Don't include LOB columns - LOB columns will be excluded from the migration.

    Full LOB mode - Migrate complete LOBs regardless of size. LOBs are migrated piecewise in chunks controlled by the LOB chunk size. This method is slower than using Limited LOB Mode.

    Limited LOB mode - Truncate LOBs to ‘Max LOB Size’ This method is faster than using Full LOB Mode.

    Max LOB size (kb)

    In Limited LOB Mode, LOB columns which exceed the setting of Max LOB Size will be truncated to the specified Max LOB Size.

    Enable logging

    Enables logging by Amazon CloudWatch.

  3. Choose the Table mappings tab, shown following, to set values for schema mapping and the mapping method. If you choose Custom, you can specify the target schema and table values. For more information about table mapping, see Using Table Mapping with an AWS Database Migration Service Task.

    Table mapping
  4. Once you have finished with the task settings, choose Create task.

Monitor Your Task

If you select Start task on create when you create a task, your task begins immediately to migrate your data when you choose Create task. You can view statistics and monitoring information for your task by choosing the running task from the AWS Management Console. The following screenshot shows the table statistics of a database migration. For more information about monitoring, see Monitoring AWS Database Migration Service Tasks

Status of replication