EC2 Flashcards
Can I use the same Security Group across different regions?
No, security groups are locked for a specific region and VPC
What is the port 21 for?
FTP, File Transfer Protocol
What is the difference between Reserved Instance and Convertible Reserved Instance?
In a convertible instance you can change the instance type, instance family, OS, scope and tenancy. You have less discount
What’s the most cost efficient way to launch an instance?
Spot Instances
What type of use case has a C7g instance?
Compute optimized
What type of use case have R6a and X2gd instances?
Memory optimized
What type of use case have P4 and G5 instances?
Accelerated computing
What type of use case have Im4gn and D2 instances?
Storage optimized
How many Elastic IPs can you have in your account?
5
Do you pay for Elastic IPs?
Only if it’s not attached to any instances
What should I do if I want to have very low latency between my instances?
Put them in a Cluster placement group
Can I use ENI for fail tolerance?
Yes, if an instance dies, I can move its ENI to a new instance, and the traffic will start working again
Under the hood EC2 Hibernate write the RAM state in a file in the root EBS volume. True or false?
True
I can use EC2 Hibernate if the root EBS volume in not encrypted. True or false?
False
Can I attach an EBS volume to multiple instances?
Only if the volume type is io1 or io2, and the instances are in the same AZ
Can I use HDD as root volume?
No, I can only use SSD instances (gp2, gp3, io1 and io2) as root
AMIs are locked to a specific region. True or false?
True
What is faster between Instance Store and EBS volumes?
Instance store
Can you mount an Elastic File System to multiple instances in multiple AZs?
Yes
You’re not sure of how much data you need to store. What would you choose between EFS and EBS?
EFS because it scales automatically, no need of capacity planning
How to reduce the cost for a EFS?
Create a Lifecycle Policy that move the files to IA (Infrequent Access) if a file is not accessed for a certain period of time
You put a bid into the EC2 spot market. The current spot price is $0.054 and you bid $0.075 for the instance and your request is fulfilled. The on-demand price is $0.09. What rate are you going to pay?
$0.054
Can a Convertible Reserved Instance change region?
No
Is CPU utilization a good cost metric for EC2 instance?
No. You are not charged for CPU cycles or actual utilization. AWS does not oversubscribe its resources, thus when you are running an EC2 instance, as far as AWS is concerned, it is 100% utilized as they cannot use those resources. Whether your instance is running at 0% CPU or 100% the cost is the same. The rest are all valid cost measurements.
What two types of status checks run every minute on a running EC2 Instance?
System status checks and Instance status checks
Difference between Spread and Partition placement groups?
Spread
Every instance is on a different hardware
Partition
Spread instances across logical partitions such that groups if instances in one partition do not share the underlying hardware with instances in another partition. Good for distributed and replicated workloads
What’s the maximum Elastic IPs you can have in your account?
5
What are the differences between the EC2 placement group?
There are three placement group:
Cluster: all the instances use the same hardware in a single AZ, useful for applications that need low latency, bad for HA
Spread: All the instances have different hardware in different AZs. Good for HA, every failure is isolated, but is limited to 7 instances per AZ placement group
Partition: Multiple partitions of instances for each AZ. A partition is a group of instances that share the same hardware. A hardware failure will affect multiple instances, but not all of them. Up to 7 partitions per AZ
What is EC2 Hibernate?
If you hibernate an EC2 instance, the RAM state is preserved while the instance is stopped. When you restart the instance, the boot will also be much faster. To enable it, the EBS volume must be encrypted. An instance cannot be hibernated for more than 60 days
What is Elastic Fabric Adapter
It can be attached to an EC2 instance to improve its performance, and it also attaches an ENI to it. Useful for high performance computing
What’s the url to get the metadata from an EC2 instance?
http://169.254.169.254/latest/meta-data/public-ipv4
How many instances per AZ are allowed in a Spread placement group?
Max 7 per AZ
How can you enable hibernation mode on a running EC2 instance?
You need to create a new instance with hibernation enabled