
November 20, 2021 | 193 Views
The future of tech, today.
November 20, 2021 | 193 Views
Amazon EC2 provides a wide selection of instance types optimized to fit different use cases. Instances are
virtual servers that can run applications. They have varying combinations of CPU, memory, storage, and
networking capacity, and give you the flexibility to choose the appropriate mix of resources for your
applications.
These instance types are also in certain families, some of which are below:
Your instance will be launched with an attached Amazon Elastic Block Store (Amazon EBS) volume. You can
attach additional Amazon EBS volumes and instance store volumes to your instance, or edit the settings of
the root volume. You can also attach additional EBS volumes after launching an instance, but not instance
store volumes.
You can choose the size of the volume in a GiB, as well as one of four storage types, namely;
A security group is a set of firewall rules that control the traffic for your instance. On this page, you
can add rules to allow specific traffic to reach your instance. For example, if you want to set up a web
server and allow Internet traffic to reach your instance, add rules that allow unrestricted access to the
HTTP and HTTPS ports. You can create a new security group or select from an existing one below.
Even if you aren’t using the free tier there are many ways to configure your use of EC2 so that you can
ensure you are getting the best price and using only what you need to achieve performant
architecture.
The four different pricing options for EC2 are as follows;
On-Demand is what it sounds like. You pay for computing capacity by the hour (or a minimum of 60 seconds)
for as long as you need it, with the ability to start and stop your instance whenever you need to. You can
also change the compute capacity on the fly, allowing you to mirror the needs of your application
seamlessly. It is also the most costly pricing option when it comes to EC2.
There are some use cases in which On-Demand instances are perfect:
Reserved instances offer you a potential saving of up to 75% compared to On-Demand pricing. You basically
tell AWS that you want to use certain instances for a certain period of time, for either 1 or 3 years and
then you either pay all upfront, partial upfront or no upfront — with an all upfront 3-year plan providing
the biggest savings. You can also optionally have convertible reserved instances where you can change the
instance type as many times as you need to fulfill your needs.
The best use cases for reserved instances are:
Spot instances are the cheapest option of all the payment options for EC2. You basically bid for unused EC2 capacity from AWS at a massive discount. However, the downside is that as soon as the bid price goes past your bid, AWS will reclaim the instances, meaning potential downtime for your application. Spot instances, therefore, are ideal for the following:
Savings Plans are a flexible pricing model that offers low prices on EC2, Fargate and Lambda – in exchange
for a commitment to a consistent amount of usage (measured in $/hour) for a 1 or 3-year term.
They may sound similar, but there are a few differences between Savings Plans and Reserved Instances.
Reserved Instances offer a discount against On-Demand pricing based on committed utilization, whereas
Savings Plans offer a discount based on committed spend.
A further difference between the AWS Compute Savings Plans and using Reserved Instances is that Savings
Plans not only to apply to the amount spent on EC2 Instances, but also to the amount spent on other compute
services too, namely AWS Fargate and Lambda.
Please note that this was just a brief introduction to EC2 because you could likely write an entire book on
this subject alone. I hope this has served as an informative introduction to what EC2 is, how it can be
used, and some of the pricing models it uses alongside all of the other aspects of EC2.