We discuss creating security groups.
What is a VPC
We cover a bit about what VPCs are before diving into the nuts and bolts.
The Default VPC
We explore the default VPC in our region of choice (us-east-2 for me).
IP Addressing
We see how to handle IP addresses when creating a VPC and thinking about the subnets.
Creating Subnets
We get a bit more in-depth on creating subnets and choosing their IP address ranges.
About VPC Gateways
We explore Internet Gateways and NAT Gateways to see how they help us create private and public subnets.
Creating a VPC
We see how to create a VPC in Terraform.
Private vs Public Subnets
We create one server in a public subnet and one server in private subnet.
EC2 Essentials
We create a server in the EC2 web console to get a sense for what this course will cover.
EC2 Instance Types
We review the various EC2 instance types.
T3 CPU Credits
We talk about T class instances (T3 in this case), and go in-depth on CPU credits.
Instance Configurations
We cover the options available when configuring an EC2 instance in the web console.
Selecting Disk Types
We talk about the storage options you have when creating EC2 instances.
Security Groups
SSH Key Pairs
We discuss creating and using SSK Key Pairs in AWS so we can SSH into our instances.
EC2 Dashboard Review
We discuss the various areas in the EC2 control panel, describing what they are used for.
EC2 with Terraform
We create an EC2 instance in Terraform.
The Server Base Image
We cover the AMI (Amazon Machine Image) used to create a server image. This server image has everything we need to run our application as either a web server or queue worker.
Introducing Launch Templates
We cover what a Launch Template is within AWS, and why we would use them to help auto scale EC2 servers.
We create a few security groups needed for our use case - web servers behind load balancers, and queue worker servers.
User Data Scripts
We're just about ready to create our Launch Templates. We'll start by creating some User Data scripts, which run when the server is first booted up.
Launch Templates
We complete the Launch Template configuration.
Using our Launch Templates
We use our new Terraform module to create 2 Launch Templates. One Launch Template will be for our web servers, while another is for queue worker servers.
Launch an Instance
We check out the servers created by our Launch Templates by using them to spin up an EC2 instance.
Auto Scaling Groups
We learn about what Auto Scaling Groups are, and a little bit about how they operate.
Creating Auto Scaling Groups
We see what it looks like to create an ASG in the web UI, and explore the areas of the ASG web UI.
ALB Health Checks
I created a Load Balancer to demonstrate how ASG's can integrate with them. In this case, the ALB can tell the ASG when an instance has failed a health check, which lets the ASG know to replace the failed instance.
ASGs in Terraform
We see how to create our Auto Scaling Groups in Terraform.
Application Load Balancer
We create an Application Load Balancer in Terraform.
ASG Lifecycle
We update our Auto Scaling Group for use with a load balancer.
Target Tracking Auto Scale Policy
We create our first Auto Scaling Policy - a Target Tracking policy to keep our average CPU usage to a certain target.
CloudWatch
We quickly cover what CloudWatch is, and how it's used with Auto Scaling Policies.
Introducing CodeBuild
We show a created CodeBuild project, review it's configuration, and see what it looks like to run a build using the buildspec file!
Elements of a CodeBuild Project
We cover all the options presented to you when creating a CodeBuild project within the UI and as a Terraform resource.
CodeBuild in Terraform
We create our CodeBuild project using Terraform, quickly cover the BuildSpec file, and get up and running!
CodeBuild Artifacts
We adjust our CodeBuild project to use it's built-in artifact handler, and then describe why we won't be using it.
Manually Creating Artifacts
We update the sample application, adding a script which creates a build artifact.
Secrets from Parameter Store
We generate our .env file with the help of Parameter Store, where we can store secrets.
Introducing CodeDeploy
We see a Deployment Application in action, and cover what we'll do in this module to get our deployments working.
The CodeDeploy Agent
To use CodeDeploy, our EC2 servers will need the CodeDeploy agent installed onto them. We'll see how to do that.
Disable the Auto Scaling Policy
We disable the auto-scaling policy to better see deployments work on multiple servers.
Server Instance Profile
The servers being deployed to need permissions to do certain things, such as download a build artifact from S3.
Defining a CodeDeploy Project
We begin to define our CodeDeploy Application
Defining a CodeDeploy Group
We complete our CodeDeploy configuration, covering the more complex portion of our configuration
Creating the AppSpec File
We create the appspec.yml file in the Sample Repository
Deploying Manually
We kick off a deployment manually to test everything out and see how it works.
A Note on Database Migrations
We take a quick second to discuss how to handle database migrations.
Automating Deployments
We update or BuildSpec in order to automate when the CodeBuild project starts a deployment.
Why Refactor
We discuss why we want to refactor our Terraform configuration.
Destroying Current Infrastructure
We'll destroy our current infrastructure to make it easier to refactor. We hit a hiccup with deleting an S3 bucket.
Refactoring Terraform Environments
We begin refactoring our Terraform configuration, setting it up to handle multiple environments.
The Shared Environment
We setup the shared environment, which is where we will put the CodeBuild project.
Updating the Main Environments
We update our staging/production environments so they know about the artifact bucket, which was created in the shared environment.
Creating a Helper Script
We create a helper script to remove some boiler plate from our Terraform commands and make our lives a bit easier.
Refactoring the Automated Deployments
We finish by refactoring our automated deployments, ensuring we only build and deploy the application when we want to.
Simple Auto Scaling Review
You did it! We review what we learned in the Simple Auto Scaling course.
Sign up to learn when new content is released! Courses are in production now.