Simplify and Automate the Migration of Your Applications with AWS Migration Hub Orchestrator
By: Rajendra Gupta | Updated: 2023-02-14 | Comments | Related: > Amazon AWS
Problem
Cloud migration refers to moving data, applications, and other business processes from a company's existing on-premises infrastructure to a cloud computing environment. It can present various technical and business challenges, such as compatibility issues, security concerns, data privacy regulations, cost management, and the need for re-architecting and re-platforming applications.
In this article, we look at how AWS can simplify the migration of your on-premises SQL Server workloads to the AWS environment.
Solution
Amazon Web Services (AWS) is a cloud computing platform provided by Amazon. It allows businesses to build and run their applications and services on Amazon's highly scalable and reliable infrastructure with secure access from anywhere in the world. It offers various services, including computing, storage, databases, analytics, machine learning, mobile, security, and other services.
AWS provides customers with these value-added features:
- Scalability: AWS allows you to quickly scale your infrastructure up or down based on the changing demands of your business.
- Cost savings: By leveraging the pay-per-use model of AWS, you can minimize expenses associated with on-premises (traditional) IT infrastructure and reduce your capital expenditures.
- Reliability: AWS provides robust infrastructure and services designed for high availability and fault tolerance, ensuring that your applications and services are always available.
- Security: AWS offers a wide range of security measures, including encryption, access controls, and identity management, to help secure sensitive data.
- Innovation: With an extensive range of cloud-based services and tools available, AWS enables you to rapidly innovate and experiment with new technologies, products, and services.
- Global reach: With a worldwide network of data centers, AWS enables you to deliver applications and services to customers worldwide with low latency and high performance.
- Speed: By utilizing AWS, you can quickly and easily launch new products and services, allowing you to respond rapidly to changing market conditions.
- Flexibility: AWS offers a flexible and customizable infrastructure, enabling you to choose the right tools and services for your business needs.
Challenges of Migrating Databases to the Cloud
Let's highlight a few challenges associated with migrating workloads into the cloud:
- Data migration: Moving large amounts of data to the cloud can be time consuming and complex, especially if the data is stored in multiple sources.
- Compatibility: Some databases may not be compatible with cloud infrastructure, requiring extensive changes to the existing setup.
- Security: Securing sensitive data in the cloud can be challenging, mainly if the migration process includes unsecured networks.
- Performance: The performance of cloud databases may not be as fast as traditional databases, which can impact application performance.
- Cost: The cost of migrating and running databases in the cloud can be high, especially for businesses that need to store large amounts of data.
- Integration: Integrating existing systems and applications with cloud databases can be complex, requiring a deep understanding of cloud architecture.
- Compliance: Ensuring compliance with regulations such as HIPAA and PCI DSS can be challenging in the cloud, as businesses need to be aware of the security measures used by their cloud provider.
How AWS Makes Migration Easier
AWS offers various services for migrating from on-premises to an AWS environment, including:
- AWS Database Migration Service: Automates the migration of databases to AWS by reducing the effort and complexity of the process.
- AWS Schema Conversion Tool: Helps convert database schemas from source to destination database engine, making it easier to move databases to AWS.
- AWS Direct Connect: Provides a dedicated network connection between Amazon Web Services and on-premises data centers, providing a fast and secure way to move data to the Cloud.
- AWS Storage Gateway: Provides a hybrid cloud storage solution, allowing businesses to store data in AWS while keeping existing applications and processes intact.
- AWS CloudFormation: Automates infrastructure deployment, including databases, making managing and scaling resources in the cloud easier.
- AWS Partner Network: Helps businesses with database migration, including database experts and consulting firms.
- AWS Customer Support: Provides 24/7 customer support, including help with database migration, ensuring that businesses can get the help they need to migrate successfully to the cloud.
- SQL Server 2022 Native Backups to AWS S3: Store your backups directly into the AWS S3 bucket for migrations.
What is AWS Migration Hub Orchestrator?
AWS Migration Hub Orchestrator is a feature in AWS Migration Hub that enables you to automate and simplify migrating multiple applications to the AWS Cloud. It helps to streamline and simplify the migration process, reducing the time, cost, and risk associated with cloud migration. With AWS Migration Hub Orchestrator, you can automate the discovery and assessment of on-premises workloads, track migration progress, and manage dependencies between migrations.
AWS Migration Hub Orchestrator integrates with other AWS migration services such as AWS Application Discovery Service and AWS Server Migration Service to provide a unified view of the migration process and help ensure a successful migration to the cloud.
It supports the following templates for migration:
- Replatform SQL Server to Amazon RDS: Replatform the on-premises SQL Server to Amazon RDS with a native backup and restore method.
- Rehost SQL Server to Amazon EC2: Rehost the on-premises SQL Server to Amazon EC2 instance with native backup and restore method.
- Rehost applications to Amazon EC2: Rehost applications running on Windows and Linux OS to Amazon EC2.
- Migrate SAP NetWeaver: Automate the SAP NetWeaver application such as S/4HANA, BW/4HANA, and ECC on HANA running on the SAP HANA database to the AWS environment.
- Import Virtual Machine Images to AWS: Helps to import Open Virtual Appliance (OVA) or Virtual Machine Disk (VMDK) to Amazon EC2 Amazon Machine Image (AMI).
What is the Migration Hub Orchestrator for SQL Server?
The Migration Hub Orchestrator for SQL Server is a solution that automates the process of migrating large amounts of data from SQL Server to AWS, reducing the time and effort required. It also helps businesses maintain data consistency, minimizing downtime and data loss during migration.
AWS Migration Hub Orchestrator supports the following:
- SQL Server 2014 or later versions.
- Both Windows and Linux operating system versions.
- Enterprise, Standard, Web, Express, and Developer editions.
- Migration to Amazon RDS service or EC2 instance.
- Bring Your Own (for EC2) and License included (EC2 and RDS).
- Backup to S3 and restore to EC2 or RDS.
- Full and differential backups.
- Instance-level or database-level migration.
- Migration includes user database, logins, and agent jobs.
- Transparent Data Encryption (TDE) enabled databases.
Get Started with Migration Hub Orchestrator
Step 1: Discovery and Application Definition
This step involves discovering infrastructure and applications using either AWS Application Discovery Service or an import template. Further, you can group the applications and configure the AWS Migration Hub Orchestrator Plugin.

The Amazon EC2 instance will be used as an on-premises SQL Server instance for this demo.
Next, configure the AWS Migration Hub Orchestrator Plugin, which is responsible for orchestrating the actions defined in the migration workflow. You can download the plugin OVA file from the Migration Hub -> Orchestrate -> Get Started and click Download Plugin. Create the VM server using VM import in the on-premises setup of downloading the OVA file and register the plugin. The plugin registration includes configuring IAM permissions, IAM profile, vCenter configurations, and source server configurations.

For this demo, the following EC2 instance was created, and the orchestrator plugin was registered, as shown below.

Step 2: Create a Migration Workflow
This step configures a workflow template to orchestrate the migration process.
Note: You must use AWS Direct connect to use the templates. If you need to use the template without the direct connect, send an email to [email protected] with the AWS A/C number and region.
Click on Create Workflow under the Orchestrate tab of the migration hub.

Step 2.1: Rehost SQL Server Databases on Amazon EC2.
The workflow templates migrate the on-premises SQL Database to the Amazon EC2 instance.
Prerequisites:
The source and target environments must meet the following requirements to use the workflow template - Rehost SQL Server databases on Amazon EC2.
Source (On-premises):
- You must connect to the Windows machine using the account with sysadmin permissions on the SQL Server instance.
- PowerShell enabled.
- Install AWS tools on the SQL Server instance with the following command:
Install-Module -Name AWS.Tools.Installer
- Create an IAM policy with permissions on the S3 bucket and KMS.
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "s3:PutObject", "kms:GenerateDataKey", "kms:CreateKey" ], "Resource": "*" } ] }
- Install the DBA tools PowerShell module.
Install-Module dbatools
Target (AWS) Environment:
- If you bring your own SQL Server licenses to AWS, you need to use your own image. You can use MHO VM Import template to import your SQL Server to AWS..
- You can use the AWS launch wizard to deploy the target SQL Server instance.
- You need to attach the AWSMigrationHubOrchestratorInstanceRolePolicy to the target environment EC2 instance.
- Use AWS secret manager to create users in the target SQL Server instance.
Migration Workflow
Choose the workflow template - Rehost SQL Server databases on Amazon EC2. Click Next.
Enter the workflow name without any special characters.

Select the application discovered using the AWS discovery service or imported using the template.

If you have TDE enabled database, tick the checkbox - "I have transparent data encryption (TDE) enabled for SQL Server encryption." It will back up and restore TDE certificates required for TDE databases.

Specify the name of the SQL Server databases you want to migrate. For this demo, the sample database, AdventureWorks2019, will be migrated.

Next, select the target AWS ADS Server ID for the application.

The Orchestrator plugin requires the AWS CLI-named profile created using the predefined step. Enter the named profile for AWS CLI.
Enter the source SQL Server name and backup location in the source server. The source server should have sufficient free space for database backups.

Target Environment Configuration
You can configure the target environment migrations with the following options:
- Restore logins: Choose this option to restore logins during migrations.
- Restore agent jobs: Choose this option to restore the SQL Server agent jobs.
- Differential Migration: Use this option for an extensive or critical database where a differential backup is taken before migration to save the migration time.
Enter the target EC2 instance ID, a secret name for SQL connection from AWS secret manager, the Target SQL Server instance name, the Target backup path, the log path, and the target data path, as shown below.

Review the AWS migration hub workflow and start creating the migration workflow.

Open the deployed workflow to view its details and migration workflow steps.

Scroll down and view the steps the migration workflow will follow. As shown below, except for the step "Mark source environment read-only," all other steps are automated. It ensures customers mark their on-premises database in a read-only state considering all business approvals if required.

Step 2.2: Replatform SQL Server Databases on Amazon RDS
The source and target environments must meet the following requirements to use the workflow template - Replatform SQL Server databases on Amazon RDS.
Source Environment (On-premises):
- Same requirements as specified in Step 2.1
Target Environment (AWS):
- RDS SQL Server must have the same SQL Server version as of source SQL Server
- You must configure a new parameter group in RDS SQL Server similar to the source SQL Server.
- Create an EC2 instance and instance role and do the following:
- Attach the below policies to the instance role
- AWSMigrationHubOrchestratorInstanceRolePolicy
- AmazonSSMManagedInstanceCore
- Add the permissions for the S3 bucket.
- Attach the below policies to the instance role
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "s3:ListBucket" ], "Resource": [ "arn:aws:s3:::migrationhub-orchestrator-*", "arn:aws:s3:::aws-migrationhub-orchestrator-*/*" ] } ] }
- Configure an option group for RDS instance for the backup, restore, and Transparent data encryption. Check out this tip, SQL Server Native Backup and Restore in Amazon RDS, for the detailed steps.
{ "Version": "2012-10-17", "Statement": [ { "Sid": "VisualEditor0", "Effect": "Allow", "Action": [ "kms:Decrypt", "s3:ListAllMyBuckets", "kms:DescribeKey" ], "Resource": "*" }, { "Sid": "VisualEditor1", "Effect": "Allow", "Action": [ "s3:ListBucket", "s3:GetBucketAcl", "s3:GetBucketLocation" ], "Resource": [ "*" ] }, { "Sid": "VisualEditor2", "Effect": "Allow", "Action": [ "s3:PutObject", "s3:GetObject", "s3:AbortMultipartUpload", "s3:ListMultipartUploadParts" ], "Resource": [ "*" ] } ] } { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "Service": "rds.amazonaws.com" }, "Action": "sts:AssumeRole" } ] }
- Create a secret in the AWS secret manager, and its name should begin with migrationhub-orchestrator-secretname123
Migration Workflow
To migrate SQL Server Database to the RDS instance, choose the workflow template - Replatform SQL Server Databases on Amazon RDS. The source and target environment configuration remains similar, except this RDS template requires you to input the RDS endpoint.

You must configure the Amazon RDS instance for the option group SQLSERVER_BACKUP_RESTORE. Check out this tip, SQL Server Native Backup and Restore in Amazon RDS, for detailed steps.
Step 3: Run
In this step, the AWS Migration Hub Orchestrator migrates the application. You can select the deployed workflow and click Run to start the migration. It asks for user confirmation before running the migration.

Once the migration workflow completes, you can connect to the Amazon EC2 or RDS instance to validate the migrated databases.
Pricing for AWS Migration Hub Orchestrator
Using the AWS Migration Hub Orchestrator is free. AWS just charges for the deployed resource for migrations.
Summary
In conclusion, AWS Migration Hub Orchestrator is a powerful tool for streamlining and automating migration processes to the AWS cloud. Its ability to manage multiple migration projects, track migration progress, and provide insights into the migration process can help organizations simplify and accelerate their cloud migrations. Additionally, its integration with other AWS migration services, such as AWS Application Discovery Service, AWS Server Migration Service, and AWS Database Migration Service, makes it a comprehensive solution for all migration needs. Whether you're migrating applications, databases, or infrastructure, AWS Migration Hub Orchestrator can help achieve your migration goals more efficiently and effectively. Overall, the AWS Migration Hub Orchestrator can be a valuable asset for businesses looking to transition to the cloud.
Next Steps
- Refer to this AWS documentation for learning more about AWS Migration Hub Orchestrator.
- See a demo from this webcast: Learn How to Simplify SQL Server Migrations to AWS.
MSSQLTips.com Product Spotlight sponsored by AWS makers of the AWS Migration Hub Orchestrator.
About the author

View all my tips
Article Last Updated: 2023-02-14