Microsoft Workloads on AWS

Convert licenses of SQL Servers migrated with AWS Application Migration Service

In this blog post, I will show you how to convert Microsoft SQL Server licenses to an AWS provided license included using post-launch settings in the AWS Application Migration Service (AWS MGN).

When you are migrating your SQL Servers to Amazon Web Services (AWS), you have a variety of options for using new and existing Microsoft software licenses on the AWS Cloud. By purchasing Amazon Elastic Compute Cloud (Amazon EC2) or Amazon Relational Database Service (Amazon RDS) license-included instances, you get new, fully compliant Windows Server and SQL Server licenses from AWS. Your existing licenses may be used on AWS with Amazon EC2 Dedicated HostsAmazon EC2 Dedicated Instances, or Amazon EC2 instances with default tenancy using Microsoft License Mobility through Software Assurance.

With AWS MGN, you can quickly realize the benefits of migrating applications to AWS with minimal changes and downtime. By default, SQL Servers migrated with AWS MGN show up as a bring your own licenses (BYOL) license type. And in the past, post migration, you could use either the AWS License Manager or the AWS Command Line Interface (AWS CLI) to convert the license type of eligible SQL Server instances. But now, you can use AWS MGN’s post-launch settings to convert the licenses as the source servers are migrated to AWS.

Solution overview

AWS MGN allows you to perform various predefined post-launch actions on Amazon EC2 launched instances. These out-of-the-box actions in the post-launch settings can be used to modernize servers while migrating: change the existing license, upgrade the operating system, configure disaster recovery, and more. With the recently released SQL Server license conversion post-launch action, you can easily convert SQL Server on Windows BYOL to an AWS SQL Server license included.

AWS MGN does the following:

  • Checks the SQL edition (Enterprise, Standard, or Web) as part of the launch process.
  • Uses the right Amazon Machine Image (AMI) with the right billing code to launch from.

Prerequisites

Please note that Windows Server and SQL Server must meet certain requirements to be eligible for license type conversion. AWS License Manager supports Enterprise, Standard, and Web editions for SQL Server versions 2012 through 2022. Windows Server as BYOL with SQL Server as license included is an unsupported configuration.

Usage operation values applicable for Windows Server and SQL Server licensing:

A license type conversion changes the usage operation value associated with an Amazon EC2 instance. Usage operation values for each supported operating system are provided in Figure 2. For more information, see Eligible license types for Windows and SQL Server.
Usage operation values for licensing

Figure 2: Usage operation values for licensing


Walkthrough

Before migrating any servers using AWS MGN, you will activate and configure default post-launch actions that allow target servers to automatically integrate with AWS Systems Manager (SSM). This will enable SSM-initiated actions and automations.

Activate post-launch actions

The setting displayed in Figure 3 controls whether post-launch actions are activated or deactivated. Leave the Install System Manager agent and allow executing actions on launched servers option toggled to enable post-launch actions. Toggling the option off will disallow AWS MGN from installing the AWS Systems Manager Agent on the servers and result in no execution of post-launch actions.
Activating post-Launch actions

Figure 3: Activating post-Launch actions

For this solution, activate the post-launch actions:

  • Navigate to the Source servers page and select a source server.
  • Click Post-launch template > Edit.
  • On the Edit post-launch template screen. Activate the toggle and click Save settings.

Deploy post-launch actions
Figure 4 shows three deployment options. You can choose whether to perform the post-launch actions on cutover instances, on test instances, or on both cutover and test instances.
Deploying post-launch actions

Figure 4: Deploying post-launch actions

When you are ready to migrate SQL Servers with AWS MGN (Figure 5), navigate to the Post-launch actions settings tab of the specific source server, choose the action Windows MS-SQL License conversion, and click the Edit button.
Post-launch Settings for specific source server

Figure 5: Post-launch Settings for specific source server

In the Edit action window, the text in the boxes is populated by default based on the selection made in the previous page. All that is required is to click on Activate this action, as shown in Figures 6 and 7:
Post-launch settings1

Figure 6: Post-launch settings
Post-launch settings2

Figure 7: Post-launch settings

Leave the rest of the parameters with default values, and click the Save action button.

After saving, the two actions in Post-launch settings will show as Active, as shown in Figure 8:
Post-launch settings now seen as Active

Figure 8: Post-launch settings now seen as Active

Activate the post-launch actions for all servers
Alternatively, these settings can be made at the AWS MGN settings level, which will apply to any SQL Server instance that is being migrated.

As shown in Figure 9, navigate to the Settings page and choose Post-launch template. This will only need to be done once and the change will apply to all the source servers and will also apply to servers added prior to this change, provided they were not launched already.
Post-launch settings for all servers

Figure 9: Post-launch settings for all servers

After the post-launched actions have been activated from the template, deactivate and activate them for individual servers. For more information, refer to Activating post-launch settings.

After launching the final Amazon EC2 instance with AWS MGN, the Usage operation field will display the correct value of RunInstances:0102 in the Amazon EC2 console, as illustrated in Figure 10. Refer to Eligible license types for Windows and SQL Server for further details on the usage operation/billing code.
Amazon EC2 Console displaying updated usage operation

Figure 10: Amazon EC2 Console displaying updated usage operation

Following the conversion and migration, perform license verification with AWS Systems Manager to verify the usage operation code is set as expected. This is accomplished by running the AWSMigration-VerifySqlAWSSubscription automation document against the SQL Server instance, as illustrated in Figures 11 and 12. This will identify if the usage operation matches the installed SQL Server edition. For more information, refer to Running automations.
Validation of usage operation with AWS Systems Manager

Figure 11: Validation of usage operation with AWS Systems Manager
Execution details of the validation automation in AWS Systems Manager

Figure 12: Execution details of the validation automation in AWS Systems Manager

Conclusion

In this blog post, I have presented options to perform licensing-related operations in parallel with server migration instead of performing it as a post-migration task. With AWS MGN’s Post-launch settings template, this can be done both at a global and a single server level. In addition, this post covered the steps to verify that the expected usage operation code has been set. Performing these actions saves time in post-migration efforts with license conversions.

AWS has significantly more services, and more features within those services, than any other cloud provider, making it faster, easier, and more cost effective to move your existing applications to the cloud and build nearly anything you can imagine. Give your Microsoft applications the infrastructure they need to drive the business outcomes you want. Visit our .NET on AWS and AWS Database blogs for additional guidance and options for your Microsoft workloads. Contact us to start your migration and modernization journey today.


Aruna Gangireddy

Aruna Gangireddy

Aruna Gangireddy is a Database Consultant with AWS Professional Services with around 19 years of experience working with different Microsoft technologies. Her specialty is in SQL Server and other database technologies. Aruna has in depth AWS knowledge and expertise in running Microsoft workloads on AWS and enabling customers with homogeneous and heterogeneous migrations between onprem and AWS Cloud.