BECE 355L AWS Cloud Module 2
BECE 355L AWS Cloud Module 2
BECE 355L AWS Cloud Module 2
for
Module 5:
AWS
Architectural
Best Module 4: AWS Security and compliance
practices
Module 3: AWS
Database
services
• EC2 uses the AWS Management Console, the AWS Command Line Interface (CLI), or AWS Software Developer
Kits (SDKs) for managing the scaling according to changing needs and makes it simple to deploy virtual servers
and maintain storage.
• During the setup, AMI(Amazon Machine Image) has to be created, which includes an operating system, apps, and
configurations. After launching an instance, in the console, the user can either select an AMI template or create one.
That AMI is loaded to the Amazon S3(Simple Storage Service), and it is registered with AWS EC2, creating an
AMI identifier, at which point users can launch instances as per the requirement.
Amazon EC2 (Elastic Compute Module-2; Topic-1: Amazon EC2 (Elastic Compute Cloud)
Cloud)-Key Features
• Elasticity and Scalability: EC2 allows users to scale computing capacity up or down easily based on
demand. This elasticity means you can quickly scale resources to handle traffic spikes or varying
workloads.
• Variety of Instance Types: EC2 offers a wide selection of instance types optimized for different use cases,
such as compute-optimized, memory-optimized, storage-optimized, etc. This allows you to choose
instances that best fit your application's requirements.
• Configurability: Users have full control over the configuration of their instances. You can choose the
CPU, memory, storage, and networking capacity that meets your needs.
• Pay-As-You-Go Pricing: EC2 follows a pay-as-you-go model where you pay only for the compute
capacity you actually use. This makes it cost-effective since you can stop, start, and terminate instances as
needed.
• Integration with Other AWS Services: EC2 integrates seamlessly with other AWS services like Amazon
S3 (storage), RDS (Relational Database Service), VPC (Virtual Private Cloud), and more. This allows you
to build complex and scalable applications.
• Security: EC2 provides various security features, including security groups and network access control
lists (ACLs) to control inbound and outbound traffic to instances. AWS Identity and Access Management
(IAM) is used to manage user access.
• Monitoring and Management: AWS provides monitoring tools like Amazon CloudWatch, which allows
you to monitor the performance of your instances and set alarms for certain thresholds.
Module-2; Topic-1: Amazon EC2 (Elastic Compute Cloud)
Amazon EC2 (Elastic Compute Cloud)-Key Features
• Instances- Virtual computing environments.
• Each instance type provides different amounts of
CPU, memory, storage, and networking capacity.
• Various configurations of CPU, memory, storage,
and networking capacity is provided in instance
type.
• Amazon Machine Images (preconfigured
templates for instances)- That defines the need for
our server (including the operating system and
additional software).
• An AMI is a template that contains the software
configuration (operating system, application
server, applications, etc.) required to launch an
instance. • EC2 is used to launch virtual servers based on
• Key Pairs- Key pair is used to secure login your requirement, configure security and
information for our instances. networking, and manage storage.
• AWS stores the public key, and the private key is • EC2 enables us to scale up or down to handle
downloaded by the user changes in requirements or spikes in popularity,
reducing the need to forecast traffic.
Module-2; Topic-1: Amazon EC2 (Elastic Compute Cloud)
Amazon EC2 (Elastic Compute Cloud)-Key Features
• Security Groups: These act as virtual firewalls for your
instances to control inbound and outbound traffic.
• You can specify rules that allow traffic to your
instances based on protocols, ports, and IP
addresses.
• EBS (Elastic Block Store)-Storage volume: EBS
provides persistent block storage volumes for use with
EC2 instances.
• It allows you to create volumes that can be attached
to instances and detached as needed.
• This volume stores the data temporarily, that's
deleted when you stop, hibernate, or terminate any
instance.
• Placement Groups: These allow you to influence the
placement of instances within the AWS infrastructure to
meet the needs of your workload (e.g., ensuring low-
latency networking between instances).
Module-2; Topic-1: Amazon EC2 (Elastic Compute Cloud)
Amazon EC2 (Elastic Compute Cloud)-Usage
• Launching Instances: To use EC2, you start by
launching instances from an AMI. You can choose the
instance type, specify the number of instances, and
configure other details such as networking and storage.
• Managing Instances: Once launched, you can manage
your instances through the AWS Management Console,
AWS CLI, or SDKs. This includes starting, stopping,
terminating, and monitoring instances.
• Scaling: EC2 allows horizontal scaling by launching
multiple instances to distribute the workload. Auto
Scaling can be configured to automatically adjust the
number of instances based on criteria you define (e.g.,
CPU utilization, network traffic).
• Data Storage: EC2 instances can use various types of • Networking: EC2 instances can be deployed within
storage including EBS volumes for persistent storage a Virtual Private Cloud (VPC), allowing you to
and instance store volumes for temporary storage. define a virtual network environment including
Amazon S3 is often used for durable and scalable object subnets, route tables, and IP ranges. This provides
storage. control over network security and connectivity.
Module-2; Topic-1: Amazon EC2 (Elastic Compute Cloud)
Amazon EC2 (Elastic Compute Cloud)-Benefit from usage
• AWS Regions and Availability Zones (AZs) to
improve availability and reduce latency.
• Access to Amazon Time Sync Service, a highly
accurate, reliable and available time source.
• Amazon EC2 Fleet to optimize scale,
performance and cost.
• Elastic Fabric Adapter to run applications
requiring high levels of interinstance
communications at scale on AWS.
• AWS Private Link to access Amazon services
in a highly performing, highly available
manner.
• Regular maintenance performed by AWS with
minimal disruptions across instances.
Module-2; Topic-1: Amazon EC2 (Elastic Compute Cloud)
Amazon EC2 (Elastic Compute Cloud)
• In general, the instances provided are software-based,
each unique instance is scalable and users can create a
virtual data centre over the cloud whenever they want,
with the help of on-premise computing infrastructure.
• This kind of liberty is possible because of the SOAP
(Simple Object Access Protocol) API support.
• The instance, commonly known as Virtual Machine is
created using Amazon Virtual Image and is hosted on
Xen Hypervisor, a software for server virtualization.
• Instances Type
• General purpose: These instances can be used for
• Compute-optimized: These instances
many different workloads, especially workloads
that depend upon a balance of compute, memory are meant for compute-bound or
and networking resources. compute-intensive applications, such as
• This instance type is used a variety of workloads, batch processing, media transcoding
such as application servers, gaming servers, and High performance Computing
backend servers for enterprise applications, and (HPC). Optimized instances for
small and medium databases. workloads such as web, application, and
gaming servers.
Module-2; Topic-1: Amazon EC2 (Elastic Compute Cloud)
Amazon EC2 (Elastic Compute Cloud)
• Memory-optimized: This set of instances delivers fast
performance for workloads that process large memory
data sets.
• Accelerated computing: These instances use hardware
accelerators to perform certain functions more efficiently
compared to CPU software. Examples of these functions
include floating-point number calculations, graphics
processing, and data pattern matching.
• Storage-optimized: These instances deliver a high
amount of low-latency, random I/O operations per
second (IOPS) for workloads that require high sequential
read/write access to large local data sets.
• High performance Computing (HPC)-optimized:
These instances offer the best price performance for
running HPC workloads at scale on AWS, such as
complex simulations and deep learning workloads.
Module-2; Topic-1: Amazon EC2 (Elastic Compute Cloud)
EC2- Pricing Options
Module-2; Topic-1: Amazon EC2 (Elastic Compute Cloud)
EC2- Pricing Options
On Demand
• It allows you to pay a fixed rate by the hour or even by the second with no
commitment.
• Linux instance is by the second and windows instance is by the hour.
• On Demand is perfect for the users who want low cost and flexibility of
Amazon EC2 without any up-front investment or long-term commitment.
• It is suitable for the applications with short term, spiky or unpredictable
workloads that cannot be interrupted.
• It is useful for the applications that have been developed or tested on Amazon
EC2 for the first time.
• On Demand instance is recommended when you are not sure which instance
type is required for your performance needs.
Module-2; Topic-1: Amazon EC2 (Elastic Compute Cloud)
EC2- Pricing Options
Reserved
• It is a way of making a reservation with Amazon or we can say that we
make a contract with Amazon. The contract can be for 1 or 3 years in
length.
• In a Reserved instance, you are making a contract means you are paying
some upfront, so it gives you a significant discount on the hourly charge for
an instance.
• It is useful for applications with steady state or predictable usage.
• It is used for those applications that require reserved capacity.
• Users can make up-front payments to reduce their total computing costs.
For example, if you pay all your upfronts and you do 3 years contract, then
only you can get a maximum discount, and if you do not pay all upfronts
and do one year contract then you will not be able to get as much discount
as you can get If you do 3 year contract and pay all the upfronts.
Module-2; Topic-1: Amazon EC2 (Elastic Compute Cloud)
EC2- Pricing Options
• Types of Reserved Instances:
• Standard Reserved Instances
• Convertible Reserved Instances
• Scheduled Reserved Instances
• Standard Reserved Instances: It provides a discount of up to 75% off on
demand. For example, you are paying all up-fronts for 3 year contract. It is useful
when your Application is at the steady-state.
• Convertible Reserved Instances: It provides a discount of up to 54% off on
demand.
• It provides the feature that has the capability to change the attributes of RI as
long as the exchange results in the creation of Reserved Instances of equal or
greater value.
• Like Standard Reserved Instances, it is also useful for the steady state
applications.
• Scheduled Reserved Instances: Scheduled Reserved Instances are available to
launch within the specified time window you reserve.
• It allows you to match your capacity reservation to a predictable recurring
schedule that only requires a fraction of a day, a week, or a month.
Module-2; Topic-1: Amazon EC2 (Elastic Compute Cloud)
EC2- Pricing Options
Spot Instances
• It allows you to bid for a price whatever price that you want for instance
capacity, and providing better savings if your applications have flexible start
and end times.
• Spot Instances are useful for those applications that have flexible start and end
times.
• It is useful for those applications that are feasible at very low compute prices.
• It is useful for those users who have an urgent need for large amounts of
additional computing capacity.
• EC2 Spot Instances provide less discounts as compared to On Demand prices.
• Spot Instances are used to optimize your costs on the AWS cloud and scale
your application's throughput up to 10X.
• EC2 Spot Instances will continue to exist until you terminate these instances.
Module-2; Topic-1: Amazon EC2 (Elastic Compute Cloud)
EC2- Pricing Options
Dedicated Hosts
• A dedicated host is a physical server with EC2 instance capacity
which is fully dedicated to your use.
• The physical EC2 server is the dedicated host that can help you to
reduce costs by allowing you to use your existing server-bound
software licenses.
• For example, Vmware, Oracle, SQL Server depending on the licenses
that you can bring over to AWS and then they can use the Dedicated
host.
• Dedicated hosts are used to address compliance requirements and
reduces host by allowing to use your existing server-bound server
licenses.
• It can be purchased as a Reservation for up to 70% off On-Demand
price.
Module-2; Topic-1: Amazon EC2 (Elastic Compute Cloud)
Amazon EC2 benefits
• Amazon EC2 offers multiple instance types and offers a wide range of computing, memory and
networking resources, making it a suitable solution for many kinds of enterprise workloads.
• The instances are secured using numerous controls to support all applications. One such
control is a security group -- a virtual firewall that controls incoming and outgoing traffic.
• In addition, both private and public keys are used to authorize users and prevent unauthorized
access.
• Amazon EC2 supports dynamic cloud computing with elastic IP addresses. These addresses are
static IPv4 addresses, with each address associated with the user's account rather than a particular
instance. Also, users can control the address until they explicitly release it or choose not to do so.
• Users can create Virtual Private Clouds to launch Amazon EC2 resources in a virtual
network.
• This network is user-defined and logically isolated from the rest of the AWS cloud. It uses
AWS' scalable infrastructure and can be connected to the user's own network.
• Amazon EC2 offers a free tier.
• With this tier, users can familiarize themselves with some of its features and pay only when
they are ready for the full offering. The free version includes 750 hours of Linux and
Windows t2.micro instances per month for a year.
Module-2; Topic-1: Amazon EC2 (Elastic Compute Cloud)
Challenges with Amazon EC2
• Resource utilization. Developers must manage the number
of instances to avoid costly large, long-running instances.
• Security. Developers must ensure that public-facing
instances are running securely.
• Deploying at scale. Running a multitude of instances can
result in cluttered environments that are difficult to manage.
• Management of Amazon Machine Image (AMI)
lifecycle. Developers often begin by using default AMIs.
• As computing needs change,
custom configurations will likely be required.
• Ongoing maintenance. Amazon EC2 instances are VMs
that run in Amazon's cloud. However, they ultimately run
on physical hardware, which can fail.
• AWS alerts developers when an instance must be
moved due to hardware maintenance. This requires
ongoing monitoring.
Module-2; Topic-2: Amazon S3 (Simple Storage Service)
Amazon S3 (Simple Storage Service)
• Amazon Simple Storage
Service (Amazon S3) is an
object storage service that
offers industry-leading
scalability, data availability,
security, and performance.
• It offers developers and IT
teams secure, durable, and
highly scalable object storage.
• Amazon S3 is used for • It helps people with all kinds of use cases from fields such as
various purposes in the Cloud Mobile/Web applications, Big data, Machine Learning, etc.
because of its robust features • Amazon S3 is a Simple Storage Service in AWS that stores files of
with scaling and Securing of different types like Photos, Audio, and Videos as Objects providing more
data. scalability and security to.
• It allows the users to store and retrieve any amount of data at any point
in time from anywhere on the web. It facilitates features such as
extremely high availability, security, and simple connection to other
AWS Services.
Module-2; Topic-2: Amazon S3 (Simple Storage Service)
Amazon S3 (Simple Storage Service)-An example
Best Security Practices Host a Static Website
Why S3 is preferred?
•S3 offers 99.99% data durability. That means, if you stored 10,000,000 objects in Amazon S3, you
would only lose a single object every 10,000 years. That is durable!
•S3 will automatically create and store copies of every uploaded object across many systems.
• This protects your data against errors, failures, and threats while guaranteeing you complete data
availability when you need it.
Module-2; Topic-2: Amazon S3 (Simple Storage Service)
Amazon S3 (Simple Storage Service)-Concepts
1. Regions- A geographic region is chosen in such a way that it
optimizes the latency, minimize costs or address regulatory
requirements.
Objects will not leave the region unless you explicitly transfer
the objects to another region.
2. Data Consistency Model
Amazon S3 replicates the data to multiple servers to achieve
high availability.
Two types of Data consistency model:
• Read-after-write consistency for PUTS of new
objects.
• For a PUT request, S3 stores the data across
multiple servers to achieve high availability. A
process stores an object to S3 and will be 3. Key
immediately available to read. •A key is an unique identifier for an object. Every
• Eventual consistency for overwrite PUTS and object in a bucket is associated with one key.
DELETES •An object can be uniquely identified by using a
• For PUTS and DELETES to objects, the changes combination of bucket name, the key, and optionally
are reflected eventually, and not immediately. version ID.
Module-2; Topic-2: Amazon S3 (Simple Storage Service)
Amazon S3 (Simple Storage Service)-Concepts
4.Buckets
•A bucket is a container used for storing objects. Every
object is incorporated in a bucket.
•A bucket has no limit to the number of objects. No
bucket can exist inside of other buckets.
•The AWS user that creates a bucket owns it, and no
other AWS user can own it. Therefore, we can say that
the ownership of a bucket is not transferrable. Only the
owner can delete a bucket.
5. Objects
•Objects are the entities that are stored in an S3 bucket.
An object consists of object data and metadata where
metadata is a set of name-value pairs that describes the
data.
•An object consists of some default metadata such as
date last modified, and standard HTTP metadata, such
as Content-type. Custom metadata can also be specified
at the time of storing an object.
•It is uniquely identified within a bucket by key and
version ID.
Module-2; Topic-2: Amazon S3 (Simple Storage Service)
Amazon S3 (Simple Storage Service)-Core Features
• Amazon Simple Storage Service
(Amazon S3) is a scalable, high-speed,
web-based cloud storage service -online
backup and archiving of data and
applications on Amazon Web Services
(AWS).
• It has a simple web services interface
that you can use to store and retrieve
any amount of data, at any time, from
anywhere on the web.
• Object Storage: Amazon S3 is designed
to store and retrieve any amount of data • The files which are stored in S3 can be from 0 Bytes to 5
from anywhere on the web. It stores data TB.
as objects within buckets (similar to • Files are stored in Bucket. A bucket is like a folder
folders). available in S3 that stores the files.
• Amazon S3 is Object-based storage, i.e., • S3 is a universal namespace, which means the names
you can store the images, word files, pdf must be unique globally. Bucket contains a DNS
files, etc. address. Therefore, the bucket must contain a unique
name to generate an unique DNS address.
Module-2; Topic-2: Amazon S3 (Simple Storage Service)
Amazon S3 (Simple Storage Service)-Core Features
1. Durability and Availability: S3 boasts high durability, with data stored redundantly across multiple
facilities within a region.
2. Scalability: S3 scales elastically to handle growing amounts of data. It can support virtually unlimited
data storage.
3. Data Lifecycle Management: S3 allows you to define lifecycle policies to automatically migrate objects
to lower-cost storage classes or delete them as they age.
4. Access management and Security: It offers several security features such as bucket ** policies, Access
Control Lists (ACLs), and integration with AWS Identity and Access Management (IAM) for fine-
grained access control.
5. Encryption: Data uploaded to S3 can be encrypted at rest using server-side encryption (SSE) with
Amazon S3-managed keys, AWS Key Management Service (KMS) keys, or customer-provided keys.
6. Access Logs: S3 can log all requests made to the bucket, providing visibility into access patterns and
allowing for auditing and compliance.
7. Versioning: Versioning can be enabled on S3 buckets to keep multiple variants of an object. This helps in
recovering from unintended user actions and application failures.
8. Cross-Region Replication (CRR): Allows automatic replication of objects across different AWS regions
for compliance, disaster recovery, or low-latency access.
**A bucket is a container for objects stored in Amazon S3. You can store any number of objects in a bucket and
can have up to 100 buckets in your account
Module-2; Topic-2: Amazon S3 (Simple Storage Service)
Amazon S3 (Simple Storage Service)-Storage Classes
Amazon S3 offers several storage classes to optimize costs and performance based on access
frequency and durability requirements.
Module-2; Topic-2: Amazon S3 (Simple Storage Service)
Amazon S3 (Simple Storage Service)-Use Cases
• Data Lakes: It serves as a
foundation for building data lakes by
ingesting, storing, and analyzing
large amounts of data. A data lake is
a centralized repository that allows
you to store all your structured and
unstructured data at any scale. You
can store your data as-is, without
having to structure it first, and run
different types of analytics—from
dashboards and visualizations to big
data processing, real-time analytics,
and machine learning to guide better
decisions
• Eg: Centralized Data Repository, Big
Data Analytics, ML & AI, Data
Warehousing, Real Time Analytics,
Data Archiving etc…
Module-2; Topic-2: Amazon S3 (Simple Storage Service)
Amazon S3 (Simple Storage Service)-Use Cases
• Backup and Restore: S3 is
widely used for backing up
application data and enabling
disaster recovery.
• Static Website Hosting: S3 can
host static websites and deliver
content with low latency and
high transfer speeds using AWS
CloudFront.
• Big Data Analytics: S3
integrates seamlessly with AWS
analytics services like Amazon
Athena, Amazon Redshift, and
Amazon EMR for big data
processing.
Module-2; Topic-2: Amazon S3 (Simple Storage Service)
Amazon S3 (Simple Storage Service)-Advantages
Module-2; Topic-3: Amazon RDS (Relational Database Service)
Amazon RDS (Relational Database Service)
• Amazon RDS (Relational
Database Service) is a
managed relational **
database service provided
by Amazon Web Services
(AWS).
• Amazon RDS is a
managed SQL database
supports an array of
database engines to store
and organize data.
• It also helps in relational
database management **A relational database (RDB) is a way of structuring information in
tables, rows, and columns. An RDB has the ability to establish links—or
tasks like data migration,
relationships–between information by joining tables, which makes it
backup, recovery and easy to understand and gain insights about the relationship between
patching. various data points.
• It offers a scalable, cost-efficient, and easy-to-manage solution for deploying, operating, and scaling
relational databases in the cloud.
Module-2; Topic-3: Amazon RDS (Relational Database Service)
How Amazon RDS Works?
• Traditionally, database management used to be a scattered service, from the webserver to the
application server and then finally to the database.
• For the maintenance of such a vast system a team was required, to shrink this workforce,
AWS came across an amazing all-in-one service, RDS.
• The whole architecture of RDS includes every aspect of the traditional management system, all
in place. Amazon Elastic Block Store (Amazon EBS)-low-cost cold HDD storage in the cloud
Based on Amazon RDS (Relational Database Service) features, an illustration on the connectivity is shown as
Module-2; Topic-3: Amazon RDS (Relational Database Service)
Amazon RDS (Relational Database Service)-An example
RDS Security Compliance