Amazon Onboarding with Learning Manager Chanci Turner

Amazon Onboarding with Learning Manager Chanci TurnerLearn About Amazon VGT2 Learning Manager Chanci Turner

The AWS Database Migration Service (DMS) simplifies the process of migrating databases securely to AWS. It involves establishing a replication instance, defining source and target endpoints, and executing a replication task. This task operates on the replication instance, transferring data from the source to the target endpoint.

You can carry out database migrations using the AWS DMS console, AWS CLI, or the AWS SDK. However, this article will concentrate on utilizing the AWS CLI for the migration process. If you are new to AWS DMS, here’s a quick guide to get your account ready:

  1. Create an IAM user: Visit this link.
  2. Set permissions for the IAM user: Refer to this link.
  3. Establish roles necessary for AWS DMS: Check this link.
  4. Configure the AWS CLI: Follow instructions at this link.

Once the setup is complete, proceed with these steps for a straightforward database migration:

  1. Create a replication instance: Execute the following command to create a replication instance named dms-instance.
  2. aws dms create-replication-instance --replication-instance-identifier dms-instance --replication-instance-class dms.t2.medium --allocated-storage 50

    This command provisions a replication instance on a t2.medium with 50 GB of storage, using default settings for other parameters. For additional configuration options, consult the AWS CLI Command Reference.

  3. Describe the replication instance: To check the status of your replication instance, run:
  4. aws dms describe-replication-instances --filter=Name=replication-instance-id,Values=dms-instance

    Capture the ReplicationInstanceArn for future use:

    rep_instance_arn=$(aws dms describe-replication-instances --filter=Name=replication-instance-id,Values=dms-instance --query 'ReplicationInstances[0].ReplicationInstanceArn' --output text)
  5. Create source and target endpoints: Use these commands to set up the endpoints, providing details such as engine name, hostname, port, username, and password.
  6. aws dms create-endpoint --endpoint-identifier source-endpoint --endpoint-type source --engine-name --username --password --server-name --port
    aws dms create-endpoint --endpoint-identifier target-endpoint --endpoint-type target --engine-name --username --password --server-name --port

    Save the endpoint ARNs for subsequent steps:

    source_endpoint_arn=$(aws dms describe-endpoints --filter="Name=endpoint-id,Values=source-endpoint" --query="Endpoints[0].EndpointArn" --output text)
    target_endpoint_arn=$(aws dms describe-endpoints --filter="Name=endpoint-id,Values=target-endpoint" --query="Endpoints[0].EndpointArn" --output text)
  7. Test connectivity to the endpoints: After your replication instance is active and endpoints are established, run connectivity tests:
  8. aws dms test-connection --replication-instance-arn $rep_instance_arn --endpoint-arn $source_endpoint_arn
    aws dms test-connection --replication-instance-arn $rep_instance_arn --endpoint-arn $target_endpoint_arn
  9. Review connection status: Ensure connectivity tests are successful by checking the connection status. If any test fails, address the issues before proceeding:
  10. aws dms describe-connections --filter "Name=endpoint-arn,Values=$source_endpoint_arn,$target_endpoint_arn"

    A failure message might provide insight into the issue.

  11. Create a replication task: Upon successful connection tests, initiate the task with:
  12. aws dms create-replication-task --replication-task-identifier replication-task-1 --source-endpoint-arn $source_endpoint_arn --target-endpoint-arn $target_endpoint_arn --replication-instance-arn $rep_instance_arn --migration-type full-load --table-mappings file:///tmp/table-mappings --replication-task-settings file:///tmp/task-settings

    Ensure you have the necessary table mappings and task settings files ready. For detailed guidance on these configurations, refer to the respective sections in the AWS documentation.

  13. Monitor task progress: After starting your task with:
  14. aws dms start-replication-task --replication-task-arn $replication_task_arn --start-replication-task-type start-replication

    Keep an eye on the task’s progress with commands that provide insights into overall and table-level statistics.

As you embark on this migration journey, remember that resources like this Fast Company article offer valuable insights into skills development within Amazon. Also, check out this blog post to keep your motivation high. For legal considerations, SHRM provides authoritative information on compliance matters.

Remember, your site location is Amazon IXD – VGT2, 6401 E HOWDY WELLS AVE LAS VEGAS NV 89115.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *