Initialize CloudFormation Template

Initialize CloudFormation Template

In this step, you will build the network infrastructure in AWS. In this section, you’ll leverage the template from AWS Quick Start to build a secure and high availability (HA) network infrastructure using AWS CloudFormation. This is the architecture that will be built from the template.

Launch CloudFormation

Step 1: Download template from GitHub

Launch CloudFormation Before creating the stack, you need to download the CloudFormation template from GitHub repository:

  1. Access GitHub repository: https://github.com/quywork62/000010-HybridDNS-Route53-Template.git
  2. Download the template file to your computer or clone the repository:
    git clone https://github.com/quywork62/000010-HybridDNS-Route53-Template.git
    

Step 2: Login to AWS Management Console

  • Find and select CloudFormation in AWS Management Console.

Launch CloudFormation

Step 3: Create CloudFormation stack

  1. In the CloudFormation interface, select Create stack.

Launch CloudFormation

  1. In the Create stack interface:

    • Prepare Template: Template is ready
    • Template Source: Select Upload a template file
    • Select Choose file and upload the template file downloaded from GitHub
    • Select Next.

Launch CloudFormation Launch CloudFormation

  • Select Next. Launch CloudFormation
  1. Configure the stack:

    • In Stack name, enter HybridDNS.
    • In Availability Zones, select ap-southeast-1a and ap-southeast-1c.

Launch CloudFormation

  1. Configure Network:

    • In VPC CIDR, Private Subnet 1 & 2 CIDR, and Public Subnet 1 & 2 CIDR, keep the default values.
    • In Allowed Remote Desktop Gateway External Access CIDR, enter 0.0.0.0/0.

Launch CloudFormation

This configuration allows any IP address to access the RDP port of the EC2 instance to be created. This is not a secure configuration and should not be used in production environments. We will adjust access permissions after the CloudFormation template deployment is complete.

  1. In Amazon EC2 configuration step:

    • In Key Pair Name, select the previously created Key Pair (hybrid-DNS).
    • In Remote Desktop Gateway Instance Type, keep the default value (t3.2xlarge).
    • In Number of RDGW Hosts, keep the default value (1).
    • In Admin User Name, keep the default value (StackAdmin).
    • Admin Password, set an easy-to-remember password for you.

Launch CloudFormation

The diagram above shows two RDGW hosts (one host per Availability Zone). For practice purposes, we start with one RDGW host to reduce CloudFormation initialization time. However, as shown in the diagram, you can see the RDGW host is deployed in an Auto Scaling Group. After the CloudFormation stack deployment is complete, you can try configuring the Auto Scaling group. Auto Scaling group is an important service that provides availability and scalability for your application.

  1. For other options, keep the default values and select Next.

Launch CloudFormation

  1. Keep the default configuration.

Launch CloudFormation

  1. Review the stack settings on the Review HybridDNS screen. Check the two checkboxes and select Next.

Launch CloudFormation

  1. Review and create Stack

At this step, you will review the entire CloudFormation stack configuration before creating it. Launch CloudFormation

  • After reviewing all information:
  • Click Submit to start creating the stack. Launch CloudFormation
  1. The template takes about 15 minutes to complete. During this time, we will review the components that the CloudFormation template will create. After the stack initialization process is complete, the stack status will change to CREATE_COMPLETE. Launch CloudFormation Launch CloudFormation