Cost optimization with SQL BYOL using license included Windows instance on Amazon EC2 Dedicated Hosts
Do you want to bring your eligible SQL Server licenses to use on AWS? Do you have SQL Server licenses but not accompanying Windows Server licenses? Are you worried that you do not have Software Assurance for SQL Server? You can now run license included Windows Server instances on Amazon EC2 Dedicated Hosts, which makes it possible for you to use fully compliant Windows Server software licenses from AWS with a pay-as-you-go model. In this blog post, we share a solution that gives you the flexibility to run SQL Server on a Windows Server license included instance on an EC2 Dedicated Host.
Specifically, we cover the following:
- Purchase license included Windows Server instances on Amazon EC2 Dedicated Hosts.
- Bring your SQL Server license to the same Dedicated Host, even if you don’t have Software Assurance. The use case in this post is one in which you don’t have eligible Windows Server licenses to bring, but you do have eligible SQL Server licenses that do not have Software Assurance.
- Optimize your total cost of ownership (TCO).
- A core or processor based license for SQL Server Enterprise Edition or SQL Server Standard Edition.
- Permissions in your AWS account to access the AWS Management Console, AWS License Manager, and Amazon Elastic Compute Cloud (Amazon EC2).
You can bring your existing Microsoft Windows Server licenses on Amazon EC2 Dedicated Hosts if you purchased your Microsoft Windows Server license before October 1, 2019 (or purchased it as an Enterprise Agreement that was effective before October 1, 2019). Any new Windows Server license purchased after that date is not eligible.
On April 7, 2020, AWS announced a solution that allows you to enjoy the flexibility and cost-effectiveness of running license included Windows Server instances on EC2 Dedicated Hosts. You can use the Windows Server Amazon Machine Images (AMIs) provided by Amazon to run the latest versions of Windows Server on Dedicated Hosts. These Windows Server AMIs can be used through the AWS Management Console, AWS APIs, and AWS CLI in all AWS Regions except the China Regions.
Let’s consider a scenario where you already purchased a SQL Server Enterprise or Standard Edition license and you don’t have active Software Assurance. Follow these steps to provision a SQL Server instance on Dedicated Hosts with fully compliant Windows Server software licenses from AWS.
- Create and configure host resource groups. After you complete this step, you should have license included Windows Server instances running on an EC2 Dedicated Host and the license configuration configured to track the license usage.
- Create a license configuration and attach a Windows Server AMI available from AWS Marketplace. Choose the Windows Server version that is compatible with the SQL Server workloads to be installed on the Windows Server instance.
- Create a host resource group specifying how you want EC2 to manage your Dedicated Hosts. You can select instance types based on the instance family of the Dedicated Host. In this blog post, we use the c4 instance family.
- If you select a Nitro-based instance family, you can mix and match different instance sizes in the same instance family (for example, r5.xlarge and r5.large). See Getting Started for instance configuration details like disk and security group required to launch the instance.
For information about steps a-c, see the Simplified BYOL experience using AWS License Manager blog post.
- Install SQL Server workloads.
- Install SQL Server using your own installation media. Copy the SQL Server installation media to the Windows Server instances you created in step 1.
- Use RDP to connect to the EC2 instance and install SQL Server using your own installation media. Use your BYOL license on the license included Windows Server instance.
- Connect to the SQL Server instance using SQL Server Management Studio.
Figure 1: Connect to SQL Server using SQL Server Management Studio
For more information, see the Best Practices for Deploying Microsoft SQL Server on AWS white paper.
You have successfully installed SQL Server on a Windows AMI and connected to SQL Server using your own licensed version on a Dedicated Host.
Figure 2: Windows Server instances running on Dedicated Hosts
As you can see in Figure 3, we have installed SQL Server on one of the EC2 instances running on the Dedicated Host.
Figure 3: Connect to SQL Server using SQLCMD tool
You can track your license usage using your license configuration. For more information, see the Track your Microsoft SQL Server license using AWS License Manager blog post and the Manage Software Licenses with AWS License Manager video on YouTube.
Dedicated Host pricing varies by instance family, AWS Region, and payment option, so you can select the optimal configuration for your target workload. You pay for each Dedicated Host on a per-hour basis, irrespective of the number of instances you run on the host. For more information, see the Amazon EC2 Dedicated Hosts Pricing page.
Windows Server AMIs
You can use Windows Server AMIs provided by Amazon to run the latest versions of Windows Server on Dedicated Hosts. You will launch Windows Server license included AMIs on Dedicated Hosts. For more information, see the Dedicated Hosts pricing page.
If you have a SQL Server license for 32 cores, and you use an r5 Dedicated Host with a Windows Server license included AMI, you only need to pay for a Dedicated Host and Windows Server AMI. For example, if you use a Windows Server AMI to run a r5.8large instance (32 vCPUs) on a host, then you are billed $2.14 per hour for the instance in addition to the charge associated with the R5 Dedicated Host. This price is same across all AWS Regions.
|Instance Type||SQL Server EE on EC2 LI||Dedicated Host with SQL BYOL||Windows AMI LI||Total SQL Server (BYOL)|
Based on this example, BYOL on a Dedicated Host for SQL Server Enterprise Edition is 49% cost-efficient. You would pay $5,429.94 to run a SQL Server 8xlarge instance on a Dedicated Host with a Windows LI AMI for 730 hours per month.
* This price is accurate as of March 31, 2021 for the Canada Region (ca-central-1). The price is subject to change.
In this blog post, we shared a scenario in which you have SQL Server licenses eligible to run on Dedicated Hosts, but do not have an eligible Windows Server license to run the SQL Server workload. We showed you how to run your SQL Server workloads on a license included Windows Server instance on an EC2 Dedicated Host. An Amazon EC2 for Windows Server license included instance eliminates licensing overhead and enables you to rapidly provision the compute resources you need. For more details on license management in AWS, check out the AWS License Manager documentation.