EC2 and Storage Flashcards
This is based on Section 5, 6 and 7
What is the point of EC2 Instance Roles?
They allow for the instance to perform API calls on behalf of the instance to other AWS resources (i.e. Calls to IAM or S3)
What is the difference between the On-Demand and Reserved Instance options?
On-Demand has no up-front costs, and is payed for by the second. You have full control over its lifecycle.
Reserved Instances are physically the same as On-Demand, however a billing discount is applied and must have certain attributes applied.
What are Spot Fleets?
Spot fleets are a set of Spot Instances + (optional) On-Demand instances that are managed by AWS. The Spot Fleet will try to meet the target capacity with price constraints.
We must define multiple launch pools.
What is a storage optimized Instance?
Instances designed for workloads that require high, sequential read and write access to very large data sets.
What are the three Placement Group strategies?
Cluster: Clusters instances into a low-latency group in a single AZ, same hardware, low-latency
Spread: Spreads instances across underlying hardware
Partition: Spreads instances across many different partitions within an AZ, such that groups in one partition do not share underlying hardware with groups of instances in another partition
What is the max number of Partitions you can have per AZ for a Placement Group partition strategy?
Seven
Why would you create your own ENIs?
When instances are deleted, the default ENIs are deleted with them. With the creation of our own ENIs, we get to move them to instances we need them to be attached to and assign certain IP Addresses.
What is a Spot Instance?
Spot instances are instances that are ran when capacity is available and the spot price is lower than our maximum rates.
You have an application performing big data analysis hosted on a fleet of EC2 instances. You want to ensure your EC2 instances have the highest networking performance while communicating with each other. Which EC2 Placement Group should you choose?
Cluster Placement
You have a critical application hosted on a fleet of EC2 instances in which you want to achieve maximum availability when there’s an AZ failure. Which EC2 Placement Group should you choose?
Spread
Why would you use a Partition Placement strategy?
This is a good balance between High Performance and High Availability; we can have multiple instances in the same rack for High Performance and instances in other racks for High Availability.
True or False: Elastic Network Interface (ENI) can be attached to EC2 instances in another AZ.
False. ENIs are bounded to a specific AZ
What storage type must be used to enable EC2 Hibernate?
EBS. The data persisting in RAM is migrated to EBS when the instance is hibernated. Only works with GP and Provisioned IOPS
How does EBS attach to an Instance?
Through a network drive. This allows us to attach and detach
True or False: EBS can be bound across AZs?
False. If we want to move it across AZs, we need to create a snapshot and recreate it in another AZ
If we want to move EBS volume across an AZ or Region, what can we do?
Create an EBS snapshot
What is an AMI?
Amazon Machine Image. It provides the information needed to launch an Instance.
Why would you use an EC2 Instance Store over an EBS volume?
The EC2 Instance Store will be more high performance than the EBS volume as it is physically located on the same disk
What are the downsides on an EC2 Instance Store?
An Instance Store is lost under the following circumstances: underlying disk fails, instance stops, hibernated or terminates
We can also not transfer an Instance Store like we can an EBS Volume
What volume types are provided by EBS?
General Purpose SSD, Provisioned IOPS SSD, Throughput Optimized HDD and Cold HDD
If we need an EBS Volume type for intensive and frequent database workloads, which Volume type should we use?
Provisioned IOPS
What two EBS Volume types can be Boot volumes?
General Purpose and Provisioned IOPS
We want to attach an EBS to multiple instances. What can we do?
Use EBS Multi-Attach. Only works for Provisioned IOPS
True or False: EFS can be in multi-AZ
True
What is the difference between EFS and EBS
EBS will store data in the system in equal sized blocks. Allowing for faster retrieval.
EFS has an extra layer consisting of a file system to process before accessing the data. EFS is also multi-AZ by default.
You have just terminated an EC2 instance in us-east-1a, and its attached EBS volume is now available. Your teammate tries to attach it to an EC2 instance in us-east-1b but he can’t. What is a possible cause for this?
EBS volumes are locked to an AZ
You have launched an EC2 instance with two EBS volumes, Root volume type and the other EBS volume type to store the data. A month later you are planning to terminate the EC2 instance. What’s the default behavior that will happen to each EBS volume?
The Root volume type will be deleted and the other EBS volume type will not be deleted
What is EBS Multi-Attach?
Attaches the same EBS volume to multiple EC2 instances in the same AZ
You would like to encrypt an unencrypted EBS volume attached to your EC2 instance. What should you do?
Create an EBS snapshot of your EBS volume. Copy the snapshot and with encryption. Then, use the encrypted snapshot to create a new EBS volume
You would like to have a high-performance local cache for your application hosted on an EC2 instance. You don’t mind losing the cache upon the termination of your EC2 instance. Which storage mechanism do you recommend as a Solutions Architect?
Instance Store
You are running a high-performance database that requires an IOPS of 310,000 for its underlying storage. What do you recommend?
Use an EC2 Instance Store. EBS io2 has a max 256,000 IOPS and EBS io1 has a max 64,000 IOPS
What are the two types of Spot Fleet requests?
Requests - If you configure the request type as request, it is only a one-time request. Spot Fleet does not attempt to replenish Spot Instances.
Maintain - Spot Fleet will attempt to maintain capacity by automatically replenishing any interrupted Spot Instances.
What is a Spot Instance Pool
A Spot Instance Pool is a set of unused Instances with the same instance type (e.g. m5.large) and AZ
Can we attach and detach root volumes from EC2 instances?
Yes, we can
https://serverfault.com/questions/588435/detatch-an-ebs-volume-from-one-instance-and-attach-to-another
True or False: We can have multiple EBS volumes attached to a single EC2 instance
Yes
What is EBS Snapshot Archive?
EBS Snapshot Archive moves a snapshot to an “archive tier” within S3 which is 75% cheaper. However, restoring from the snapshot takes within 24 to 72 hours
Where do EBS snapshots reside?
In S3 storage
How can we prevent accidental deletions of EBS snapshots?
We can setup rules to send deleted snapshots in a “recycle bin”. Recycle Bin is an AWS resource
We need to recover an EBS snapshot with no latency when needed. What can we do?
Put it in Fast Snapshot Restore. Costs more money
Which has better IOPS performance, Instance store or Block storage?
Instance Store usually has better IOPS performance; that’s because they are a hardware disk attached to the EC2 instance
We need a high-performance storage option for an EC2 instance for cache and buffering data. What can we use?
EC2 Instance Store
How many EC2 instances can be connected to one EBS Multi-Attach?
Up to 16
What are EFS throughput modes?
Bursting: Throughput allowance is increased as workload increases (if credits are available). Depends on size of the file system
Elastic: Scales up or down to meet throughput needs; not dependent on credits
Provisioned: Users specify the level of throughput regardless of file system size or credits