AWS to Azure: Making the Move
Tags: azure, aws
Published: 2020-09-25 05:27:16

Both Amazon Web Services and Microsoft Azure are considered top [cloud computing companies](https://www.datamation.com/cloud-computing/cloud-computing-companies.html). However, there are certain aspects unique to each vendor, and many significant advantages that are driving organizations to move from AWS to the Azure cloud. 

This article examines the key factors organizations should consider when leaving AWS and migrating to Azure, including vendor lock-in, data portability, and differences in availability models.

Finally, the article looks at some of these advantages and explains the steps required to migrate AWS EC2 instances to Azure. Including explanations about setting up Azure site recovery and preparing a process server on AWS.

## AWS vs. Azure: Why Make the Move?
Here are some key advantages that may drive organizations to make the move from AWS to the Azure cloud:

* **Hybrid cloud capabilities**—Azure provides proven, robust tools to connect on-premise data centers to the cloud. For example, [Azure File Storage](https://cloud.netapp.com/azure-netapp-files) is highly useful for lift and shift migrations because it works with the SMB protocol.
* **Easier onboarding**—Azure is considered easier to use than AWS, especially for existing Microsoft users, and offers many services using a PaaS model to make adoption and migration easier for customers. Although AWS provides very powerful options and over 100 cloud services, it can take time to learn the environment and to become productive.
* **Azure Site Recovery (ASR)**—provides fully automated migration of workloads to Azure. In addition, your organization can easily back up data from any Windows device, on-premise or on Azure, to cloud storage using Microsoft Azure backup services. 
* **Strong native support for Microsoft products**—if you or your clients make extensive use of Microsoft products like Windows or Office, Azure is a natural choice.

## Steps to Migrate EC2 Instances from AWS to Azure
Microsoft Azure provides a structured, automated process for migrating your workloads from AWS to Azure. The process relies on Azure Site Recovery (ASR) and is analogous to protecting on-premise or cloud workloads with ASR and performing a failover. 

The process below refers to migrating workloads running on EC2. Ensure the EC2 instances are running one of the [supported operating systems](https://docs.microsoft.com/en-us/azure/site-recovery/migrate-tutorial-aws-azure).

### Step 1: Set Up Azure Site Recovery
Create an Azure account, set up billing and create infrastructure components on Azure. The first component you should set up is Azure Site Recovery (ASR), as it will guide your migration from AWS to Azure.

In the [Azure Portal](https://login.microsoftonline.com/common/oauth2/authorize?resource=https%3a%2f%2fmanagement.core.windows.net%2f&response_mode=form_post&response_type=code+id_token&scope=user_impersonation+openid&state=OpenIdConnect.AuthenticationProperties%3d5QkTpUygs_8I86tAuOC5uT3xSBAJnpvOXJbX2gTiWw43dc7c6ytrmrbnEm4OpVj1is55dzIbbAaFi5XfaHyiJVWNjWKx-lse_AJ6aHD2ySkqlO1cSUHDCWSuqpxFmTAF81cRwD-bJWjhDMflM99DJlfZuhtss5DPOvHUoNa0PKfdTnv6e7NlrXVJQwB1KJsDQImDXJ6dUlI4Ie-ynw9vmQO_F8OCYcmIOtQMJb6piIlqqDQRfFYJRzUyfWwqNREVgg8zEX95DnS0h78hp9b4fg&nonce=636993957530828439.ZjNhYjAwNGMtNzk4OS00NzZlLTkzY2ItMTJjNmQ0MjYwMmNmYjJlN2RkNTItYmM2Yi00NGQxLThhYzMtYzc4YjM0YTA3YTkz&client_id=c44b4083-3bb0-49c1-b47d-974e53cbdf3c&redirect_uri=https%3a%2f%2fportal.azure.com%2fsignin%2findex%2f&site_id=501430&client-request-id=0b412862-414c-42af-ad9c-60d877ab2cd2&x-client-SKU=ID_NET&x-client-ver=1.0.40306.1554), set a protection goal, define a source and target, define replication settings, and enable replication from your AWS instances to Azure.

### Step 2: Prepare a Process Server on AWS
You need to set up a special Azure component on Amazon EC2, which will automatically perform the migration to Azure. Deploy an EC2 instance and run an [Azure Process Server](https://docs.microsoft.com/en-us/azure/site-recovery/vmware-azure-manage-process-server) on it:
*The process server is used to receive, optimize, and send replication data to Azure during the migration process. 
*Take note of Microsoft’s guidelines for sizing and system requirements of the process server. 
*Ensure the process server has access to the EC2 instances running the applications you want to migrate. Microsoft recommends deploying the process server in the same subnet as the applications to be migrated.
*Ensure the EC2 instances you want to migrate are in the same AWS security group as the process server and are configured to allow inbound connections on TCP and UDP ports 135-139, 445, 1024-65535.
*Register the process server with the ASR configuration server.

### Step 3: Discover EC2 Instances and Replicate to Azure
In Azure Site Recovery, create a protection group and select the **Add Physical Machine** workflow. Identify all the Amazon EC2 instances you wish to migrate to Azure, using their private IP addresses to discover them. You can give each instance a friendly name so you can recognize it during the rest of the process. 

The EC2 instances you discovered in the previous step will now replicate to Azure. This can take a long time to run, depending on the size of the AWS instances, the network capacity and the resources available on the process server responsible for managing the replication. 

### Step 4: Failover EC2 Instances to Azure VMs
Once the EC2 instances have finished replicating, perform a **failover** action to migrate your AWS applications to Azure. Next, be sure to delete the original EC2 instances and disable protection on ASR, otherwise, you will incur costs both on AWS and on Azure for the old instances. 

 See the [ASR tutorial](https://docs.microsoft.com/en-us/azure/site-recovery/migrate-tutorial-aws-azure) for more details on how to migrate EC2 instances from AWS to Azure.
## Key Considerations when Migrating from AWS to Azure
**Vendor lock-in and data portability**
Do your applications heavily use Amazon services for storage, data processing, or service delivery? The more you rely on Amazon services, the more difficult migration is likely to be. Consider if your data is portable. Also, assess which Amazon storage services you rely on and whether their data formats are compatible with the Azure storage services you plan to migrate to. In some cases, you may have to convert or modify your data.

**The hidden cost of migration**
Most cloud providers, Amazon included, charge you a hidden “migration tax” when you migrate out of the platform. This might take the form of a data egress charge for data that leaves the public cloud environment. Check if there are egress charges for the specific Amazon services you are migrating away from and calculate your expected costs.

**Differences in availability models**
Consider the differences in geographical high availability models between AWS and Azure. AWS uses Availability Zones to run EC2 instances in more than one data centers for high availability. In Azure, there is locally-managed high availability via Availability Sets, and then at a second level, there are Regions which let you set up geo-redundant VMs. Check which of your current workloads use Availability Zones and consider which Azure high availability options they will need.

**Networking and connectivity**
Depending on your AWS setup, it may be complex to reconstruct the same networking setup on Azure. If you use Amazon VPC, learn about [Azure Virtual Networks](https://azure.microsoft.com/en-in/services/virtual-network/) and test to ensure you can ensure the same level of connectivity and security as you have today. In many cases you will need to make changes to the configuration, or even to the application code, to ensure connectivity works on the target cloud platform.

**Support for operating systems, platforms, languages and storage protocols**
Conduct an inventory of AWS workloads and ensure that all the operating systems, platforms, applications and programming languages are supported by the respective Azure services. See which file protocols your systems use—NFS, SMB, CIFS, etc. Anything that is not supported may need to be replaced, and this can increase the complexity of your migration.

**Selecting a cloud migration strategy**
Based on the previous considerations (and of course there are many other parameters), select one of Azure’s four migration strategies for each of your migrated applications:

* **Rehost / Lift and Shift**—move workloads from AWS to Azure as-is.
* **Refactor/Repackage**—make some changes to AWS applications to allow them to use Azure capabilities. This will be needed if your applications rely on Amazon services like RDS.
* **Reachitect**—rebuild your application for Azure. Might be required if your application is heavily reliant on Amazon services or uses platforms or systems not supported by Azure.
* **Rebuild**—decommission your AWS application and create a new application using Azure’s PaaS services.

## Azure Data Migration Service
Azure offers the [Database Migration Service](https://azure.microsoft.com/en-us/services/database-migration/) which provides a guided migration process for databases including SQL Server, Oracle, DB2, PostgreSQL and MySQL, with automated assessment of pre-migration steps, and migration at scale from multiple sources to a target data volume on Azure.