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

In this section, you will get hands-on experience with AWS CloudFormation to build network infrastructure.

  1. Login to AWS Management Console

    • Find CloudFormation
    • Select CloudFormation

Launch CloudFormation

  1. In the CloudFormation interface, select Create stack.

Launch CloudFormation

  1. In the Create stack interface

Launch CloudFormation

  1. Implement stack configuration

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

Launch CloudFormation

  1. Perform Network configuration.

    • 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 setting will allow any IP to remote into the RDP port of the EC2 instance that is about to be created. This is not a secure configuration and it is not recommended for deployment in production. We’ll come back and tighten access once CloudFormation has finished deploying the template.

  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 (t2.large).
    • 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 above Diagram shows two RDGW hosts (one host per Availablity Zone (AZ)). As a practice goal, we’ll start with an RDGW host to reduce CloudFormation’s initial run time. However, according to the diagram, you can see that the RDGW host is deployed to the Autoscaling Group. After the CloudFormation stack deployment is complete, you can try to configure the AutoScaling group. AutoScaling group is the key service that provides availability and scalability for your application.

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

Launch CloudFormation

  1. Select Next

Launch CloudFormation

  1. On the Review HybridDNS screen, check the settings again. Select the two checkboxes and select Create Stack.

Launch CloudFormation

  1. The template takes about 15 minutes to complete. In the meantime, we’ll take a look at what the CloudFormation template will create. After completing the stack initialization, the stack state will change to CREATE_COMPLETE.

Launch CloudFormation

  1. View Output of the newly created Stack.