Module 2: Introduction Flashcards
What’s the purpose of EC2?
EC2 provides secure, resizable compute capacity in the cloud as Amazon EC2 instances.
In business, you’re going to need servers to power your business and your applications. You need raw compute capacity to host your applications and provide the compute power that your business needs.
When you’re working with AWS, those servers are virtual. And the service you use to gain access to virtual servers is called EC2.
Using EC2 for compute is highly flexible, cost effective, and quick when you compare it to running your own servers on premises in a data center that you own.
With EC2, it’s much easier to get started. AWS took care of the hard part for you already. AWS already built and secured the data centers. AWS has already bought the servers, racked and stacked them, and they are already online ready to be used. AWS is constantly operating a massive amount of compute capacity. And you can use whatever portion of that capacity when you need it. All you have to do is request the EC2 instances you want and they will launch and boot up, ready to be used within a few minutes. Once you’re done, you can easily stop or terminate the EC2 instances. You’re not locked in or stuck with servers that you don’t need or want. Your usage of EC2 instances can vary greatly over time. And you only pay for what you use. Because with EC2, you only pay for running instances, not stopped or terminated instances.
Whats EC2 stand for?
EC2 (Elastic Compute)
EC2 (Amazon Elastic Compute Cloud)
Define Raw compute capacity
Raw compute capacity refers to the fundamental processing power and resources needed to run computer applications and perform computations. It is essentially the ability of a computing system, typically a server or data center, to perform tasks and calculations.
Define computations
“Computations” refer to the process of performing calculations, operations, or mathematical tasks using a computer or any programmable device. In the context of computing and technology, computations involve manipulating data or performing actions based on algorithms, mathematical formulas, or instructions provided by software programs.
Define a virtual server
1) Think of a virtual server like a computer that exists only inside another computer. It’s a bit like having a special computer room inside your regular computer. This virtual computer can do its own tasks, like running programs and websites, but it lives inside your real computer and shares its resources, like memory and processing power. So, it’s like a computer inside a computer, but it acts on its own.
2)A virtual server is like having different imaginary friends inside a big toy box. Even though they all use the same toy box, each friend thinks they have their very own box with their own toys. They can play and do different things without bothering each other, even though it’s all in the same toy box. So, it’s like having lots of playmates in one big toy box, but they don’t mix up their toys.
3) Imagine a computer that can pretend to be many different computers at the same time. It’s like having one amazing costume that can turn into lots of different characters. These pretend computers can all use the same real computer’s powers, like its brain and storage space, but they act like they have their own brains and can do their own things. It’s like having a supercomputer that can do many jobs all at once by pretending to be different computers.
What is an instance?
An instance is a virtual server in the AWS Cloud.
With Amazon EC2, you can set up and configure the operating system and applications that run on your instance.
Whats a multitenancy?
EC2 runs on top of physical host machines managed by AWS using virtualization technology. When you spin up an EC2 instance, you aren’t necessarily taking an entire host to yourself. Instead, you are sharing the host with multiple other instances, otherwise known as virtual machines. And a hypervisor running on the host machine is responsible for sharing the underlying physical resources between the virtual machines. This idea of sharing underlying hardware is called multitenancy. The hypervisor is responsible for coordinating this multitenancy and it is managed by AWS. The hypervisor is responsible for isolating the virtual machines from each other as they share resources from the host. This means EC2 instances are secure. Even though they may be sharing resources, one EC2 instance is not aware of any other EC2 instances also on that host. They are secure and separate from each other.
Luckily, this is not something you, yourself, need to set up. But it’s important to know the idea of multitenancy and have a high level understanding of how this works. EC2 gives you a great deal of flexibility and control. Not only can you spin up new servers or take them offline at will, but you also have the flexibility and control over the configuration of those instances.
Traditionally, how did people go about to have servers powering their systems?
With traditional on-premises resources, you have to do the following:
. Spend money upfront to purchase hardware.
. Wait for the servers to be delivered to you.
. Install the servers in your physical data center.
. Make all the necessary configurations.
How does Amazon EC2 instance better compared to the traditional way?
With Amazon EC2 instance you can use a virtual server to run applications in the AWS Cloud.
. You can provision and launch an Amazon EC2 instance within minutes.
. You can stop using it when you have finished running a workload.
. You pay only for the compute time you use when an instance is running, not when it is stopped or terminated.
. You can save costs by paying only for server capacity that you need or want.
Amazon EC2 instance types
Amazon EC2 instance types are optimized for different tasks. When selecting an instance type, consider the specific needs of your workloads and applications. This might include requirements for compute, memory, or storage capabilities.
. General purpose instances
. Compute optimized instances
. Memory optimized instances
. Accelerated computing instances
. Storage optimized instances
. Knowledge check
Amazon EC2 instance types:
- General purpose instances
General purpose instances provide a balance of compute, memory, and networking resources. You can use them for a variety of workloads, such as:
. application servers
. servers
. backend servers for enterprise applications
. small and medium databases
Suppose that you have an application in which the resource needs for compute, memory, and networking are roughly equivalent. You might consider running it on a general purpose instance because the application does not require optimization in any single resource area.
Amazon EC2 instance types:
- Compute optimized instances
Compute optimized instances are ideal for compute-bound applications that benefit from high-performance processors. Like general purpose instances, you can use compute optimized instances for workloads such as web, application, and gaming servers.
However, the difference is compute optimized applications are ideal for high-performance web servers, compute-intensive applications servers, and dedicated gaming servers. You can also use compute optimized instances for batch processing workloads that require processing many transactions in a single group.
Amazon EC2 instance types:
- Memory optimized instances
Memory optimized instances are designed to deliver fast performance for workloads that process large datasets in memory. In computing, memory is a temporary storage area. It holds all the data and instructions that a central processing unit (CPU) needs to be able to complete actions. Before a computer program or application is able to run, it is loaded from storage into memory. This preloading process gives the CPU direct access to the computer program.
Suppose that you have a workload that requires large amounts of data to be preloaded before running an application. This scenario might be a high-performance database or a workload that involves performing real-time processing of a large amount of unstructured data. In these types of use cases, consider using a memory optimized instance. Memory optimized instances enable you to run workloads with high memory needs and receive great performance.
Amazon EC2 instance types:
- Accelerated computing instances
–
Accelerated computing instances use hardware accelerators, or coprocessors, to perform some functions more efficiently than is possible in software running on CPUs. Examples of these functions include floating-point number calculations, graphics processing, and data pattern matching.
In computing, a hardware accelerator is a component that can expedite data processing. Accelerated computing instances are ideal for workloads such as graphics applications, game streaming, and application streaming.
Amazon EC2 instance types:
- Storage optimized instances
Storage optimized instances are designed for workloads that require high, sequential read and write access to large datasets on local storage. Examples of workloads suitable for storage optimized instances include distributed file systems, data warehousing applications, and high-frequency online transaction processing (OLTP) systems.
In computing, the term input/output operations per second (IOPS) is a metric that measures the performance of a storage device. It indicates how many different input or output operations a device can perform in one second. Storage optimized instances are designed to deliver tens of thousands of low-latency, random IOPS to applications.
You can think of input operations as data put into a system, such as records entered into a database. An output operation is data generated by a server. An example of output might be the analytics performed on the records in a database. If you have an application that has a high IOPS requirement, a storage optimized instance can provide better performance over other instance types not optimized for this kind of use case.
knowledge check quiz
What are Amazon EC2 pricing?
With Amazon EC2, you pay only for the compute time that you use. Amazon EC2 offers a variety of pricing options for different use cases.
. On-Demand
. Amazon EC2 Savings Plans
. Reserved Instances
. Spot Instances
. Dedicated Hosts
. Knowledge check
What are Amazon EC2 pricing?
- On-Demand
On-Demand Instances are ideal for short-term, irregular workloads that cannot be interrupted. No upfront costs or minimum contracts apply. The instances run continuously until you stop them, and you pay for only the compute time you use.
Sample use cases for On-Demand Instances include developing and testing applications and running applications that have unpredictable usage patterns. On-Demand Instances are not recommended for workloads that last a year or longer because these workloads can experience greater cost savings using Reserved Instances.
knowledge check quiz
What are Amazon EC2 pricing?
- Reserved Instances
Reserved Instances are a billing discount applied to the use of On-Demand Instances in your account.
There are two available types of Reserved Instances:
- Standard Reserved Instances
- Convertible Reserved Instances
You can purchase Standard Reserved and Convertible Reserved Instances for a 1-year or 3-year term. You realize greater cost savings with the 3-year option.
Standard Reserved Instances: This option is a good fit if you know the EC2 instance type and size you need for your steady-state applications and in which AWS Region you plan to run them. Reserved Instances require you to state the following qualifications:
Instance type and size: For example, m5.xlarge
Platform description (operating system): For example, Microsoft Windows Server or Red Hat Enterprise Linux
Tenancy: Default tenancy or dedicated tenancy
You have the option to specify an Availability Zone for your EC2 Reserved Instances. If you make this specification, you get EC2 capacity reservation. This ensures that your desired amount of EC2 instances will be available when you need them.
Convertible Reserved Instances: If you need to run your EC2 instances in different Availability Zones or different instance types, then Convertible Reserved Instances might be right for you. Note: You trade in a deeper discount when you require flexibility to run your EC2 instances.
At the end of a Reserved Instance term, you can continue using the Amazon EC2 instance without interruption. However, you are charged On-Demand rates until you do one of the following:
Terminate the instance.
Purchase a new Reserved Instance that matches the instance attributes (instance family and size, Region, platform, and tenancy).
What are Amazon EC2 pricing?
- EC2 Instance Savings Plans
AWS offers Savings Plans for a few compute services, including Amazon EC2. EC2 Instance Savings Plans reduce your EC2 instance costs when you make an hourly spend commitment to an instance family and Region for a 1-year or 3-year term. This term commitment results in savings of up to 72 percent compared to On-Demand rates. Any usage up to the commitment is charged at the discounted Savings Plans rate (for example, $10 per hour). Any usage beyond the commitment is charged at regular On-Demand rates.
The EC2 Instance Savings Plans are a good option if you need flexibility in your Amazon EC2 usage over the duration of the commitment term. You have the benefit of saving costs on running any EC2 instance within an EC2 instance family in a chosen Region (for example, M5 usage in N. Virginia) regardless of Availability Zone, instance size, OS, or tenancy. The savings with EC2 Instance Savings Plans are similar to the savings provided by Standard Reserved Instances.
Unlike Reserved Instances, however, you don’t need to specify up front what EC2 instance type and size (for example, m5.xlarge), OS, and tenancy to get a discount. Further, you don’t need to commit to a certain number of EC2 instances over a 1-year or 3-year term. Additionally, the EC2 Instance Savings Plans don’t include an EC2 capacity reservation option.
Later in this course, you’ll review AWS Cost Explorer, which you can use to visualize, understand, and manage your AWS costs and usage over time. If you’re considering your options for Savings Plans, you can use AWS Cost Explorer to analyze your Amazon EC2 usage over the past 7, 30, or 60 days. AWS Cost Explorer also provides customized recommendations for Savings Plans. These recommendations estimate how much you could save on your monthly Amazon EC2 costs, based on previous Amazon EC2 usage and the hourly commitment amount in a 1-year or 3-year Savings Plan.
What are Amazon EC2 pricing?
- Spot Instances
Spot Instances are ideal for workloads with flexible start and end times, or that can withstand interruptions. Spot Instances use unused Amazon EC2 computing capacity and offer you cost savings at up to 90% off of On-Demand prices.
Suppose that you have a background processing job that can start and stop as needed (such as the data processing job for a customer survey). You want to start and stop the processing job without affecting the overall operations of your business. If you make a Spot request and Amazon EC2 capacity is available, your Spot Instance launches. However, if you make a Spot request and Amazon EC2 capacity is unavailable, the request is not successful until capacity becomes available. The unavailable capacity might delay the launch of your background processing job.
After you have launched a Spot Instance, if capacity is no longer available or demand for Spot Instances increases, your instance may be interrupted. This might not pose any issues for your background processing job. However, in the earlier example of developing and testing applications, you would most likely want to avoid unexpected interruptions. Therefore, choose a different EC2 instance type that is ideal for those tasks.
What are Amazon EC2 pricing?
- Dedicated Hosts
Dedicated Hosts are physical servers with Amazon EC2 instance capacity that is fully dedicated to your use.
You can use your existing per-socket, per-core, or per-VM software licenses to help maintain license compliance. You can purchase On-Demand Dedicated Hosts and Dedicated Hosts Reservations. Of all the Amazon EC2 options that were covered, Dedicated Hosts are the most expensive.
What is the difference between Amazon EC2 Savings Plans and Spot Instances?
Amazon EC2 Savings Plans:
. Amazon EC2 Savings Plans are ideal for workloads that involve a consistent amount of compute usage over a 1-year or 3-year term.
With Amazon EC2 Savings Plans, you can reduce your compute costs by up to 72% over On-Demand costs.
Spot Instances?
. Spot Instances are ideal for workloads with flexible start and end times, or that can withstand interruptions. With Spot Instances, you can reduce your compute costs by up to 90% over On-Demand costs.
Unlike Amazon EC2 Savings Plans, Spot Instances do not require contracts or a commitment to a consistent amount of compute usage.
What is scalability?
Scalability involves beginning with only the resources you need and designing your architecture to automatically respond to changing demand by scaling out or in. As a result, you pay for only the resources you use. You don’t have to worry about a lack of computing capacity to meet your customers’ needs.
What is the purpose of Amazon EC2 Auto Scaling?
If you wanted the scaling process to happen automatically, which AWS service would you use? The AWS service that provides this functionality for Amazon EC2 instances is Amazon EC2 Auto Scaling.
Amazon EC2 Auto Scaling enables you to automatically add or remove Amazon EC2 instances in response to changing application demand. By automatically scaling your instances in and out as needed, you can maintain a greater sense of application availability.
Within Amazon EC2 Auto Scaling, you can use two approaches: dynamic scaling and predictive scaling.
- Dynamic scaling responds to changing demand.
- Predictive scaling automatically schedules the right number of Amazon EC2 instances based on predicted demand.
To scale faster, you can use dynamic scaling and predictive scaling together.
Questions