EC2
Unit 2
When you use a laptop or computer to do things like take notes, do homework for school, browse the web, or possibly work from home, you’re using the software on that computer to perform those tasks. Microsoft Word, Google Chrome, and Zoom are all examples of software. They need a computer or device to run on. That’s where an EC2 instance comes in!
You can think of EC2 instances as AWS’s version of a laptop computer. Just like you’d need a laptop or other device to run software from inside your house, you’d need an EC2 instance or one of a few other similar AWS services to run software in the cloud. For example, parts of this course are being served as software inside an EC2 instance!
Table of contents
What you’ll learn
In this Unit, you’ll learn the basics of EC2 as well as how to launch an EC2 instance using terraform (like you did in the getting started project). Specifically, we’ll cover:
Launching an EC2 with terraform
- how to create key pairs (and what they are) and use terraform and variables to launch different EC2 instancesWeb server
- how toSSH
(and what it is) using the AWS Instance Connect feature to turn your EC2 instance into a web serverInstance types
- what types are available and how to determine which to useAMIs
- what they are, how to use them and how they’re differentEBS volumes
,IP Addresses
, andsnapshots
- what they are, different types, and how they relate to EC2Security Groups
- what they are, how to deploy them, and how they relate to EC2
Some AWS basics
Regions
AWS owns servers all over the world. These physical servers are separated into regions
. Regions
are physical areas that you will designate to determine where your resources are deployed. The US has servers in four regions
: us-east-1
(N. Virginia), us-east-2
(Ohio), us-west-1
(N. California) and us-west-2
(Oregon). It is important you always keep in mind which region
you are deploying resources to, as many things depend on it. Throughout this course, we will use us-east-1
.
Availability Zones
Inside AWS regions
, there are availability zones
. Availability zones
are multiple, isolated locations within each region
. Most clients will want infrastructure that is highly available
, and while a lot goes into the best practices surrounding high availability, a good place to start is making sure a client’s infrastructure spans at least two availability zones. You’ll learn more about this later! For now, just know that the following availability zones
are available in the below regions
:
- In
us-east-1
, there are6
availability zones (denoted witha-f
, ieus-east-1a
,us-east-1b
, etc). - In
us-east-2
, there are3
availability zones (denoted witha-c
, ieus-east-2a
,us-east-2b
, etc). - In
us-west-1
, there are3
availability zones (denoted witha-c
, ieus-west-1a
,us-west-1b
, etc). - In
us-west-2
, there are4
availability zones (denoted witha-d
, ieus-west-2a
,us-west-2b
, etc).
IP Addresses
We will be navigating to EC2 servers’ IP addresses frequently, so it’s a good idea for you to have a high-level understanding of what they are. IP addresses are MATT INSERT INFO HERE.
Table of contents
- Basic EC2
- Web Server EC2
- Variables
- Terraform Variables
- AMIs
- Instance Types
- Everything Else EC2
- Intermediate EC2
- Basic Security Groups
- Intermediate Security Groups
- Advanced Security Groups
- EC2 Quiz