Database Migration Service

January 12, 2016 | Comments(13) |

AWS Database Migration service allows AWS customers to easily migrate Production databases to AWS with minimal downtime. It is currently available for preview in US East (N. Virginia) region.Setting up Database Migration toll is easy and quick it takes about 10-15 minutes to setup.During migration of databases, sources database remains operationally active. DMS supports homogeneous migrations and also heterogeneous migrations of databases like Oracle to Amazon Aurora and MySQL to PostgreSQL. AWS database migration service can migrate data using commercial and open-sources databases.

Why AWS Database Migration Service instead of  own self-managed replication solution.

 AWS Database Migration Service is easy and faster to setup and use. Replication tasks can be set-up   in minutes instead of hours or days, Instead of the self-managed replication solutions that have to be installed and configured. AWS Database Migration Service monitors replication tasks, network or host failures, and automatically provisions a host replacement in case of failures that can’t be repaired.

DMS Schema conversion tool for Dissimilar Engines:

Usually Heterogeneous migrations are very complex and time consuming to overcome the problems caused during Heterogeneous migrations. AWS has come up with database migration Schema Conversion Tool which makes heterogeneous migrations more simpler and easier by automatically converting entire database schema and majority of custom code of the source database to a format compatible with target converts sources database schema and code.The changes to the source database that occur during the migration process are automatically replicated to the target    Below Architecture Diagram gives an idea of how Schema conversion Tool works for Dissimilar engines

 DMS Migration with Dissimilar engines Using Schema conversion Tool.




Database Migration between Dissimilar engines with different Availability Zones.

In Database Migration Service we are creating Replication Instance which is connected with Source and Target Endpoints then creating Replication Task once Replication instance is created automatically Migration will be started once it is done the task will be in Stopped state.Here is a detailed tutorial on how to achieve the Database Migration.

Step 1: Creating DMS Replication Instance

  • Click on Launch Replication Instance in DMS Dashboard.




  • Enter Replication Instance Name.
  • Enter Description of Replication Instance(Not Mandatory).
  • Select the Instance class from the set of Available Instance classes.
  • Select the VPC Name in which Replication instances need to be created.
  • Click on Advanced.                                                                                                                                                      2
  • Select the Replication subnet group.
  • Select the Availability Zone(Replication instance need to be in same AZ as that Source database Engine)
  • Select the Master key(KMS Key) for Encryption Purpose during migration.
  • Click on Create Replication Instance.                                                                                                                            3

Step 2: Creating DMS Endpoints                                                                                 

  • Click on Endpoints>>Create Endpoint




  • Enable Endpoint type as Source for Creating the Source Endpoint.
  • Enter Endpoint Identifier for source Endpoint.
  • Select the Source engine.
  • Enter Server address(Source RDS Database Endpoint)
  • Enter Port number of source Engine.
  • Enter Username of source RDS database.
  • Enter Password of source RDS database.
  • Enter Database Name of source RDS database.
  • Click on Advanced.


  • Connection string is not mandatory aws provides connection string by default .
  • Select Master key(KMS key).
  • Enter VPC name you want Endpoint to use.
  • Select Replication Instnces.
  • Click on Run Test to test endpoint connection it will generate a statement connection tested successfully.
  • Click on SAVE.
  • Create Target endpoint as we have created for Source and Test connection Endpoint for target Using Run Test




  •  Now Click on Endpoints  you should be able to see the endpoints created for the  source and target in this case MySQL is source and PostgreSQL is Target Endpoint.                                                                                                                                       22

Step 3: Creating DMS Replication Task                                                                                               

  • Enter Task name.
  • Select Replication Instance which was created in earlier steps.
  • Select the source endpoint(MYSQL Endpoint).
  • select Target endpoint (PostgresSQL Endpoint).
  • select the Migration type as Migrate Existing Data.
  • Enable Mapping Method option as default.
  • Click on Create Task.                                                                                                                                                        23
  • Once the Task is created Migration will be Started initial status of task will be creating,once migration is started task status becomes running.                                                                                   25
  • When Migration is completed automatically Task status becomes Stopped.

screenshot-console aws amazon com 2016-01-10 22-55-35


Database migration features:

1) Automated and continuous data replication.

2) Self-healing and Resilient.

1) Automated and continuous data replication: once the database migration process begins the data capture capability of  DMS continuously captures  all data changes from sources database to target it minimizes downtime by enabling you to keep the source database operational during the migration AWS Database Migration Service can perform continuous replication of data from one database to another and between homogeneous or heterogeneous databases.

2) Self-healing and Resilient: AWS Database Migration Service makes it easy to recover from network and host failures. It continually monitors source and target databases, network connectivity, and the infrastructure running the replication process and issues alerts when a failure occurs.


  • Minimizes Downtime During Migrations.
  • Fast and Easy to Set-up.
  • Low Cost.
  • Supports All Widely Used Databases.
  • Reliability.

Sources and targets supported by AWS Database Migration Service
AWS Database Migration Service supports both homogeneous and heterogeneous Source and targets.Supported databases  include:

  •  Oracle.
  •  PostgreSQL.
  •  MySQL.


In  AWS Database Migration Services. We only pay for the compute resources used during the migration process (Database migration instance that moves your data from your source database to your target database).

13 Responses to “Database Migration Service”

  1. SUNIL

    Great notes.. could you please mention about pre-req steps required how Amazon connects to On-premise Database ..what all steps involved before DMS kickedoff..Thanks

  2. Laxman

    Hi Ramya,

    While connecting to onprimise Oracle DB in source point i am getting the following error
    errType=ERROR_RESPONSE, status=1022307, errMessage=ORA-12170: TNS:Connect timeout occurred OCI error., errDetails=

    which is not geeting reslved. can u let me know the steps to resolve this issue.

    Laxman Pawar

    • Dhanasekar

      Am also getting the same error, did anybody got any fix for that?


      • Sharif Syed

        I am also facing same Issue, Any solution for this please let me know

        Sharif Syed

    • Sharif Syed

      I am also facing same Issue, Any solution for this please let me know

      Sharif Syed

  3. Riana Mitt

    Very well explained post. Thanks a lot for sharing. eCommerce Data Migration services are very typical one’s and takes a lots of time.

  4. Dhanasekar

    Hi Ramya,

    Am also getting the below error, while connecting source database which is on on-premise.

    errType=ERROR_RESPONSE, status=1022307, errMessage=ORA-12170: TNS:Connect timeout occurred OCI error., errDetails=

    so please help me to fix the issue,


    • Ahsan

      I am also stuck on the same error.
      Doesn’t looklike, you can use this service with on premise database.
      Lookslike, you need to create a oracle database in rds and then do export/import data from on premise to rds and then use this service, if this true then, it makes DMS useless.
      Can someone point to the correct solution?

  5. sankar

    I am facing error as “Invalid role arn, contains ARN without the required six components” This error appeared in AWS RDS endpoint creation process. I am not sure what are role issue, but I have the necessary roles for DMS. I am not sure what will be the checking behind in the endpoint creation. Note: I had one more replication which was deleted for new replication for using AWS db for new replication.
    I won’t see any this error in AWS support page which seems this is new to them or not

    • romek

      Am currently having the same issue and cant find any information about this, did you have any success solving it?


Leave a Reply