BCSE355 AWS Session4
BCSE355 AWS Session4
Services
02/05/2025 BCSE355_AWS 2
AWS compute services
Amazon Web Services (AWS) offers many compute services
02/05/2025 BCSE355_AWS 3
AWS compute services
02/05/2025 BCSE355_AWS 4
AWS compute services
02/05/2025 BCSE355_AWS 5
AWS compute services
02/05/2025 BCSE355_AWS 6
Amazon Elastic Compute Cloud
(Amazon EC2)
02/05/2025 BCSE355_AWS 7
Amazon Elastic Compute
Cloud (Amazon EC2)
Provides virtual machines— • Elastic refers to the fact that you can
referred to as EC2 instances—in easily increase or decrease the
the cloud. number of servers you run to
Gives you full control over the support an application
guest operating system automatically, and you can also
(Windows or Linux) on each increase or decrease the size of
instance. existing servers
You can launch instances of any • Compute refers to reason why most
size into an Availability Zone users run servers in the first place,
anywhere in the world. which is to host running
Launch instances from applications or process data actions
Amazon Machine Images that require compute resources,
(AMIs). including processing power (CPU)
Launch instances with a few and memory (RAM)
clicks or a line of code, and
they are ready in minutes. • Cloud refers to the fact that the EC2
You can control traffic to and from instances that you run are hosted in
instances. the cloud
02/05/2025 BCSE355_AWS 8
What is Amazon EC2?
• Provides on-demand, scalable computing capacity in the
Amazon Web Services (AWS) Cloud.
• Reduces hardware costs so you can develop and deploy
applications faster
• Launch as many or as few virtual servers as you need,
configure security and networking, and manage storage
• You can add capacity (scale up) to handle compute-heavy
tasks, such as monthly or yearly processes, or spikes in
website traffic. When usage decreases, you can reduce
capacity (scale down) again.
• a virtual server in the AWS Cloud
02/05/2025 BCSE355_AWS 9
Launching an Amazon EC2
instance
1. Amazon Machine Image (AMI)
Provides information that is required to launch an EC2 instance. You must specify
a source AMI when you launch an instance
Contains a Windows or Linux operating system
Often also has some software pre-installed
Types of AMIs :
Quick Start –AWS offers a number of pre-built AMIs for launching your instances.
These AMIs include many Linux and Windows options.
My AMIs –These AMIs are AMIs that you created.
AWS Marketplace –The AWS Marketplace offers a digital catalogue that lists
thousands of software solutions. These AMIs can offer specific use cases to help
you get started quickly.
Community AMIs –These AMIs are created by people all around the world.
02/05/2025 BCSE355_AWS 10
Launching an Amazon EC2
instance
2. Select an instance type
• After you choose the AMI for launching the instance, you must choose
on an instance type.
• optimized to fit different use cases
02/05/2025 BCSE355_AWS 11
Launching an Amazon EC2
instance
2. Select an instance type: EC2 instance type naming and sizes
02/05/2025 BCSE355_AWS 12
Launching an Amazon EC2
instance
2. Select an instance type: EC2 instance type naming and sizes
Instance types vary in several ways, including: CPU type, CPU or core
count, storage type, storage amount, memory amount, and network
performance.
T3 instances provide burstable performance general purpose instances
that provide a baseline level of CPU performance with the ability to burst
above the baseline.
websites and web applications, development environments, build servers, code
repositories, microservices, test and staging environments, and line-of-business
applications
C5 instances are optimized for compute-intensive workloads, and
deliver cost-effective high performance at a low price per compute ratio.
scientific modeling, batch processing, ad serving, highly scalable multiplayer gaming,
and video encoding
R5 instances are optimized for memory-intensive applications
high-performance databases, data mining and analysis, in-memory databases,
distributed web-scale in-memory caches, applications that perform real-time
processing of unstructured big data, Apache Hadoop or Apache Spark clusters, and
other enterprise applications
02/05/2025 BCSE355_AWS 13
Instance lifecycle
• Transitions through different states from the moment you launch
it through to its termination – lifecycle
02/05/2025 BCSE355_AWS 14
Instance lifecycle
Instance Description Instance usage
state billing
02/05/2025 BCSE355_AWS 15
Instance lifecycle
Instance state Description Instance usage billing
02/05/2025 BCSE355_AWS 16
Instance purchasing
options
On-Demand Instances
Pay for compute capacity by the second with no long-
term commitments
Full control over the instance's lifecycle—you decide when to
launch, stop, hibernate, start, reboot, or terminate it
No long-term commitment
02/05/2025 BCSE355_AWS 18
Instance purchasing
options
Reserved Instances
Key variables that determine Reserved Instance pricing
• Instance attributes
• Instance type
• Region
• Tenancy
• Platform
• Term commitment
• One-year: A year is defined as 31536000 seconds (365 days).
• Three-year: Three years is defined as 94608000 seconds (1095 days).
• Payment options
• All Upfront - Partial Upfront - No Upfront
• Offering class
• Standard - Convertible
02/05/2025 BCSE355_AWS 19
Instance purchasing
options
Spot Instances
• uses spare EC2 capacity that is available for less
than the On-Demand price
• enable you to request unused EC2 instances at
steep discounts
• The hourly price for a Spot Instance is called a Spot
price
• Spot Instances are a cost-effective choice if you can
be flexible about when your applications run and if
your applications can be interrupted
• Spot Instances are well-suited for data analysis,
batch jobs, background processing, and optional
tasks
02/05/2025 BCSE355_AWS 20
Instance purchasing
options
Spot Instances On-Demand Instances
Launch time Can only be launched immediately if the Can only be launched immediately
Spot Instance request is active and capacity if you make a manual launch
is available. request and capacity is available.
Available If capacity is not available, the Spot Instance If capacity is not available when
capacity request continues to automatically make the you make a launch request, you
launch request until capacity becomes get an insufficient capacity error
available. (ICE).
Hourly price The hourly price for Spot Instances varies The hourly price for On-Demand
based on long-term supply and demand. Instances is static.
Rebalance The signal that Amazon EC2 emits for a You determine when an On-
recommendat running Spot Instance when the instance is Demand Instance is interrupted
ion at an elevated risk of interruption. (stopped, hibernated, or
terminated).
Instance You can stop and start an Amazon EBS- You determine when an On-
interruption backed Spot Instance. In addition, Amazon Demand Instance is interrupted
EC2 can interrupt an individual Spot Instance (stopped, hibernated, or
if capacity is no longer available. terminated).
02/05/2025 BCSE355_AWS 21
Instance purchasing
options
Amazon EC2 Dedicated Hosts
• https://
docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.ht
ml
• https://
docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-lifecy
cle.html
• https://
docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-purchasin
g-options.html
02/05/2025 BCSE355_AWS 23