Lab complete!
Now that you have completed this lab, make sure to update your Well-Architected review if you have implemented these changes in your workload.
Click here to access the Well-Architected Tool
In this section you will explore the CloudFormation template and learn how you were able to deploy the web application infrastructure using it
Go to the AWS CloudFormation console at https://console.aws.amazon.com/cloudformation
Alternate: You previously downloaded the CloudFormation Template staticwebapp.yaml. You can also view it in the text editor of your choice
The template is written in a format called YAML, which is commonly used for configuration files. CloudFormation templates can also be written in JSON.
Look through the template. You will notice several sections:
The Parameters section is used to prompt for inputs that can be used elsewhere in the template. The template is asking for several inputs, but also provides default values for each one.
InstanceType
is a parameter where the user can choose that Amazon EC2 instance type to deploy for the servers used in this Web App.!Ref InstanceType
. !Ref!
is a built-in function that references the value of a parameter. Here you can see it is used to provide a value to the Auto Scaling Launch Configuration, which is used to launch new EC2 instances.The Conditions section is where you can setup if/then-like control of what happens during template deployment. It defines the circumstances under which entities are created or configured.
The Resources section is the “heart” of the template. It is where you define the infrastructure to be deployed. Look at the first resource defined.
DynamoDBServiceMockTable
. This logical ID is how we refer to the DynamoDB table resource within the CloudFormation template.Type
which tells CloudFormation which type of resource to create. In this case a AWS::DynamoDB::Table
Properties
that define the values used to create the Amazon DynamoDB table.The Outputs section is used to display selective information about resources in the stack.
!GetAtt
to get the DNS Name for the Application Load Balancer.The Metadata section here is used to group and order how the CloudFormation parameters are displayed when you deploy the template using the AWS Console
Now that you have completed this lab, make sure to update your Well-Architected review if you have implemented these changes in your workload.
Click here to access the Well-Architected Tool