Section - EC2 Flashcards

1
Q

What is a EC2?

A

Amazon Elastic Compute Cloud (EC2)

  • Cloud virtual servers
  • Use preconfigured template called Amazon Machine Image (AMI) to luch instances
  • Deploy applications directly to EC2 instances
  • You receive 750 Compute hours per month on Free Tier plan
  • EC2 offers Loading balancing and Auto Scalling

Category: Compute

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

List 5 EC2 pricing plans?​

A
  • On-Demand - Fixed price billed down to the second
  • Spot instances - Unused EC2 capacity, only if capacity is vailable (Cheapest option)(Work loads can be interrrupted) (can save up 90% off On-Demand prices)
  • Reserved Instances (1 year or 3 years contracts)(can save up 75% off On-Demand prices)(Pay all upront, Partially upfront, No upfront ) (provides convertible types at 54% discount)
  • Dedicated Hosts - Fully dedicated physical server to you (You can bring your own license)(can save up 70%off On-Demand prices)
  • Savings plans - commit to compute usage (measured per hour) (1 to 3 years contract) (Does not provide capacity reservation)(can save up 72% off On-Demand prices)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

EC2 pricing plan - On Demand Model?

A
  • With On-Demand instances, you pay for compute capacity by the hour or the second depending on which instances you run.
  • No longer-term commitments or upfront payments are needed.
  • You can increase or decrease your compute capacity depending on the demands of your application and only pay the specified per hourly rates for the instance you use.

On-Demand instances are recommended for:

  • Users that prefer the low cost and flexibility of Amazon EC2 without any up-front payment or long-term commitment
  • Applications with short-term, spiky, or unpredictable workloads that cannot be interrupted
  • Applications being developed or tested on Amazon EC2 for the first time
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

EC2 pricing plan - Spot instances Model?

A
  • Amazon EC2 Spot instances allow you to request spare Amazon EC2 computing capacity for up to 90% off the On-Demand price.
  • You can use Spot Instances for various stateless, fault-tolerant, or flexible applications such as big data, containerized workloads, CI/CD, web servers, high-performance computing (HPC), and test & development workloads.
  • You also have the option to hibernate, stop or terminate your Spot Instances when EC2 reclaims the capacity back with two-minutes of notice.

Spot instances are recommended for:

  • Applications that have flexible start and end times
  • Applications that are only feasible at very low compute prices
  • Users with urgent computing needs for large amounts of additional capacity

Read More..

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

EC2 pricing plan - Dedicated Hosts Model?

A
  • Amazon EC2 Dedicated Hosts allow you to use your eligible software licenses from vendors such as Microsoft and Oracle on Amazon EC2, so that you get the flexibility and cost effectiveness of using your own licenses, but with the resiliency, simplicity and elasticity of AWS.
  • An Amazon EC2 Dedicated Host is a physical server fully dedicated for your use, so you can help address corporate compliance requirements.
  • Amazon EC2 Dedicated Host is also integrated with AWS License Manager, a service which helps you manage your software licenses, including Microsoft Windows Server and Microsoft SQL Server licenses.
  • Can be purchased On-Demand (hourly).
  • Can be purchased as a Reservation for up to 70% off the On-Demand price.
  • Can be used for regulatory requirements that may not support multi-tenant virtualization
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

EC2 pricing plan - Savings Plans Model?

A
  • Savings Plans is a flexible pricing model offering lower prices compared to On-Demand pricing, in exchange for a specific usage commitment (measured in $/hour) for a one or three-year period.
  • AWS offers three types of Savings Plans – Compute Savings Plans, EC2 Instance Savings Plans, and Amazon SageMaker Savings Plans.
  • Compute Savings Plans apply to usage across Amazon EC2, AWS Lambda, and AWS Fargate.
  • The EC2 Instance Savings Plans apply to EC2 usage, and Amazon SageMaker Savings Plans apply to Amazon SageMaker usage.
  • You can easily sign up a 1- or 3-year term Savings Plans in AWS Cost Explorer and manage your plans by taking advantage of recommendations, performance reporting, and budget alerts.
  • Savings Plans offers significant cost savings in exchange for a commitment to consistent amount of usage for a 1- or 3-year term.
    • For example, the EC2 Instance Savings Plans offer up to 72% savings compared to On-Demand pricing on your Amazon EC2 Instances usage.
    • The Amazon SageMaker Savings Plans offer up to 64% savings on your Amazon SageMaker services usage.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

EC2 pricing plan - Reserved Instance Model?

A
  • Reserved Instances provide you with a significant discount (up to 72%) compared to On-Demand Instance pricing.
  • Reserved Instances are assigned to a specific Availability Zone, they provide a capacity reservation, giving you additional confidence in your ability to launch instances when you need them.
  • Standard Reserved Instances
    • provide you with a significant discount (up to 72%) compared to On-Demand Instance pricing, and can be purchased for a 1-year or 3-year term.
    • Customers have the flexibility to change the Availability Zone, the instance size, and networking type of their Standard Reserved Instances.
  • Purchase Convertible Reserved Instances
    • If you need additional flexibility, such as the ability to use different instance families, operating systems, or tenancies over the Reserved Instance term.
    • Convertible Reserved Instances provide you with a significant discount (up to 54%) compared to On-Demand Instances and can be purchased for a 1-year or 3-year term.
  • Scheduled Reserved Instances
    • Purchasing Reserved Instances on a recurring schedule lets you pay for compute capacity by the hour and obtain a capacity reservation ahead of time for only the time periods you will need it.
    • Example, Think of a heavy capacity requiring exercise a company would have to perform a couple of days every month.
  • You can choose between three payment options when you purchase a Standard or Convertible Reserved Instance.
    • With the All Upfront option, you pay for the entire Reserved Instance term with one upfront payment. This option provides you with the largest discount compared to On-Demand Instance pricing.
    • With the Partial Upfront option, you make a low upfront payment and are then charged a discounted hourly rate for the instance for the duration of the Reserved Instance term.
    • The No Upfront option does not require any upfront payment and provides a discounted hourly rate for the duration of the term.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

EC2 Instance Types - General Purpose?

A

General purpose instances provide a balance of compute, memory and networking resources, and can be used for a variety of diverse workloads. These instances are ideal for applications that use these resources in equal proportions such as web servers and code repositories.

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

EC2 Instance Types - Compute Optimized?

A

Compute Optimized instances are ideal for compute bound applications that benefit from high performance processors. Instances belonging to this family are well suited for batch processing workloads, media transcoding, high performance web servers, high performance computing (HPC), scientific modeling, dedicated gaming servers and ad server engines, machine learning inference and other compute intensive applications.

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

EC2 Instance Types - Memory Optimized?

A

Memory optimized instances are designed to deliver fast performance for workloads that process large data sets in memory. in memory caching applications.

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

EC2 Instance Types - Accelerated Computing?

A

Accelerated computing instances use hardware accelerators, or co-processors, to perform functions, such as floating point number calculations, graphics processing, or data pattern matching, more efficiently than is possible in software running on CPUs.

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

EC2 Instance Types - Storage Optimized?

A

Storage optimized instances are designed for workloads that require high, sequential read and write access to very large data sets on local storage. They are optimized to deliver tens of thousands of low-latency, random I/O operations per second (IOPS) to applications. e.g. No SQL

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

Bootstrap scripts?

A
  • A bootstrap script is a script that runs when the instance first runs;
  • It passes user data to the EC2 instance and can be used to install applications(Like web server and databases), as well as do updates and more.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What is EC2 Metadata?

A
  • EC2 metadat is simple data about your EC2 instance.
  • This can include information such as private IP address, public IP address, hostname, security groups etc..
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

User Data vs. Metadata ?

A
  • User data is simple bootstrap scripts
  • Metadata is data about your EC2 instances
  • You can use bootstrap scripts(user data) to access metadata.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What the 3 types of virtual networking cards for AWS EC2?

A
  • ENI (Elastic Network Interface)
    • For basic; day-to-day networking
  • EN (Enhanced Networking)
    • Uses single root I/O virtualization (SR-IOV) to provide high performance.
  • EFA (Elastic Fabric Adapter)
    • Accelerates High Performance Computing (HPC) and machine learning applications.
20
Q

What is an ENI (Elastic Network Interface)?

A

An ENI is simply a virtual network card that allows:

  • Private IPv4 Addresses
  • Public IPv4 Address
  • MAC Address
  • 1 or More Security Groups
  • Many IPv6 Addresses
21
Q

Common ENI (Elastic Network Interface) Use cases?

A
  • Create a management network
  • Use network and security appliances in your VPC.
  • Create dual-homed instances with workloads / roles on distinct subnets.
  • Create a low-budget; high-availability solution.
22
Q

What is an EN (Enhanced Networking)?

A
  • For High-Performance Networking between 10 Gbps - 100 Gbps
  • Single Root I/O Virtualization (SR-IOV)
    • SR-IOV provides higher I/O performance and lower CPU utilization
  • Performance
    • Provides higher bandwidth, higher Packet Per Second (PPS) performance; and consistently lower inter-instance latencies.
23
Q

ENA Vs. VF?

A

Depending on your instance type; enhanced networking can be enabled using:

  • ELASTIC NETWORK ADAPTER (ENA)
    • Supports network speeds of up to 100 Gbps for supported instance types.
  • INTEL 82599 VIRTUAL FUNCTION (VF) INTERFACE
    • Supports network speeds of up to 10 Gbps for supported instance types.
    • Typically used on older instances
  • In any scenario question:
    • Choose ENA over VF interface
24
Q

What is an EFA (Elastic Fabric Adapter)?

A
  • A network device you can attach to your Amazon EC2 instance to accelerate High Performance Computing (HPC) and machine learning applications.
  • Provides lower and more consistent latency and higher throughput than the TCP transport traditional used in cloud-based HPC systems.
25
Q

EFA (Elastic Fabric Adapter) can use OS-BYPASS

A
  • It makes it a lot faster with much lower latency.
  • OS-bypass enables HPC and machine learning application to bypass the operating system system kernel and communicate directly with the EFA device. Not currently supported with Windows - Only Linux.
26
Q

What are the 3 Types of Placement Groups?

A
  • Cluster
  • Spead
  • Partition
27
Q

Cluster Placement groups?

A
  • Grouping of instances within a single Availability Zone.
  • Recommended for applications that need low network latency; high network throughput or both.
  • NB: Only certain instance types can launched into cluster placement group
28
Q

Spread Placement Groups

A
  • A spread placement group is a group of instances that are each placed on distinct underlying hardware.
  • Spread placement groups are recommended for applications that have a small number of critical instances that should be kept seperate from each other.
29
Q

Partition Placement Groups

A
  • Each partition placement group has it’s own set of racks.
  • Each rack has it’s own network and power source.
  • No two partitions within a placement group share the same racks;allowing you to isolate the impact of hardware failure within your application.
  • EC2 devides each group into logical segments called partitions.
30
Q

Placement Groups(Exam Tips)?

A
  • A cluster placement group can’t span miltiple Availability Zones, whereas a spread placement group and partition placment group can.
  • Only certain types of instances can be launched in a placement group (Compute optimized, GPU, memory optimized, Storage optimized)
  • AWS recommends homogenous instances(Same type of instances) within cluster placement groups
  • You can’t merge placement groups
  • You can move an existing instance into a placement group. Before you move the instance; the instance must be in the stopped state. You can move or remove an instance using the AWS CLI or an AWS SDK; but you can’t do it via the console yet.
31
Q

Dedicated Hosts (Exam Tips)?

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 including Windows Server, Microsoft SQL server and SUSE Linux Enterprise Server.
32
Q

Amazon EC2 Spot Instances?

A
  • Amazon EC2 Spot Instances let you take advantage of unused EC2 capacity in the AWS Cloud.
  • Spot instances are available at up a 90% discount compared to ON-Demand prices.
33
Q

Amazon EC2 Spot prices?

A
  • To use Spot instances, you must first decide on your maximum Spot price.
  • The instance will be provisioned so long as the Spot price is BELOW your maximum Spot price.
  • The hourly Spot price varies depending on capacity and region.
  • If the Spot price goes above your maximum, you have 2 minutes to choose whether to stop or teminate your instance.
34
Q

Amazon EC2 Spot Blocks?

A
  • You can also use a Spot block to stop your Spot Instances from being terminated even if the Spot price goes over your max Spot price.
  • You can set Spot blocks for between 1 to 6 hours currently.
35
Q

Terminating Spot Instances

A
  • If request type is persistent, you have to cancel the request first before you can terminate the spot instance.
36
Q

Spot Fleets?

A
  • A Spot Fleet is a collection of Spot instances and (optionally) On-Demand Instances.
  • The Spot Fleet attempts to launch the number of Spot instances and On-Demand instances to meet the target capacity you specified in the Spot Fleet request.
  • The request for Spot instances is fulfilled if there is available capacity and maximum prices you specified i nthe request exceeds the current Spot price.
  • The Spot Fleet also attempts to maintain it’s target capacity fleet if your Spot Instances are interrupted.
  • Spot Fleets will try and match the target capacity with your price restraints.
37
Q

Launch Pools

A
  • Spot Fleets will try and match the target capacity with your price restraints.
  • Set up different launch pools, Define things like EC2 instance type, operating system, and Availability Zone.
  • You can have multiple pools, and the fleet will choose the best way to implement depending on the strategy you define.
  • Spot Fleets will stop launching instances once you reach your price threshold or capacity desire.
38
Q

Spot Fleet Strategies

A
  • CapacityOptimized
    • The spot instances come from the pool with optimal capacity for the number of instances launching.
  • Diversified
    • The Spot Instances are distributed across all pools.
  • LowestPrice
    • The spot Instances come from the pool with the lowest price. this is the default strategy.
  • InstancePoolsToUseCount
    • ​The Spot Instances are distributed across the number of Spot instance pools you specify. This parameter is valid only when used in combination with LowestPrice.