EC2 Fundamental Flashcards
What is budget
A way to cap the usage of services in AWS
What are the variations of budget
Cost, Usage, Reservation and Savings Plan
What is budget threshold
The percentage of forecast, exceeding which a notification is triggered
What are core 4 services of EC2
VM (EC2), Storing Data on Virtual Drive (EBS), Distributing Load Across VM (ELB) and Scaling Service using Auto - Scaling Group (ASG)
Which OS can you select for EC2
Linux, Windows and Mac
Can you choose compute power
Yes, via CPU
Can you choose RAM
Yes
What are the storage options
Network Based & Instance Based
What are network based store
EBS & EFS
Can you select the network card for EC2
Yes
What are security groups
Firewall rules
What is Bootstrap script
The start up script for EC2, that runs once at start up
How many instance types are there
7
In the expression m5.2Xlarge what m means
instance class
In the expression m5.2Xlarge what 5 means
generation
In the expression m5.2Xlarge what 2Xlarge means
size within the instance class
what are the things that security group restricts
ports, IP (from where the instance is accessed), inbound traffic and outbound traffic
can one security group be attached to multiple instances?
yes
can a security group belong to multiple VPC in same region
no
can a security group belong to multiple region
no
inbound traffic are allowed by default - true/false
false
outbound traffic are allowed by default - true/false
true
what is 22 port for
SSH
what is 21 port for
FTP
what is `22 port also used for
SFTP
what is 80 used for
HTTP
what is 443 used for
HTTPS
what is 3389 used for
remote desktop protocol for windows
can a security group refer other security groups
yes
what is EC2 Instance Connect
browser based instance connectivity option
what type of OS are supported by EC2 Instance Connect
Linux
can we block port 22 and still use EC2 Instance Connect to SSH to the machine
no
should you use IAM access key and secret key inside a VM to be able to other VM
no, this is dangerous, use IAM role instead
how can one EC2 connect with AWS services
using IAMrole
how many instance purchase options are there
5
what are the options
on - demand, reserved, dedicated - host, spot, dedicated - instance
which option is best suited for short - term, unpredictable work load
on - demand
on - demand (non - linux) instances are billed per minute - TRUE/FALSE
FALSE, they are billed per hour
what is the billing option for linux machines
billing per second after the first minute
how much max discount is available for reserved instances
75%
what are the reservation periods
1 to 3 years
what are the purchasing options for reserved instances
no upfront, partial upfront, all upfront
can you change instance type of reserved instance
yes (for convertible reserved instances)
what is scheduled reserved instances
the one which can be launched during the prescheduled time period
what is max discount for spot instances
90%
when can a spot instance be consumed back by aws
when you are not willing to pay for current price of the spot instance
what kind of work load is suitable for spot instances
batch jobs, data analysis, image processing, any distributed workload
what is a dedicated host
a physical server to host ec2 instances leased to the user for at least 3 years
what are the benefits of dedicated host
- regulatory compliance
- bring your own license
what are the similarities between dedicated host and dedicated instances
- both enables availing of dedicated physical server
- both supports automatic instance placement
what are the core differences between dedicated host and dedicated instances
- dedicated instances all run on same physical server tied to an account with per instance billing, on the other hand dedicated hosts are billed per host.
- dedicated host gives lot of control on the physical server attributes
how does spot instance mechanism works
when current_spot_price is < max price that user is ready to pay, the instances either gets terminated or stopped based on chosen configuration
what is a spot block
spot block is a predefined period when the instances will not be consumed despite of the current spot price becoming lesser than max price that one has agreed to pay
what is a spot request
spot request is a way to ask for spot instances
what comprises of spot requet
- maximum price
- desired number of instances
- launch specification
- request type (one time/persistent)
- valid from and valid to
what happens with persistent spot request
if the instances are consumed back, they are brought up automatically by aws
what is one time spot request
a way to get spot instances one off
does canceling a spot request terminate the requests as well
no
which states of spot instance support cancellation
active, disabled, and open
what is spot fleet
a combination of spot instances and (optional) on - demand instances
what are launch pools for spot fleet
set of combinations of instance type, availability zone and OS
can the spot fleet choose a pool
yes
when does spot fleet stops launching
either after reaching max capacity or budget
what are strategies for spot fleet
lowest price, capacity optimized and diversified
what is lowest price strategy
provision instances from the pool with lowest price
what is capacity optimzed
provision instances from the pool with optimal capacity for the number of instances
what is ‘diversified’ approach for spot fleet instances
the instances are provisioned across available pools, thereby gurantying higher availability
Which EC2 Purchasing Option can provide you the biggest discount, but it is not suitable for critical jobs or databases?
Spot Instances are good for short workloads and this is the cheapest EC2 Purchasing Option. But, they are less reliable because you can lose your EC2 instance.
What should you use to control traffic in and out of EC2 instances?
Security Group
How long can you reserve an EC2 Reserved Instance?
1 or 3 years
You would like to deploy a High-Performance Computing (HPC) application on EC2 instances. Which EC2 instance type should you choose?
Compute Optimized
Which EC2 Purchasing Option should you use for an application you plan to run on a server continuously for 1 year?
Reserved Instances
You are preparing to launch an application that will be hosted on a set of EC2 instances. This application needs some software installation and some OS packages need to be updated during the first launch. What is the best way to achieve this when you launch the EC2 instances?
Build a script that does all required installations. Then use EC2 User Data to bootstrap your EC2 instances using a bash script. This script can contain commands such as installing software/packages, download files from the Internet, or anything you want.
Which EC2 Instance Type should you choose for a critical application that uses an in-memory database?
Memory Optimized
You have an e-commerce application with an OLTP database hosted on-premises. This application has popularity which results in its database has thousands of requests per second. You want to migrate the database to an EC2 instance. Which EC2 Instance Type should you choose to handle this high-frequency OLTP database?
Storage Optimized
Security Groups can be attached to only one EC2 instance.
False
You’re planning to migrate on-premises applications to AWS. Your company has strict compliance requirements that require your applications to run on dedicated servers. You also need to use your own server-bound software license to reduce costs. Which EC2 Purchasing Option is suitable for you?
Dedicated Host
You would like to deploy a database technology on an EC2 instance and the vendor license bills you based on the physical cores and underlying network socket visibility. Which EC2 Purchasing Option allows you to get visibility into them?
Dedicated Host
what are the key differences between public and private ip
public ip is exposed over internet vs. private ip needs NAT and IG to expose
public ip can be geo located vs. private ip can not
public ip is never duplicated vs. private ip (within a network) can
what are private IP ranges
- Class A: 10.0.0.0 to 10.255.255.255
- Class B: 172.16.0.0 to 172.31.255.255
- Class C: 192.168.0.0 to 192.168.255.255
what is elastic ip
elastic ip are those public ip assigned to VMs as long as the VMs are not destroyed
what is placement group
a set of strategies to control how the EC2 instances are placed on AWS hardware
what are 3 typical placement groups
cluster, spread and partition
what is cluster placement group
all EC2 instances stays on same rack of same AZ
what is the pros and cons of cluster placement group
pros - very low network latency; cons - single point of failure
what is spread placement group
all EC2 instance stays on different availability zone
what are benefit of spread placement group
pros - highly available; cons - there can be 7 instances per placement group per availability zone
what is partition placement group
partition placement group is a technique where each instances belong to a partition (i.e. a physical rack), across multiple AZ within the same region
how many partition placement group can be placed per availability zone
7
what is the core benefit of partition placement group
because of the fact that instances do not share racks the risk of failure is very low
what is elastic network interfaces
logical component in a VPC that represents virtual network card
can ENI have multiple private IPs
yes
how many elastic ip can be associated per private ip
one
how many security groups can be associated with a ENI
multiple
does ENI has a MAC address
yes
can ENI be attached on the fly
yes
can ENI span across multiple availability zones
no
what is hibernate option in EC2
this is a mechanism where the entire state of RAM is written to a file in root partition, so that even when the machine is stopped and restarted, the OS can be put back to where it was at last state
is hibernation supported for all instance family
no, there are only selected few - the C, M and R series are the one being used
what is the maximum size of instance RAM
150 Gb
is hibernation supported on Bare Metal
no
what is the characteristic of the ROOT volume
it must be EBS backed, encrypted, non - instance store and significantly large
how long instances can be hibernated
not more than 60 days