Deploy The Lab Base Infrastructure
In this section, we will build out a Virtual Public Cloud (VPC)
, together with public and private subnets across two Availability Zones
, Internet Gateway
and NAT gateway
along with the necessary routes from both public and private subnets.
This VPC will become the baseline network architecture within which the application will run. When we successfully complete our initial stage template deployment, our deployed workload should reflect the following diagram:
To deploy the template for the base infrastructure build follow the approptiate steps:
1.1. Get the Cloudformation Template.
To deploy the first CloudFormation template, you can either deploy directly from the command line or via the console.
You can get the template here.
Click here for CloudFormation command-line deployment steps
Command Line Deployment:
To deploy from the command line, ensure that you have installed and configured AWS CLI with the appropriate credentials.
1.1.1. Execute Command
aws cloudformation create-stack --stack-name pattern3-base \
--template-body file://pattern3-base.yml \
Note: Please adjust your command-line if you are using profiles within your aws command line as required.
Confirm that the stack has installed correctly. You can do this by running the describe-stacks command as follows:
aws cloudformation describe-stacks --stack-name pattern3-base
Locate the StackStatus and confirm it is set to CREATE_COMPLETE as shown here:
Take note of this stack output as we will need it for later sections of the lab.
Click here for CloudFormation console deployment steps
If you need detailed instructions on how to deploy CloudFormation stacks from within the console, please follow this guide.
pattern3-base as the Stack Name, as this is referenced by other stacks later in the lab.
1.2. Note Cloudformation Template Outputs
When the CloudFormation template deployment is completed, note the outputs produced by the newly created stack as these will be required at later points in the lab.
You can do this by clicking on the stack name you just created, and select the Outputs Tab as shown in diagram below.
You can now proceed to Section 2 of the lab where we will build out the application stack.
END OF SECTION 1