Unit 5
Unit 5
UNIT-V
EXPLORING INFRASTRUCTURE
AS A SERVICE (IaaS)
T1: UNDERSTANDING AMAZON WEB SERVICES: Amazon Web Services (AWS) has a fascinating history
that traces its roots back to the early 2000s when Amazon.com was looking for ways to expand its business
and capitalize on its growing IT infrastructure. Here is a brief history of AWS:
Amazon Web Services is comprised of the following components, listed roughly in their order of
importance:
1.Amazon Elastic Compute Cloud (EC2; http://aws.amazon.com/ec2/), is the central application in the
AWS portfolio. It enables the creation, use, and management of virtual private servers running the Linux
or Windows operating system over a Xen hypervisor. Amazon Machine Instances are sized at various
levels and rented on a computing/ hour basis. Spread over data centers worldwide, EC2 applications
may be created that are highly scalable, redundant, and fault tolerant. EC2 is described more fully the
next section. A number of tools are used to support EC2 services:
2.Amazon Simple Storage System (S3; http://aws.amazon.com/s3/) is an online backup and storage
system, which is described in “Working with Amazon Simple Storage System (S3)” later in this chapter. A
high speed data transfer feature called AWS Import/Export (http://aws.amazon. com/importexport/)
can transfer data to and from AWS using Amazon’s own internal network to portable storage devices.
3.Amazon Elastic Block Store (EBS; http://aws.amazon.com/ebs/) is a system for creating virtual disks
(volume) or block level storage devices that can be used for Amazon Machine Instances in EC2.
While the list above represents the most important of the AWS offerings, it is only a partial list—a list
that is continually growing and very dynamic. A number of services and utilities support Amazon
partners or the AWS infrastructure itself.
-----------------------------------------------------------------------------------------------------------------------------
T3: WORKING WITH THE ELASTIC COMPUTE CLOUD (EC2)
Amazon Elastic Compute Cloud (EC2) is a virtual server platform that allows users to create and run
virtual machines on Amazon’s server farm. With EC2, you can launch and run server instances called
Amazon Machine Images (AMIs) running different operating systems such as Red Hat Linux and
Windows on servers that have different performance profiles. You can add or subtract virtual servers
elastically as needed; cluster, replicate, and load balance servers; and locate your different servers in
different data centers or “zones” throughout the world to provide fault tolerance. The term elastic
refers to the ability to size your capacity quickly as needed.
Consider a situation where you want to create an Internet platform that provides the following:
Implementing that type of service might require a rack of components that included the following:
Amazon Machine Images AMIs are operating systems running on the Xen virtualization hypervisor.
Each virtual private server is accorded a size rating called its EC2 Compute Unit
Standard Instances: The standard instances are deemed to be suitable for standard server
applications.
High Memory Instances: High memory instances are useful for large data throughput
applications such as SQL Server databases and data caching and retrieval.
High CPU Instances: The high CPU instance category is best used for applications that are
processor- or compute-intensive. Applications of this type include rendering, encoding, data
analysis, and others.
Pricing models:- The pricing of these different AMI types depends on the operating system used,
which data center the AMI is located in (you can select its location), and the amount of time that the
AMI runs. Rates are quoted based on an hourly rate. Additional charges are applied for:
AMIs that have been saved and shut down incurs a small one-time fee, but do not incur additional
hourly fees.
The three different pricing models for EC2 AMIs are as follows:
On-Demand Instance: This is the hourly rate with no long-term commitment.
Reserved Instances: This is a purchase of a contract for each instance you use with a
significantly lower hourly usage charge after you have paid for the reservation.
Spot Instance: This is a method for bidding on unused EC2 capacity based on the current spot
price. This feature offers a significantly lower price, but it varies over time or may not be
available when there is no excess capacity
NOTE:- The AWS Simple Monthly Calculator help you estimate your monthly charges.
http://calculator.s3. amazonaws.com/calc5.html
System images and software: Choose & use a template AMI system image with the operating system
of your choice or create your own system image that contains your custom applications, code libraries,
settings, and data. Security can be set through passwords, Kerberos tickets, or certificates.
These operating systems are offered:
Red Hat Enterprise Linux OS
OpenSuse Linux OS
Ubuntu Linux OS
Sun OpenSolaris OS
Fedora OS
Gentoo Linux OS
Oracle Enterprise Linux OS
Windows Server 2003/2008 32-bit and 64-bit up to Data Center Edition OS
Debian OS
Note:- When you create a virtual private server, you can use the Elastic IP Address feature to create
what amounts to a static IPv4 address to your server. This address can be mapped to any of your AMIs
and is associated with your AWS account.
Creating an Amazon Machine Instance or provision it with a certain amount of storage. That storage is
temporal; It only exists for as long as your instance is running. All of the data contained in that storage is
lost when the instance is suspended or terminated, as the storage is reassigned to the pool for other
AWS users to use. For this and other reasons you need to have access to persistent storage(S3 BUCKET )
1.Amazon Simple Storage System (S3): Amazon S3’s cloud-based storage system allows you to store
data objects ranging in size from 1 byte up to 5GB in a flat namespace. In S3, storage containers are
referred to as buckets, and buckets serve the function of a directory, although there is no object
hierarchy to a bucket, and you save objects and not files to it. It is important that you do not associate
the concept of a file system with S3, because files are not supported; only objects are stored.
Additionally, not needed to “mount” a bucket as you do a file system.
Amazon S3 can be used alone or together with other AWS services such as Amazon EC2, Amazon Elastic
Block Store (Amazon EBS), and Amazon Glacier, as well as third-party storage repositories and gateways.
Amazon S3 provides cost-effective object storage for a wide variety of use cases including web
applications, content distribution, backup and archiving, disaster recovery, and big data analytics.
Creating a backup process in Amazon S3 involves a few key steps to ensure your data is securely backed
up and can be easily restored when needed. Here's a general outline of the process:
2.Amazon Elastic Block Store (EBS): Amazon Elastic Block Store (Amazon EBS) is a block storage service
provided by Amazon Web Services (AWS) that allows you to create and attach persistent block storage
volumes to your Amazon EC2 (Elastic Compute Cloud) instances. EBS volumes are designed for high
availability and durability and provide scalable and reliable block-level storage for your EC2 instances.
Here are some key features and concepts associated with Amazon EBS:
1. Volume Types:
Amazon EBS offers different volume types optimized for various workloads:
General Purpose (SSD): Provides a balance of price and performance. Suitable
for a wide range of workloads.
Provisioned IOPS (SSD): Designed for I/O-intensive applications, allowing you to
provision a specific number of IOPS (input/output operations per second).
Cold HDD: Offers low-cost storage for infrequently accessed data.
Throughput Optimized HDD: Designed for big data and data warehousing
workloads that require high throughput.
I/O Optimized HDD: Designed for big data and data warehousing workloads that
require high IOPS.
You can choose the most appropriate volume type based on your application's
performance and cost requirements.
2. Volume Size and Attach/Detach:
EBS volumes can range in size from 1 GB to 16 TB, depending on the volume type.
You can attach and detach EBS volumes from EC2 instances, allowing you to move data
between instances or resize volumes as needed.
3. Snapshots:
EBS snapshots are point-in-time copies of your EBS volumes.
You can use snapshots to back up your data, create new volumes, and migrate data to
other AWS regions.
Snapshots are incremental, meaning that only changed data is stored, which helps in
reducing storage costs.
4. Encryption:
EBS volumes support encryption at rest using AWS Key Management Service (KMS) keys.
You can encrypt both the root volume of an EC2 instance and additional data volumes.
5. Availability and Durability:
EBS volumes are designed for high availability and durability. They are replicated within
an Availability Zone (AZ) to protect against component failures.
You can also create EBS snapshots and copy them to different regions for added data
resilience.
6. Performance Scaling:
For performance-intensive workloads, you can dynamically resize and scale EBS volumes
to meet the performance requirements of your applications.
Provisioned IOPS volumes allow you to provision a specific level of performance.
7. Multi-Attach (Beta):
Some EBS volume types support multi-attach, allowing you to attach a single volume to
multiple EC2 instances simultaneously.
This can be useful for shared storage scenarios.
8. Lifecycle Management:
EBS offers features like EBS Lifecycle Manager to automate the creation, retention, and
deletion of snapshots based on policies.
9. Use Cases:
Amazon EBS is commonly used for various use cases, including database storage, file
storage, boot volumes for EC2 instances, and application data storage.
10. Pricing:
EBS pricing is based on the volume type, size, and region. You pay for the provisioned
storage capacity and the volume type's performance characteristics.
NOTE:- Amazon EBS plays a critical role in providing scalable and persistent storage for AWS EC2
instances, making it an essential component for running various workloads in the AWS cloud.
3.Amazon CloudFront
Amazon CloudFront is a content delivery network (CDN) service provided by Amazon Web Services
(AWS). It is designed to distribute content, including web pages, media files, and application data, to
users worldwide with low-latency and high data transfer speeds. CloudFront uses a global network of
edge locations to cache and deliver content to users from the nearest location, reducing latency and
improving the overall user experience.
Key features and concepts associated with Amazon CloudFront include:
1. Content Delivery: CloudFront accelerates the delivery of your content by caching it at edge
locations around the world. When a user requests content, CloudFront serves it from the
nearest edge location, reducing the round-trip time and improving load times.
2. Edge Locations: CloudFront has a network of edge locations strategically located in multiple
regions worldwide. These edge locations are where your cached content is stored and served
from. AWS continuously adds new edge locations to expand its global reach.
3. Distribution: To use CloudFront, you create a distribution, which is a collection of settings and
configuration information related to how CloudFront should cache and serve your content.
There are two types of distributions:
Web Distribution: Used for websites and web applications.
RTMP (Real-Time Messaging Protocol) Distribution: Used for streaming media over
Adobe Flash Media Server.
4. Origin: An origin is the source of your content. It can be an Amazon S3 bucket, an EC2 instance,
a load balancer, or even a custom HTTP server. CloudFront retrieves content from the origin and
caches it at edge locations.
5. Cache Behavior: You can define cache behaviors to specify how CloudFront should handle
requests for different types of content. For example, you can configure different TTLs (Time to
Live) for various file types.
6. HTTPS Support: CloudFront supports HTTPS to secure the transmission of data between your
users and the edge locations. You can use AWS Certificate Manager (ACM) to provision free
SSL/TLS certificates.
7. Logging and Monitoring: CloudFront provides access logs that can be sent to Amazon S3 or
Amazon CloudWatch for monitoring and analysis. You can track viewer activity and performance
metrics.
8. Customization: You can customize the behavior of CloudFront using features like
Lambda@Edge, which allows you to run serverless functions at the edge locations to modify
content or responses dynamically.
9. Security: You can use AWS Identity and Access Management (IAM) to control access to your
CloudFront distributions. You can also use AWS Web Application Firewall (WAF) to protect
against web application attacks.
10. Geo-Restriction: CloudFront allows you to restrict access to your content based on geographic
locations, helping you comply with content distribution regulations.
11. Cost Management: CloudFront pricing is based on data transfer and the number of requests.
You can use AWS Cost Explorer to monitor and manage your CloudFront costs.
WORKING MODEL AMAZON CLOUDFRONT
NOTE:- CloudFront is a highly scalable and globally distributed CDN service that can significantly improve
the performance, availability, and security of your web applications and content delivery. It is widely
used by websites, mobile apps, and streaming platforms to deliver content efficiently to users
worldwide.
1.Amazon SimpleDB
Amazon SimpleDB, also known as Amazon Simple Database, was a fully managed NoSQL database
service offered by Amazon Web Services (AWS). AWS announced that they were retiring Amazon
SimpleDB, and they were no longer accepting new sign-ups for the service.
Here are some key characteristics and features of Amazon SimpleDB as it existed before its retirement:
1. Schema-less: Amazon SimpleDB was a schema-less database, meaning you could store data
without predefining a fixed schema. This made it flexible for handling various types of data.
2. Data Attributes: Instead of tables, SimpleDB used domains to store data. Each domain could
have multiple data attributes, which were key-value pairs.
3. Automatic Scaling: SimpleDB automatically scaled to handle increasing workloads by
distributing data across multiple servers.
4. High Availability: It provided high availability with data replication across multiple Availability
Zones within a region.
5. Query Language: SimpleDB used a query language called SimpleDB Query Language (SQL),
which allowed for querying and filtering data based on attribute values.
6. Consistency Model: It offered eventual consistency for read operations, which means that data
might not immediately reflect updates but would eventually converge to a consistent state.
7. Limited Indexing: SimpleDB supported indexing of attributes, which allowed for efficient
querying of data.
8. Usage-Based Pricing: Billing was based on actual usage, including the amount of data stored,
the number of requests, and data transfer.
Amazon RDS simplifies database management tasks such as provisioning, patching, backup, recovery,
and scaling, allowing developers and database administrators to focus on application development
rather than infrastructure management.
Key features of Amazon RDS include:
1. Automated Backups: Amazon RDS automatically takes daily backups of your database and
allows you to retain backups for a specified period, making data recovery easier.
2. High Availability: Amazon RDS provides options for high availability, including Multi-AZ
deployments, which replicate your database across multiple availability zones for failover
protection.
3. Scalability: You can easily scale your database instance vertically by changing its instance type or
horizontally by adding read replicas to offload read traffic.
4. Security: Amazon RDS offers security features like network isolation, encryption at rest and in
transit, IAM database authentication, and automated software patching to enhance database
security.
5. Monitoring and Metrics: You can use Amazon CloudWatch to monitor database performance
and set up alarms to be notified of any issues.
6. Database Engine Compatibility: Amazon RDS provides options to select the database engine
that best fits your application's needs, and it manages the underlying infrastructure for you.
7. Ease of Maintenance: Routine database maintenance tasks such as software patching, hardware
scaling, and backups are automated, reducing the administrative overhead.
3.Choosing a database for AWS.
In choosing a database solution for your AWS solutions, consider the following factors in making your
selection:
Choose SimpleDB when index and query functions do not require relational database
support.
Use SimpleDB for the lowest administrative overhead.
Select SimpleDB if you want a solution that autoscales on demand.
Choose SimpleDB for a solution that has a very high availability.
Use RDS when you have an existing MySQL database that could be ported and you want
to minimize the amount of infrastructure and administrative management required.
Use RDS when your database queries require relation between data objects.
Chose RDS when you want a database that scales based on an API call and has a pay-asyou-use-
it pricing model.
Select Amazon EC2/Relational Database AMI when you want access to an enterprise relational
database or have an existing investment in that particular application.
Use Amazon EC2/Relational Database AMI to retain complete administrative control over
your database server.