Compute Flashcards
EC2 - Acronym
Elastic Compute Cloud
EC2 - Simplified Definition
Think of EC2 as your basic desktop computer
EC2 - AWS Definition
Amazon Elastic Compute Cloud (Amazon EC2) provides scalable computing capacity in
the Amazon Web Services (AWS) cloud. Using Amazon EC2 eliminates your need to invest in
hardware up front, so you can develop and deploy applications faster. You can use Amazon
EC2 to launch as many or as few virtual servers as you need, configure security and
networking, and manage storage. Amazon EC2 enables you to scale up or down to handle
changes in requirements or spikes in popularity, reducing your need to forecast traffic.
EC2 Instance Common Purchasing Options
- On Demand
- Reserved
- Spot
EC2 Reserved Pricing - Attributes
Reserved purchasing allows you to purchase an instance for a set time period of one (1) or
three (3) years.
(1) This allows for a significant price discount over using on-demand.
(2) You can select to pay upfront. partial upfront, no upfront.
(3) Once you buy a reserved instance, you own it for the selected time period and are
responsible for the entire price - regardless of how often you use it.
EC2 Spot Pricing - Attributes
Spot pricing is a way for you to “bid” on an instance type and only pay for and use that
instance when the spot price is equal to or below your “bid” price.
(1) This option allows Amazon to sell the use of unused instances, for short amounts of
time, at a substantial discount.
(2) Spot prices fluctuate based on supply and demand in the spot marketplace.
(3) You are charged by hour.
(4) When you have an active bid, an instance is provisioned for you when the spot price i:
equal to or less than you bid price.
(5) Provisioned instances automatically terminate when the spot price is greater than
our bid price (you don’t pay for a partial hour if your instance is terminated due to the spot
price increasing above your bid price).
EC2 On-Demand Attributes
On-demand purchasing allows you to choose any instance type you like and
provision/terminate it at any time (on-demand).
(1) Is the most expensive purchasing option.
(2) Is the most flexible purchasing option.
(3) You are only charged when the instance is running (and billed by the hour).
(4) You can provision/terminate an on-demand instance at any time.
How are you charged for EC2
- Purchasing Options (on demand, reserved, spot)
- Instance Type (compute, gen purpose, GPU Optimized, Memory Optimized, storage-optimized).
- EBS Optimized
- AMI Type
- Data Transfer
- Region
T/F - EC2 Stands for Elastic Cloud Compute
True
Which of the following is NOT a component of EC2
Screen Resolution
Amazon Machine Images
Block Storage
Instance Type
Which of the following best describes an AMI?
A Firewall
The ECS instance’s hardware configuration.
An image of an EBS Volume
A preconfigured package that provides the information required to launch an EC2 Instance
T/F - Security Groups allow you to set both allow and deny rules.
False (Allow rules)
T/F - EBS Volumes are your instance’s processing power (CPU).
False - EBS volumes are the instance’s storage (hard drive).
Public IP addresses are assigned to every EC2 instance by default, and Private IP addresses are optional and must be manually configured.
False - Every EC2 instance is automatically assigned a private IP address. Public IP addresses are optional but are required for direct Internet access.
If you were to remove the route to the IGW from a route table, what would happen to traffic inside the VPC?
Traffic could be sent between EC2 instances inside the VPC but would not reach the internet.
What are IOPS?
Input/Output operations per second.
What is Bootstrapping?
Custom launch commands can be passed into the instance during launch via “user-data” scripts.
Instance Types
- t2 General Purpose Burstable performance
- m3 General Purpose Nice Balance
- c3/c4 - Compute optimized - high traffic (web sites)
- d2 - Storage optimized (data warehouses, filesystems).
- i2 Storage Optimized - dw - file system.
- g2 gpu optimized - machine learning, rendering, high perform databases.
- p2 gpu optimized
- r3/r4 - Memory optimized - db, memcached, enterprise apps
- x1 - memory optimized db, memcached, large deployments of enterprise applications.
Define Public, Private, and Elastic IP Addressess
- Public - Optional. Allows direct communication with resources across open internet. Auto-Assigning - based on the selected subnet that you are provisioning the instance in.
- Private - automatically assigned, used for internal communication (VPC).
- Elastic - (EIP) - static ipv4 for dynamic cloud computing. Public. will replace it’s default public IP for as long as it is attached.
BASH Script
can be used to automate the process of updating package installers, install Apache web server, and start the web server.
What does the curl command provide?
allows you to view instance, user-data or metadata.
curl http://169.254.169.254/latest/user-data
curl http:/169.254.169.254/latest/meta-data
displays bootstrapping commands
displays AMI, Instance Type, etc.