EC2 Flashcards

1
Q

What is the relationship between security groups and EC2 instances in AWS?

A

In AWS, a security group can accommodate an unlimited number of EC2 instances. Conversely, each EC2 instance can be associated with multiple security groups, facilitating flexible and granular control over network access and security configurations.

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

What is the default configuration for inbound and outbound traffic in an AWS security group?

A

The default configuration for an AWS security group entails allowing all outbound traffic while blocking all inbound traffic.

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

What does ENI stand for in AWS networking?

A

ENI stands for Elastic Network Interface. For basic networking. For example, an EC2 instance can have multiple ENIs, enabling it to connect to different networks simultaneously.

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

What is EFA and where is it applied in AWS networking?

A

Elastic Fabric Adapter (EFA) is tailored for High-Performance Computing (HPC), and machine learning applications. It facilitates direct communication between instances, bypassing the OS network stack. This benefits tightly coupled tasks like simulations and machine learning training.

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

What is Enhanced Networking?

A

Enhanced Networking involves optimizing network performance by leveraging technologies like SR-IOV, enabling speeds from 10 Gbps to 100 Gbps for data transfer.

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

What are Placement Groups?

A

Placement Groups determine how EC2 instances are positioned on the underlying hardware.

  1. Cluster Placement Group: Instances are placed close together within a single Availability Zone, designed for low-latency applications where high network performance is crucial.
  2. Spread Placement Group: Instances are spread across distinct underlying hardware to mitigate risks associated with hardware failures and increase availability.
  3. Partition Placement Group: Instances are distributed across partitions of hardware, primarily used for large distributed and replicated workloads.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Name 5 characteristics of placement groups in AWS.

A
  1. A cluster placement group cannot span multiple AZs, whereas a spread placement group and partition placement group can.
  2. Only certain types of instances can be launched in a placement group(compute optimized, GPU, memory optimized, storage optimized).
  3. AWS recommends homogenous instances within cluster placement groups.
  4. You can’t merge placement groups.
  5. You can move an existing instance into a placement group. The instance must be in the stopped state. You can’t move or remove an instance using the console yet.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are Dedicated Hosts?

A

An Amazon EC2 Dedicated Host is a physical server with EC2 instance capacity fully dedicated to your use. Dedicated Hosts allow you to use your existing per-socket, per-core, or per-VM software licenses.

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

What are Spot instances and where can be used?

A
  1. Spot instances save up to 90% of the cost of On-Demand Instances.
  2. Useful for any type of computing where you don’t need persistent storage.
  3. A spot fleet is a collection of spot instances and optionally on-demand instances.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How can you extend your private VMware Cloud into AWS public cloud?

A

By deploying vCenter on the AWS cloud using VMware.

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

How can you extend AWS to your data center?

A

With AWS Outposts rack for large deployments and AWS Outposts servers for small deployments.

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

What charges generate a stopped instance?

A

Charges for the storage of the EBS volumes attached to the instance.

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

Is Amazon EC2 a global, regional, or Availability Zone (AZ) service within AWS?

A

Amazon EC2 is an Availability Zone (AZ) service within AWS.

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

What is the difference between Rebooting an EC2 instance, and stopping it and starting it again?

A

When rebooting an EC2 instance will start again on the same physical host.
It keeps the following:
- Public DNS name (IPv4)
- Private IPv4 address
- Public IPv4 address
- IPv6 address (if applicable)
- Any data on its instance store volumes

Stopping and starting an instance may affect its public IPv4 address (unless you use an Elastic IP) and results in the loss of data on instance store volumes. However, the private IPv4 address and other associated information typically remain the same.

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

Can an ec2 instance have attached an EBS from a different AZ in the same region?

A

No, an EC2 instance cannot have attached an EBS volume from a different Availability Zone (AZ) in the same region.

EBS volumes are tied to a specific AZ and cannot be moved to another AZ. This is because EBS volumes are replicated across multiple servers in the same AZ, which ensures high availability and performance.

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

What is EC2 good for?

A
  • Traditional OS+Application Compute
  • Long-Running Compute
  • Server style applications
  • Monolithic application stack
  • Disaster Recovery
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What are the four most common first letters of the instance types in EC2 instance types?

A

C (Compute Optimized), M (General Purpose), R (Memory Optimized), and T (Burstable Performance)

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

If you need to accelerate machine learning or 3D rendering tasks, which EC2 instance family should you consider?

A

The “G” family, like “g4dn.xlarge,” includes GPU instances for GPU-accelerated workloads.

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

What EC2 instance family is designed for storage-intensive applications with high storage density?

A

The “D” family, such as “d2.xlarge,” is Density-Optimized and provides high storage density at a lower cost per gigabyte.

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

What are EC2 Instance Connect Service Endpoints?

A

Instance Connect Service Endpoints are public IP addresses that are used by the Instance Connect service to communicate with EC2 instances. They are located in the same region as the EC2 instance that you are connecting to.

21
Q

What is EC2 Hibernation?

A
  • EC2 hibernation preserves the in-memory RAM on persistent storage (EBS).
  • Much faster to boot up because do not need to reload the operating system.
  • Instance RAM must be less than 150 GB.
  • Instance families include C3-5, M3-5, R3-5.
  • Available for Windows, Amazon Linux 2 AMI, and Ubuntu.
  • Instances can’t be hibernated for more than 60 days.
  • Available for On-Demand instances and Reserved Instances.
22
Q

Can 2 ENIs in the same EC2 instance be deployed in 2 different subnets?

A

Yes, but the subnets should be in the same AZ.

23
Q

What are the 3 options for an AMI that can be set to use?

A
  1. Public
  2. Your account(default)
  3. Specific Accounts
24
Q

When creating an AMI from an EC2 instance, are the ebs volumes included?

A

When creating an AMI from an EC2 instance, you can choose to include or exclude Elastic Block Store (EBS) volumes. The default behavior is to include all EBS volumes attached to the instance in the block device mapping.

25
Q

Does an AMI itself contain the actual data volumes?

A

An AMI itself does not contain the actual data volumes; instead, it references the EBS volumes and snapshots in the block device mapping.

26
Q

What is AMI baking?

A

Creating an AMI from a configured instance + application.

27
Q

How can you edit an existing AMI?

A

You cannot. You need to launch the instance, update the configuration and create a new AMI.

28
Q

Can you launch an AMI to different regions?

A

No, you cannot directly launch an Amazon Machine Image (AMI) in a region different from the one it was created in. AMIs are region-specific, and each AMI is tied to the specific region where it was created.

29
Q

Can an AMI be copied between regions?

A

Yes, includes its snaphots.

30
Q

What are the key differences between Amazon EC2 Dedicated Hosts and Dedicated Instances?

A

Dedicated Hosts:

  • Give you additional visibility and control over how instances are placed on a physical server.
  • Allow you to consistently deploy your instances to the same physical server over time.
  • Are billed by the host, irrespective of the number of instances you run on each host.
  • Are a good option for applications that have specific licensing, compliance, or performance requirements.
  • Are a good option for applications that need to be consistently deployed to the same physical server over time.

Dedicated Instances:

  • Do not give you the same level of visibility and control over how instances are placed on a physical server.
  • Are billed by the number of instances, regardless of whether the instances are running on a dedicated host or a shared host.
  • Are a good option for applications that require dedicated hardware, but do not need the same level of visibility and control as Dedicated Hosts.
31
Q

What are Scheduled Reserved Instances?

A

Scheduled Reserved Instances are a type of Reserved Instance (RI) that allows you to reserve EC2 capacity for specific time periods on a recurring basis. This can be useful for applications that have predictable workloads, such as batch processing or seasonal workloads.

Scheduled RIs are billed at a lower rate than On-Demand Instances, and they can save you up to 70% on your EC2 costs.

32
Q

What are the benefits of using EC2 Capacity Reservations?

A
  • Capacity reservation: Capacity Reservations reserve capacity for you, so you can be sure that you will have the capacity you need when you need it.
  • Cost savings: Capacity Reservations can help you to save money on your EC2 costs.
  • Predictable costs: Capacity Reservations provide you with predictable costs for your EC2 workloads.
  • Compliance: Capacity Reservations can help you to comply with specific regulations, such as HIPAA or PCI DSS.
33
Q

What are On-Demand Capacity Reservations?

A

On-demand capacity Reservations allow you to reserve capacity for your Amazon EC2 instances in a specific Availability Zone or Region for any duration. On-Demand Capacity Reservations are charged at the On-Demand rate, whether or not you use the reserved capacity.

34
Q

What is EC2 savings plan?

A

Saving plans is an agreement between you and AWS where you commit to a minimum spend and AWS gives you cheaper access to any of the applicable resources. The commitment is done to all supported services(not specific to EC2) currently EC2, Fargate, and Lambda.

35
Q

What are the two types of instance status checks?

A
  • System status checks
  • Instance status checks(“inside the VM)

System status checks assess the health of the underlying hardware and software of the instance, while instance status checks assess the health of the instance itself.

36
Q

What is AWS Auto-Recovery?

A

AWS Auto-Recovery is a feature that automatically replaces an impaired Amazon EC2 instance with a new one in the event of hardware failures, helping to improve instance availability and minimize downtime.

37
Q

What is the ip to access the metadata of an instance?

A

http://169.254.169.254/latest/meta-data

38
Q

What is the ip to access the user data of an instance?

A

http://169.254.169.254/latest/user-data

39
Q

When you modify the user data when the instance is stopped, what will happen when you start the instance again?

A

The instance will execute the updated user data before it starts any other services. This means that you can update the configuration of your instance without having to manually update the instance.

40
Q

What is the typical initialization time for an EC2 instance?

A

An EC2 instance is typically available for use within a few minutes after launch, though actual startup time can vary based on the instance type, AMI, and configuration.

41
Q

What is an AWS Cluster Placement Group?

A

An AWS Cluster Placement Group is a feature that allows you to group EC2 instances within a single Availability Zone to provide low-latency, high-throughput networking and optimize the placement of instances for specific workloads. This can be beneficial for applications that require tightly coupled, high-performance compute clusters or applications that depend on low-latency network communication between instances.

Requires a supported instance type. and it is recommended to use the same instance type and highly recommended to launch the instances at the same time.

High speed - low resilience.

42
Q

What is an AWS Spread Placement Group?

A

An AWS Spread Placement Group is a type of EC2 placement group that spreads instances across underlying hardware (such as racks) to reduce the risk of simultaneous hardware failures. Spread Placement Groups are designed to provide high availability by ensuring that instances are placed on distinct hardware, making them suitable for applications that require a level of fault tolerance and separation between instances for reliability.

Can span in different AZs(max 7 instances per AZ)

43
Q

What is an AWS Partition Placement Group?

A

A partition placement group (PPG) logically groups instances within a single Availability Zone. A PPG can span up to seven partitions, logical segments of an Availability Zone. PPGs are designed to reduce the likelihood of correlated failures for large, distributed applications.

Instances can be placed in a specific partition or auto-placed.

Great for topology-aware applications(HDFS, HBase, Cassandra).

44
Q

What are Dedicated Hosts?

A

Dedicated hosts are EC2 Hosts which support a certain type of instance which are dedicated to your account.

You can pay an on-demand or reserved price for the hosts and then you have no EC2 instance pricing to pay for instances running on these dedicated hosts.

Generally dedicated hosts are used for applications that use physical core/socket licensing.

45
Q

How do Nitro-based dedicated hosts differ from standard dedicated hosts in Amazon EC2?

A

Nitro-based dedicated hosts can be used to run different types of instances. This is because Nitro-based hosts are powered by the AWS Nitro System, which provides a number of benefits, including the ability to run multiple instance types on the same host.

Normal dedicated hosts, on the other hand, typically can only run a single instance type. This is because normal dedicated hosts are typically powered by standard x86 hardware, which does not have the same capabilities as the AWS Nitro System.

46
Q

What are some limits for dedicated hosts?

A
  • AMI Limits: RHEL, SUSE Linux and Windows AMI’s are not supported.
  • Amazon RDS instances are not supported.
  • Placement groups are not supported.
47
Q

What is Enhanced networking in AWS?

A

Enhanced networking is the AWS implementation of SR-IOV(single root virtualization), a standard allowing a physical host network card to present many logical devices that can be directly utilized by instances.

This means lower host CPU usage, better throughput, lower and consistent latency.

Most Ec2(modern) instances support it by default or can be enabled cost-free.

Great for combination with cluster placement groups.

48
Q

What is EBS optimization on instances?

A

EBS optimization on instances means dedicated bandwidth for storage networking - separate from data networking.

In modern instances is enabled by default. In some older instances can be enabled with some extra cost.