EC2 Flashcards

1
Q

What is EC2?

A

EC2 stands for Elastic Compute Cloud and this is basically secure, resizable compute capacity in the cloud. It is a virtual machine,

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are AMIs and what does it stand for?

A

AMIs are images provides by AWS that provide the information needed to launch an EC2 instance.

By default, an Amazon provided AMIs, you can create our own custom AMIs or use community/marketplace AMIs, however.

AMI stands for Amazon Machine Image.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is included with an AMI?

A

One or more Amazon EBS snapshots, or, for instance-store-backed AMIs, a template for the root volume of the instance (for example, an operating system, an application server, and applications).
Launch permissions that control which AWS accounts can use the AMI to launch instances.
A block device mapping that specifies the volumes to attach to the instance when it’s launched.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Are AMIs region specific?

A

AMIs are created in one region, and they only work in that specific region. Within that region, however, they can be used to deploy EC2 instances in any availability zone.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Can AMIs be edited?

A

AMIs cannot be edited. The closest alternative is to use an AMI to launch an instance, update the configuration, and then make a new AMI based on the new configuration.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Can AMIs be copied to other regions?

A

AMIs can be copied between regions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Are AMIs free?

A

AMIs are not free, because costs are generated by the EBS snapshots that the AMI references.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is User Data?

A

This data can be used to perform common automated configuration tasks, and/or to run scripts when the instance boots. It can be configured as you are creating a new EC2 instance. Anything in User Data is executed by the instance OS, however, it’s ONLY executed on the initial launch of the instance.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the max size of User Data?

A

User data is limited to 16 KB in size

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is Meta Data?

A

Meta Data is data about the EC2 instance. Things such as hostname, IP, etc.. It can be viewed from the EC2 instance by curling http://169.254.169.254/latest/user-data

You can add more to the URL path to find specific information.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is EBS?

A

Amazon Elastic Block Store (Amazon EBS) provides block level storage volumes for use with EC2 instances. These volumes can be mounted as devices on our instances.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Can EBS be attached to more than one EC2 instance?

A

EBS is generally attached to a single EC2 instance (or other service) over a storage network

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Is EBS AZ-resilient?

A

Yes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Can an EBS volume be detached from an EC2 instance and reattached to a different EC2 instance?

A

An EBS volume can be detached and re-attached between different EC2 instances without loss of data occurring.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Is EBS persistent?

A

EBS is persistent until a given volume is deleted.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Are there different options for EBS volumes?

A

Yes. EBS can provision volumes with different physical storage types, different sizes, and different performance profiles.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

How is EBS billed?

A

EBS is billed on a per GB basis (some extra charges may be applied for high performance volumes).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Does EBS replicate data within an AZ?

A

Yes. EBS replicates data within an AZ, but failure of an AZ still means failure of a volume.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

How many storage types are there and what are they?

A

There are 5.
General Purpose SSD (GP2)
General Purpose SSD (GP3)
Provisioned IOPS SSD (io1/2)
Throughput Optimized HDD (st1)
Cold HDD (sc1)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What is General Purpose SSD (GP2)?

A

Good for boot volumes, low-latency interactive apps, development, and testing. Currently the default. Credit architecture.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What is General Purpose SSD (GP3)?

A

3,000 IOPS & 125 MiB/s. Expected to be the default in the future. Good for virtual desktops, medium sizec single instance databases such as MSSQL Server, low-latency interactive apps, development, testing, and boot volumes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

What is Provisioned IOPS SSD (io1/2)?

A

Good for high performance, latency sensitive workloads, I-O-intensive NoSQL, and relational databases.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

What is Throughput Optimized HDD (st1)?

A

A low-cost HDD designed for frequently accessed, throughput-intensive workloads. Good for Big Data, data warehouses, log processing.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

What is Cold HDD (sc1)?

A

The lowest-cost HDD designed for less frequently accessed workloads. Good for saving money if you have archives or other data that requires fewer scans per day.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

Is it possible to backup EBS volumes?

A

It’s possible to back up the data on our EBS volumes to Amazon S3 using snapshots. Because snapshots are stored in S3, they are region resilient.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

Are EBS snapshots incremental or full backups?

A

Snapshots are incremental, the first snapshot is a full backup and any future snapshots save only the blocks on the device that have changed since the last snapshot.

26
Q

Why are EBS snapshots incremental?

A

Snapshots are incremental because this minimizes the time required to create the snapshot and saves on storage costs by not duplicating data.

27
Q

What does an EBS snapshot contain?

A

Each snapshot contains all of the information that is needed to restore our data (from the moment the snapshot was taken) to a new EBS volume.

28
Q

Can EBS snapshots be used to migrate data to different AZs or Regions?

A

Snapshots can be used to migrate data to different availability zones in a region, or to different regions of AWS.

29
Q

How are EBS snapshots billed?

A

Snapshots are billed based on allocated GB of data per month.

30
Q

What is vertical scaling?

A

It is when you increase resources on an EC2 instance instead of increasing the number of EC2 instances.

31
Q

What is horizontal scaling?

A

It is when you increase the number of EC2 instances instead of increasing the resources of an EC2 instance.

32
Q

Does vertical scaling require a reboot?

A

Yes. Which results in downtime.

33
Q

Is vertical scaling or horizontal scaling more cost effect?

A

Horizontal scaling has the potential to offer improved performance at a better price than vertical scaling. Horizontal scaling also can utilize load balancers to assist in scaling without the downtime we may struggle with when using vertical scaling.

34
Q

What are potential issues with horizontal scaling?

A

One issue with horizontal scaling, however, is that it requires more thought to implement correctly.

One example of this is needing to design our application in such a way that we can effectively support user sessions even when we may constantly be switching between instances.

35
Q

What are Instance Stores?

A

Instance stores provide temporary block-level storage for our instances. This storage is located on disks that are physically attached to the host computer.

36
Q

What use cases do Instance Stores solve?

A

Instance stores are ideal for temporary storage of information that changes frequently such as buffers, caches, scratch data, etc.

37
Q

How do Instance Stores perform and how are they priced?

A

Instance stores offer the highest storage performance in AWS and they are included in the instance price.

38
Q

What is one requirement of Instance Stores?

A

It is important to note, however, that to use instance stores they must be attached at launch — they cannot be attached afterwards.

39
Q

How many EC2 instant types are there and what are they?

A

There are 5.
General Purpose
Compute Optimized
Memory Optimized
Accelerated Computing
Storage Optimized

40
Q

What is AWS Systems Manager Parameter Store?

A

AWS Systems Manager Parameter Store provides secure, hierarchical storage for configuration, data management, and secrets management.

It allows us to store data such as passwords, database strings, AMI IDs, and license codes as parameter values. These values can be stored as encrypted data or plain text.

41
Q

How can the AWS Systems Manager Parameter Store be used?

A

These Systems Manager parameters can be referenced from our scripts, commands, SSM documents, and configuration/automation workflows by using the unique name we specified when creating the parameter.

42
Q

What are EC2 Placement Groups?

A

This is where the EC2 service attempts to place the instance in such a way that all of your instances are spread out across underlying hardware to minimize correlated failures. Placement Groups influence the placement.

43
Q

What are the different types of Placement Groups?

A

Cluster, Spread, and Partition

44
Q

What are Cluster Placement Groups?

A

Cluster Placement Groups (CPGs) pack instances close together. This type of placement group is ideal for peak performance.

EC2 instances are placed in the same rack, and often even share the same host. This close physical proximity allows for all members to have direct connections with each other and extremely low latency.

45
Q

What are downsides of Cluster Placement Groups?

A

The downside, is that CPGs offer little resilience because they locate EC2 instances so close together.

CPGs can’t span AZs, they are restricted to one AZ only and that AZ is locked in when launching the first instance.

46
Q

What is the acronym for Cluster Placement Groups?

A

CPG

47
Q

Can Cluster Placement Groups span VPC peers?

A

CPGs can span VPC peers, but this does impact performance.

48
Q

What is a requirement for Cluster Placement Groups?

A

CPGs require a supported instance type, and it’s recommended that we use the same type of instance (though this isn’t mandatory).

49
Q

What are Spread Placement Groups?

A

Groups that keep instances separated.

50
Q

What is the acronym for Spread Placement Groups?

A

SPG

51
Q

What limits do Spread Placement Groups have?

A

There is a limit of 7 instances per AZ because of infrastructure limits. In essence, each instance runs from a different rack and there’s only so many distinct racks of hardware in each AZ.

SPGs are not supported for dedicated instances or hosts.

52
Q

What is an ideal scenario for Spread Placement Groups?

A

SPGs are ideal for when we have a small number of critical instances that need to be kept separated from each other.

53
Q

What are Partition Placement Groups?

A

Groups that arrange our EC2 instances in such a way that instances can be simultaneously grouped and spread apart.

54
Q

What is the acronym form Partition Placement Groups?

A

PPG

55
Q

How do Partition Placement Groups differ from the other Placement Groups?

A

PPGs are similar to SPGs, except for the fact that PPGs utilize partitions. Partitions are similar to SPGs in that each partition runs from a different rack, and there is a maximum of 7 partitions per AZ.

Each partition can contain multiple EC2 instances. Instances can be placed in a specific partition of our choice, or we can allow AWS to auto place them.

56
Q

What purchase options exist for EC2?

A

On-Demand
Spot
Reserved
Dedicated Host
Dedicated Instance?
EC2 Savings Plans

57
Q

What are On-Demand Instances?

A

The default purchasing option. Instances are isolated, but multiple customer instances run on shared hardware. Per-second billing while an instance is running. No upfront costs, but also no discounts. Ideal for unknown/short-term workloads, or apps that can’t be interrupted.

58
Q

What are spot instances?

A

Spot pricing is how AWS sells unused EC2 capacity. The spot price is based on the spare capacity at a given time, but can offer up to a 90% discount.

59
Q

What are Reserved Instances?

A

A commitment to use EC2 instances over a 1 or 3 year period of time. Offers cost-savings, and can be paid no-upfront, partial upfront, or all upfront.

60
Q

What are Dedicated Instances?

A

Similar to dedicated hosts, but dedicated instances instead utilize per instance billing. Dedicated instances also do not provide us with visibility of physical characteristics such as sockets, cores, etc, whereas dedicated hosts do.

61
Q

What are Dedicated Hosts?

A

A host that is dedicated to only us. Ideal for situations where software licensing is based on sockets/cores. Pay for the host, no instance charges. Also good for corporate compliance requirements.

62
Q

What are EC2 Savings Plans?

A

An hourly commitment for a 1 or 3 year term (ex: $20/hour for 3 years). Resource usage up to the committed amount is offered at the savings plan rate, which is cheaper than the standard on-demand rate. Resource usage beyond the committed amount, however, is still charged based on the on-demand rate.

63
Q

What is virtualization?

A

Virtualization is the process of running more than one OS on a single piece of hardware. Utilizes virtual software that mimics the functions of physical hardware in order to run multiple virtual machines simultaneously on a single device.