Deploy a High Availability SQL FCI on Amazon EC2

using Launch Wizard

Introduction

Customers have been running SQL Server on EC2 for over a decade. Manually deploying SQL Server requires considerable amount of planning and work. AWS Launch Wizard is a service that offers a guided way of sizing, configuring, and deploying AWS resources for third party applications such as Microsoft SQL Server without the need to manually identify and provision individual resources.

In this tutorial, you will learn how to create a highly available SQL Server Fail Over Cluster Instance in a multi AZ deployment using AWS Launch Wizard. You will also see how Launch Wizard provisions the AWS Service Catalog product which can further be used for automation of SQL Server builds. You will also see the options of deploying SQL Server on shared tenancy and on Amazon EC2 Dedicated Hosts.

You can start by creating an AWS Account and then follow the steps below to create a Microsoft SQL Server Standard edition Failover Cluster using Launch Wizard.

  • Log into the AWS Management Console and choose the Region where you want to create the database cluster
  • Open the AWS Launch Wizard console
  • Under the Fast and easy deployments click on Choose application button
  • Select SQL Server application and click Create deployment button

 

AWS Launch Wizard - Choose Application Screen

 AWS experience

Beginner

 Time to complete

20 minutes tutorial. Infrastructure provisioning times may vary.

 Cost to Complete

Depends on Infrastructure choices made during deployment. See EC2 and component pricing to estimate cost.

 Services Used

 Requires

You must be logged into an AWS account.

 Last updated

August 9, 2022

Create SQL FCI using AWS Launch Wizard Deployment Steps

  • If it does not exist already, AWS Launch Wizard tries to create the IAM Role name AmazonEC2RoleForLaunchWizard which comprises of the following two IAM managed policies:

    • AmazonSSMManagedInstanceCore &
    • AmazonEC2RolePolicyForLaunchWizard

    On the review permissions screen and on the prompt for IAM role creation check the permissions and roles including role name and role policy and click next.

     

    AWS Launch Wizard - Review permissions and IAM role
  • Next we will define the configuration and settings for the SQL Server FCI deployment using AWS Launch Wizard.

    a. Select the following options

    • Windows Operating System
    • High Availability Deployment
    • Always On Fail Over Cluster Instances
    • Storage Type - Amazon FSx for Windows File Server

    Also give your deployment a name e.g.  SQLFCIMAZ

    AWS Launch Wizard configure application settings

     

    b. Create an SNS Topic as shown below by specifying a topic name (e.g. SQLFCIMAZ-SNS).

    AWS Launch Wizard - Create an SNS topic configuration

     

    c. Select the option to enable rollback upon failed deployment . Also select the option to create AWS Service Catalog product which can be used for repeated deployments. Specify the S3 file path to store AWS CloudFormation templates created by the AWS Launch Wizard. 

    AWS Launch Wizard configure general application settings

     

    d. Under connectivity options select or create a Key Pair name (SQLFCIMAZ_KP) to allow secure connectivity to the EC2 instance.  Then select the tenancy model option to do shared tenancy or Dedicated Host (Dedicated Hosts give you a cost-effective option to bring over BYOL workloads subject to Microsoft licensing policies). Also create a new VPC(SQLFCIMAZ-VPC) or use an existing one. Choose to set up Remote Desktop Gateway and if using Dedicated Hosts click on create new Dedicated Host for primary and secondary instance and follow steps in the next screen shot.

    AWS Launch Wizard configure connectivity

     

    e. For Dedicated Hosts provide the following details

    • Name tag
    • Instance Family
    •  Instance Type
    • Availability Zone &
    • Quantity 

    (Additional information about Dedicated Hosts)

    AWS Launch Wizard configure dedicated host settings

     

    f. Create a new VPC and give it a name tag. Also check set up Remote Desktop Gateway option and choose My IP for Remote Desktop Gateway access as shown below.

    AWS Launch Wizard SQL Server configure VPC and RDG settings

     

    g. Provide a Domain DNS name for the AWS Managed Active Directory Instance as shown below. Also provide a user name and password for the SQL Service Account and select the appropriate AMI (e.g. License Included SQL Standard 2019 AMI).  You can also choose your own custom AMI for BYOL scenarios.
    AWS Launch Wizard SQL Server configure DNS Domain name and SQL AMI details
  • In this step, we will define the infrastructure requirements to be used while creating the database cluster.

    a. Select infrastructure options per your requirements for your database cluster as shown below.  You also have the option to define infrastructure based on instance types and you can use either of the R5, X1E or Z1D family of instances for SQL Server deployments based on your application's needs.

    AWS Launch Wizard configure Infrastructure settings

     

    b.  Provide tag names and values to associate with the resources as shown below and click next.

    AWS Launch Wizard Define Infrastructure based or instance type based install

     

    c. Review the summary page and if satisfied with your selections click deploy.

    AWS launch Wizard SQL Server Provide tag names for resources

     

    d. Review the deployment progress. It should show you the current status and estimated time to create the environment.

    AWS Launch Wizard SQL Review Summary and Deploy
  • You can now verify the installed components by clicking on the application name  SQLFCIMAZ under Deployments > MS SQL Server

    AWS Launch Wizard SQL Server - Verify installed components

     

    a.  Check SQLFCIMAZ application name and click on the Actions drop down menu. Then click and check out each of the resources for the EC2 SQL Nodes, RDGW Instance, SSM resource group and the CloudWatch application logs and CloudFormation template as shown below.

    AWS Launch Wizard SQL Server - Verify installed components
    AWS Launch Wizard SQL Server - Verify installed components
    AWS Launch Wizard SQL Server - Verify installed components
    AWS Launch Wizard SQL Server - Verify installed components
    AWS Launch Wizard SQL Server - Verify installed components

     

    b. Next search for the AWS Service Catalog service and look at the portfolio deployed by the AWS Launch Wizard ( AWS Launch Wizard Products). You can use the AWS Service Catalog Product to automate provisioning of your SQL Server Infrastructure.  (Additional information about  AWS Service Catalog).

    AWS Launch Wizard SQL Server - Verify installed components

     

    c. Click on the portfolio name AWS Launch Wizard Products and then click on the product and check out the template as shown in figure below.

    AWS Launch Wizard SQL Server - Verify installed components

     

    d. Connect to the SQL Server FCI nodes via the RDGDW instance and check out the SQL Server FCI instance deployed by Launch Wizard. Make note of the Amazon FSx drives provisioned for the instance. 

    AWS Launch Wizard SQL Server - Verify installed components

     

    e. Type Directory Service next to the services search bar and click on Directory Service.

    AWS Launch Wizard SQL Server - Verify installed components

     

    f. Make note of the AWS Managed Active Directory created by the Launch Wizard.

    AWS Launch Wizard SQL Server - Verify installed components
  • Refer to this documentation link for troubleshooting AWS Launch Wizard for SQL Server deployment.

  •  

    Please follow the below steps to clean up these resources and avoid incurring unintended charges.

    a. Navigate to AWS Launch Wizard > Deployments > MS SQL Server and select the application name ( SQLFCIMAZ) and click delete and then confirm once again when prompted to delete the application.

     

    AWS Launch Wizard SQL Server Tutorial Clean Up
    AWS Launch Wizard SQL Server Tutorial Clean Up

     

    b. Refresh SQL Deployment screen and verify that the Provisioning status shows Delete in progress and then Deleted after some time. 

    AWS Launch Wizard SQL Server Tutorial Clean Up

Congratulations!

You have launched and verified the several components that AWS Launch Wizard created behind the scenes to deploy a Microsoft SQL Server Database Fail Over Cluster Instance.  You looked at the EC2 instances, CloudFormation Template, CloudWatch Logs, Service Catalog Product , Managed Active Directory and other components  that the Launch Wizard created for you via the AWS Console in a graphical and interactive manner. This helps simplify and speed up deployment of highly available SQL database clusters in the cloud with few clicks providing your database administrators time to focus on more value added tasks.