0% found this document useful (0 votes)
17 views124 pages

Introduction to Cloud Computing Basics

The document provides an overview of cloud computing, detailing its architecture, benefits, and various service models including SaaS, PaaS, IaaS, XaaS, and FaaS. It explains the types of clouds such as public, private, hybrid, and community clouds, highlighting their characteristics, advantages, and disadvantages. Additionally, it discusses major cloud service providers and the impact of cloud computing on business operations.

Uploaded by

sihag100
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views124 pages

Introduction to Cloud Computing Basics

The document provides an overview of cloud computing, detailing its architecture, benefits, and various service models including SaaS, PaaS, IaaS, XaaS, and FaaS. It explains the types of clouds such as public, private, hybrid, and community clouds, highlighting their characteristics, advantages, and disadvantages. Additionally, it discusses major cloud service providers and the impact of cloud computing on business operations.

Uploaded by

sihag100
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

AWS (SAA (Solution architect associate -CA-2) CLOUD COMPUTING

Chapter - 1 Introduction to Cloud


Computing

In Simplest terms, cloud computing means storing and accessing the data and
programs on remote servers that are hosted on the internet instead of the
computer’s hard drive or local server. Cloud computing is also referred to as
Internet-based computing. Cloud Computing Architecture: Cloud computing
architecture refers to the components and sub-components required for cloud
computing. These components typically refer to:

1. Front end(fat client, thin client)


2. Back-end platforms(servers, storage)
3. Cloud-based delivery and a network(Internet, Intranet, Intercloud).
Hosting a cloud: There are three layers in cloud computing.
Companies use these layers based on the service they provide.

● Infrastructure
● Platform
● Application

At the bottom is the foundation, the Infrastructure where the people start and
begin to build. This is the layer where the cloud hosting lives. Now, let’s have
a look at hosting: Let’s say you have a company and a website and the
website has a lot of communications that are exchanged between members.
You start with a few members talking with each other and then gradually the
number of members increases. As the time passes, as the number of
members increases, there would be more traffic on the network and your
server will get slow down. This would cause a problem. A few years ago, the
websites are put on the server somewhere, in this way you have to run around
or buy and set the number of servers. It costs a lot of money and takes a lot of
time. You pay for these servers when you are using them and as well as when
you are not using them. This is called hosting. This problem is overcome by
cloud hosting. With Cloud Computing, you have access to computing power
when you needed. Now, your website is put in the cloud server as you put it
on a dedicated server. People start visiting your website and if you suddenly
need more computing power, you would scale up according to the need.

Benefits of Cloud Hosting:

1. Scalability: With Cloud hosting, it is easy to grow and shrink the


number and size of servers based on the need. This is done by
either increasing or decreasing the resources in the cloud. This
ability to alter plans due to fluctuation in business size and needs is
a superb benefit of cloud computing, especially when experiencing a
sudden growth in demand.
2. Instant: Whatever you want is instantly available in the cloud.
3. Save Money: An advantage of cloud computing is the reduction in
hardware costs. Instead of purchasing in-house equipment,
hardware needs are left to the vendor. For companies that are
growing rapidly, new hardware can be large, expensive, and
inconvenient. Cloud computing alleviates these issues because
resources can be acquired quickly and easily. Even better, the cost
of repairing or replacing equipment is passed to the vendors. Along
with purchase costs, off-site hardware cuts internal power costs and
saves space. Large data centers can take up precious office space
and produce a large amount of heat. Moving to cloud applications or
storage can help maximize space and significantly cut energy
expenditures.
4. Reliability: Rather than being hosted on one single instance of a
physical server, hosting is delivered on a virtual partition that draws
its resource, such as disk space, from an extensive network of
underlying physical servers. If one server goes offline it will have no
effect on availability, as the virtual servers will continue to pull
resources from the remaining network of servers.
5. Physical Security: The underlying physical servers are still housed
within data centers and so benefit from the security measures that
those facilities implement to prevent people from accessing or
disrupting them on-site.
6. Outsource Management: When you are managing the business,
Someone else manages your computing infrastructure. You do not
need to worry about management as well as upgradation.

To more clarification about how cloud computing has changed the commercial
deployment of the system. Consider above the three examples:

1. Amazon Web Services(AWS): One of the most successful cloud-


based businesses is Amazon Web Services(AWS), which is an
Infrastructure as a Service(Iaas) offering that pays rent for virtual
computers on Amazon’s infrastructure.
2. Microsoft Azure Platform: Microsoft is creating the Azure platform
which enables the .NET Framework Application to run over the
internet as an alternative platform for Microsoft developers. This is
the classic Platform as a Service(PaaS).
3. Google Cloud Platform (GCP): Google has built a worldwide
network of datacenters to service its search engine. From this
service, Google has captured the world’s advertising revenue. By
using that revenue, Google offers free software to users based on
infrastructure. This is called Software as a Service(SaaS).

Cloud Based Services

Cloud Computing can be defined as the practice of using a network of remote


servers hosted on the Internet to store, manage, and process data, rather than
a local server or a personal computer. Companies offering such kinds of cloud
computing services are called cloud providers and typically charge for cloud
computing services based on usage. Grids and clusters are the foundations
for cloud computing.

Types of Cloud Computing

Most cloud computing services fall into five broad categories:

1. Software as a service (SaaS)


2. Platform as a service (PaaS)
3. Infrastructure as a service (IaaS)
4. Anything/Everything as a service (XaaS)
5. Function as a Service (FaaS)

These are sometimes called the cloud computing stack because they are
built on top of one another. Knowing what they are and how they are different,
makes it easier to accomplish your goals. These abstraction layers can also
be viewed as a layered architecture where services of a higher layer can be
composed of services of the underlying layer i.e, SaaS can provide
Infrastructure.

Software as a Service(SaaS)

Software-as-a-Service (SaaS) is a way of delivering services and applications


over the Internet. Instead of installing and maintaining software, we simply
access it via the Internet, freeing ourselves from the complex software and
hardware management. It removes the need to install and run applications on
our own computers or in the data centers eliminating the expenses of
hardware as well as software maintenance.

SaaS provides a complete software solution that you purchase on a pay-as-


you-go basis from a cloud service provider. Most SaaS applications can be
run directly from a web browser without any downloads or installations
required. The SaaS applications are sometimes called Web-based software,
on-demand software, or hosted software.
Advantages of SaaS

1. Cost-Effective: Pay only for what you use.


2. Reduced time: Users can run most SaaS apps directly from their
web browser without needing to download and install any software.
This reduces the time spent in installation and configuration and can
reduce the issues that can get in the way of the software
deployment.
3. Accessibility: We can Access app data from anywhere.
4. Automatic updates: Rather than purchasing new software,
customers rely on a SaaS provider to automatically perform the
updates.
5. Scalability: It allows the users to access the services and features
on-demand.

The various companies providing Software as a service are Cloud9 Analytics,


[Link], Cloud Switch, Microsoft Office 365, Big Commerce, Eloqua,
dropBox, and Cloud Tran.

Platform as a Service

PaaS is a category of cloud computing that provides a platform and


environment to allow developers to build applications and services over the
internet. PaaS services are hosted in the cloud and accessed by users simply
via their web browser.
A PaaS provider hosts the hardware and software on its own infrastructure. As
a result, PaaS frees users from having to install in-house hardware and
software to develop or run a new application. Thus, the development and
deployment of the application take place independent of the hardware.

The consumer does not manage or control the underlying cloud infrastructure
including network, servers, operating systems, or storage, but has control over
the deployed applications and possibly configuration settings for the
application-hosting environment. To make it simple, take the example of an
annual day function, you will have two options either to create a venue or to
rent a venue but the function is the same.

Advantages of PaaS:

1. Simple and convenient for users: It provides much of the


infrastructure and other IT services, which users can access
anywhere via a web browser.
2. Cost-Effective: It charges for the services provided on a per-use
basis thus eliminating the expenses one may have for on-premises
hardware and software.
3. Efficiently managing the lifecycle: It is designed to support the
complete web application lifecycle: building, testing, deploying,
managing, and updating.
4. Efficiency: It allows for higher-level programming with reduced
complexity thus, the overall development of the application can be
more effective.
The various companies providing Platform as a service are Amazon Web
services Elastic Beanstalk, Salesforce, Windows Azure, Google App Engine,
cloud Bess and IBM smart cloud.

Infrastructure as a Service

Infrastructure as a service (IaaS) is a service model that delivers computer


infrastructure on an outsourced basis to support various operations. Typically
IaaS is a service where infrastructure is provided as outsourcing to enterprises
such as networking equipment, devices, database, and web servers.

It is also known as Hardware as a Service (HaaS). IaaS customers pay on a


per-user basis, typically by the hour, week, or month. Some providers also
charge customers based on the amount of virtual machine space they use.

It simply provides the underlying operating systems, security, networking, and


servers for developing such applications, and services, and deploying
development tools, databases, etc.

Advantages of IaaS:
1. Cost-Effective: Eliminates capital expense and reduces ongoing
cost and IaaS customers pay on a per-user basis, typically by the
hour, week, or month.
2. Website hosting: Running websites using IaaS can be less
expensive than traditional web hosting.
3. Security: The IaaS Cloud Provider may provide better security than
your existing software.
4. Maintenance: There is no need to manage the underlying data
center or the introduction of new releases of the development or
underlying software. This is all handled by the IaaS Cloud Provider.

The various companies providing Infrastructure as a service are Amazon web


services, Bluestack, IBM, Openstack, Rackspace, and Vmware.

Anything as a Service

It is also known as Everything as a Service. Most of the cloud service


providers nowadays offer anything as a service that is a compilation of all of
the above services including some additional services.

Advantages of XaaS: As this is a combined service, so it has all the


advantages of every type of cloud service.

Function as a Service :
FaaS is a type of cloud computing service. It provides a platform for its users
or customers to develop, compute, run and deploy the code or entire
application as functions. It allows the user to entirely develop the code and
update it at any time without worrying about the maintenance of the underlying
infrastructure. The developed code can be executed with response to the
specific event. It is also as same as PaaS.

FaaS is an event-driven execution model. It is implemented in the serverless


container. When the application is developed completely, the user will now
trigger the event to execute the code. Now, the triggered event makes
response and activates the servers to execute it. The servers are nothing but
the Linux servers or any other servers which is managed by the vendor
completely. Customer does not have clue about any servers which is why they
do not need to maintain the server hence it is serverless architecture.

Both PaaS and FaaS are providing the same functionality but there is still
some differentiation in terms of Scalability and Cost.

FaaS, provides auto-scaling up and scaling down depending upon the


demand. PaaS also provides scalability but here users have to configure the
scaling parameter depending upon the demand.

In FaaS, users only have to pay for the number of execution time happened.
In PaaS, users have to pay for the amount based on pay-as-you-go price
regardless of how much or less they use.

Advantages of FaaS :
● Highly Scalable: Auto scaling is done by the provider depending
upon the demand.
● Cost-Effective: Pay only for the number of events executed.
● Code Simplification: FaaS allows the users to upload the entire
application all at once. It allows you to write code for independent
functions or similar to those functions.
● Maintenance of code is enough and no need to worry about the
servers.
● Functions can be written in any programming language.
● Less control over the system.

The various companies providing Function as a Service are Amazon Web


Services – Firecracker, Google – Kubernetes, Oracle – Fn, Apache
OpenWhisk – IBM, OpenFaaS.

Types of Cloud

Cloud computing is Internet-based computing in which a shared pool of


resources is available over broad network access, these resources can be
provisioned or released with minimum management efforts and service
provider interaction.
Types of Cloud

1. Public cloud
2. Private cloud
3. Hybrid cloud
4. Community cloud

Public Cloud

Public clouds are managed by third parties which provide cloud services over
the internet to the public, these services are available as pay-as-you-go billing
models. They offer solutions for minimising IT infrastructure costs and
become a good option for handling peak loads on the local infrastructure.
Public clouds are the go-to option for small enterprises, which can start their
businesses without large upfront investments by completely relying on public
infrastructure for their IT needs.
The fundamental characteristics of public clouds are multi tenancy. A public
cloud is meant to serve multiple users, not a single customer. A user requires
a virtual computing environment that is separated, and most likely isolated,
from other users.

Public cloud
Private cloud

Private clouds are distributed systems that work on private infrastructure and
provide the users with dynamic provisioning of computing resources. Instead
of a pay-as-you-go model in private clouds, there could be other schemes that
manage the usage of the cloud and proportionally billing of the different
departments or sections of an enterprise. Private cloud providers are HP Data
Centers, Ubuntu, Elastic-Private cloud, Microsoft, etc.
Private Cloud

The advantages of using a private cloud are as follows:

1. Customer information protection: In the private cloud security


concerns are less since customer data and other sensitive
information do not flow out of private infrastructure.
2. Infrastructure ensuring SLAs: Private cloud provides specific
operations such as appropriate clustering, data replication, system
monitoring, and maintenance, disaster recovery, and other uptime
services.
3. Compliance with standard procedures and operations: Specific
procedures have to be put in place when deploying and executing
applications according to third-party compliance standards. This is
not possible in the case of the public cloud.

Disadvantages of using a private cloud are:

1. The restricted area of operations: Private cloud is accessible within


a particular area. So the area of accessibility is restricted.
2. Expertise requires: In the private cloud security concerns are less
since customer data and other sensitive information do not flow out
of private infrastructure. Hence skilled people are required to
manage & operate cloud services.

Hybrid cloud:

A hybrid cloud is a heterogeneous distributed system formed by combining


facilities of the public cloud and private cloud. For this reason, they are also
called heterogeneous clouds.

A major drawback of private deployments is the inability to scale on-demand


and efficiently address peak loads. Here public clouds are needed. Hence, a
hybrid cloud takes advantage of both public and private clouds.
Advantages of using a Hybrid cloud are:

1) Cost : Available in cheap cost than other clouds because it is formed by


distributed system.

2) Speed : It is efficiently fast with lower cost, It reduces latency of data


transfer process.

3) Security : Most important thing is security. Hybrid cloud are totally safe and
secured because it works on distributed system network.
Community cloud:

Community clouds are distributed systems created by integrating the services


of different clouds to address the specific needs of an industry, a community,
or a business sector. But sharing responsibilities among the organizations is
difficult.

In the community cloud, the infrastructure is shared between organizations


that have shared concerns or tasks. The cloud may be managed by an
organization or a third party.

Community Cloud
Sectors that use community clouds are:

1. Media industry: Media companies are looking for quick, simple, low-cost
ways for increasing the efficiency of content generation. Most media
productions involve an extended ecosystem of partners. In particular, the
creation of digital content is the outcome of a collaborative process that
includes the movement of large data, massive compute-intensive rendering
tasks, and complex workflow executions.

2. Healthcare industry: In the healthcare industry community clouds are used


to share information and knowledge on the global level with sensitive data in
the private infrastructure.

3. Energy and core industry: In these sectors, the community cloud is used to
cluster a set of solution which collectively addresses the management,
deployment, and orchestration of services and operations.

4. Scientific research: In this organization with common interests in science


share a large distributed infrastructure for scientific computing.
Chapter -2 Introduction to Amazon Web Services

Amazon Web Services (AWS), a subsidiary of [Link], has invested


billions of dollars in IT resources distributed across the globe. These
resources are shared among all the AWS account holders across the globe.
These account themselves are entirely isolated from each other. AWS
provides on-demand IT resources to its account holders on a pay-as-you-go
pricing model with no upfront cost. Amazon Web services offers flexibility
because you can only pay for services you use or you need. Enterprises use
AWS to reduce capital expenditure of building their own private IT
infrastructure (which can be expensive depending upon the enterprise’s size
and nature). AWS has its own Physical fiber network that connects with
Availability zones, regions and Edge locations. All the maintenance cost is
also bared by the AWS that saves a fortune for the enterprises.
Security of cloud is the responsibility of AWS but Security in the cloud is
Customer’s Responsibilty. The Performance efficiency in the cloud has four
main areas:-

● Selection
● Review
● Monitoring
● Tradeoff

AWS Global Infrastructure

The AWS global infrastructure is massive and is divided into geographical


regions. The geographical regions are then divided into separate availability
zones. While selecting the geographical regions for AWS, three factors come
into play

● Optimizing Latency
● Reducing cost
● Government regulations (Some services are not available for some
regions)
Each region is divided into at least two availability zones that are physically
isolated from each other, which provides business continuity for the
infrastructure as in a distributed system. If one zone fails to function, the
infrastructure in other availability zones remains operational. The largest
region North Virginia (US-East), has six availability zones. These availability
zones are connected by high-speed fiber-optic networking.

There are over 100 edge locations distributed all over the globe that are used
for the CloudFront (content delivery network). Cloudfront can cache frequently
used content such as images and videos(live streaming videos also) at edge
locations and distribute it to edge locations across the globe for high-speed
delivery and low latency for end-users. It also protects from DDOS attacks.

AWS Management Console

The AWS management console is a web-based interface to access AWS. It


requires an AWS account and also has a smartphone application for the same
purpose. So When you sign in for first time, you see the console home page
where you see all the services provided by AWS. Cost monitoring is also done
through the console.

AWS resources can also be accessed through various Software Development


Kits (SDKs), which allows the developers to create applications as AWS as its
backend. There are SDKs for all the major languages(e.g., JavaScript, Python,
[Link], .Net, PHP, Ruby, Go, C++). There are mobile SDKs for Android, iOS,
React Native, Unity, and Xamarin. AWS can also be accessed by making HTTP
calls using the AWS-API. AWS also provides a Command Line Interface (CLI)
for remotely accessing the AWS and can implement scripts to automate many
processes. This Console is also available as an app for Android and iOS. For
mobile apps, you can simply download AWS console app.

AWS Cloud Computing Models

There are three cloud computing models available on AWS.

1. Infrastructure as a Service (IaaS): It is the basic building block of


cloud IT. It generally provides access to data storage space,
networking features, and computer hardware(virtual or dedicated
hardware). It is highly flexible and gives management controls over
the IT resources to the developer. For example, VPC, EC2, EBS.
2. Platform as a Service (PaaS): This is a type of service where AWS
manages the underlying infrastructure (usually operating system and
hardware). This helps the developer to be more efficient as they do
not have to worry about undifferentiated heavy lifting required for
running the applications such as capacity planning, software
maintenance, resource procurement, patching, etc., and focus more
on deployment and management of the applications. For example,
RDS, EMR, ElasticSearch.
3. Software as a Service(SaaS): It is a complete product that usually
runs on a browser. It primarily refers to end-user applications. It is
run and managed by the service provider. The end-user only has to
worry about the application of the software suitable to its needs. For
example, [Link], Web-based email, Office 365 .

Important Cloud Services provided by AWS

The Important Cloud Services according to various categories that are


provided by AWS are given below :

1. Compute
Amazon EC2: Amazon Elastic Compute Cloud (Amazon EC2) is a web
service that provides secure, resizable compute capacity in the cloud. It allows
organizations to obtain and configure virtual compute capacity in the cloud.
You can select from a variety of operating systems and resource
configurations like memory, CPU, and storage that are required for your
application. Amazon EC2 enables you to increase or decrease capacity within
minutes. You can use one or hundreds or even thousands of server instances
simultaneously. Because this is all controlled with web service APIs, your
application can automatically scale itself up and down depending on its needs.
Amazon EC2 is integrated with most AWS services, such as Amazon Simple
Storage Service (Amazon S3), Amazon Relational Database Service (Amazon
RDS), and Amazon Virtual Private Cloud (Amazon VPC) to provide a
complete, secure solution for computing applications. Amazon EC2 is an
example of Infrastructure as a Service(IaaS). EC2 delivers secure, reliable,
cost-effective compute and high-performance compute infrastructure so as to
meet the needs of demanding businesses. Amazon EC2 is one of the easiest
ways of providing servers on AWS Cloud and also the access to Operating
system.
AWS Lambda: AWS Lambda is a serverless, event-driven compute service
that allows you to run code without managing servers. You pay only for the
compute time you consume and there is no charge when your code is not
running. With AWS Lambda, you can run code for any type of application with
zero administration. Just upload your code, and Lambda takes care of
everything required to run and scale your code with high availability. You can
set up your code to automatically trigger from other AWS services, or you can
call it directly from any web or mobile app. But triggering Lambda is possible
with over 200 AWS services. You can only pay for what you have used. The
compute time that you consume, you are needed to pay for it. You just only
need to upload your code and everything required to run will take care of by
Lambda and it automatically scales your code with high availability.
AWS Elastic Beanstalk: AWS Elastic Beanstalk is a Platform as a Service
that facilitates quick deployment of your applications by providing all the
application services that you need for your application. Beanstalk is a plug-
and-play platform that allows working with multiple programming languages
and environments. Elastic Beanstalk supports a large range of platforms like
Node js, Java, PHP, Python, and Ruby. So, you can develop your application
to meet your requirements and simply deploy it on Elastic Beanstalk. The
main aim to use AWS Elastic Beanstalk is to allow you to focus on the
deployment and management of your applications. You can simply upload
your code, and AWS Elastic Beanstalk automatically handles the deployment,
from capacity provisioning, load balancing, and auto-scaling to application
health monitoring. At the same time, you retain full control over the AWS
resources powering your application and can access the underlying resources
at any time.

2. Networking
Amazon VPC: Amazon VPC is your network environment in the cloud. It
allows you to create a private network within the AWS cloud that uses many of
the same concepts and constructs as an on-premises network. Amazon VPC
also gives you complete control of the network configuration. Customers can
define normal networking configuration items such as IP address ranges,
subnet creation, route table creation, network gateways, and security settings.
Amazon VPC is an AWS foundational service and integrates with numerous
AWS services. For instance, Amazon EC2 instances are deployed into your
Amazon VPC. Similarly, Amazon Relational Database Service (Amazon RDS)
database instances deploy into your Amazon VPC, where the database is
protected by the structure of the network just like your on-premises network.
You can easily launch AWS resources into a virtual network by Amazon
Virtual Private Cloud. An isolated virtual network environment in the AWS
cloud is created by Amazon VPC.
Amazon Route 53: Amazon Route 53 is a highly available and scalable cloud
Domain Name System (DNS) web service. It is designed to give developers
and businesses an extremely reliable and cost-effective way to route end
users to Internet applications by translating human-readable names, such as
[Link], into the numeric IP addresses that computers use
to connect to each other. Amazon Route 53 is fully compliant with IPv6 as
well.

3. Storage
Amazon S3 (Simple Storage Service): Amazon Simple Storage Service
(Amazon S3) is object storage with a simple web service interface to store and
retrieve any amount of data from anywhere on the web. It is designed to
provide an infinite amount of storage and it is delivered with 99.999999999%
durability. You can use Amazon S3 as primary storage for cloud-native
applications as a target for backup and recovery and disaster recovery. It
offers industry-leading scalability, data availability, security, and performance.
It’s simple to move large volumes of data into or out of Amazon S3 with
Amazon’s cloud data migration options. Once data is stored in Amazon S3, it
can be automatically tiered into lower cost, longer-term cloud storage classes
like Amazon S3 Standard – Infrequent Access and Amazon Glacier for
archiving.
Amazon Glacier: Amazon Glacier is a secure, durable, and extremely low-
cost storage service for data archiving and long-term backup. Data stored in
Amazon Glacier takes several hours to retrieve, which is why it’s ideal for
archiving. The fastest access to your archive data is via Amazon Glacier.

4. Databases
Amazon RDS (Relational Database Service): Amazon Relational Database
Service (Amazon RDS) makes it easy to set up, operate, and scale a
relational database in the cloud. It provides cost-efficient and resizable
capacity while managing time-consuming database administration tasks,
freeing you up to focus on your applications and business. You can find
Amazon RDS is also available on several database instance types –
optimized for memory, performance, or I/O. Amazon RDS provides you with
six familiar database engines to choose from, including Amazon Aurora,
PostgreSQL, MySQL, MariaDB, Oracle, and Microsoft SQL Server.
Amazon DynamoDB (Non-Relational Database): Amazon DynamoDB is a
fast and flexible NoSQL database service for all applications that need
consistent, single-digit millisecond latency at any scale. It is a fully managed
database and supports both document and key-value data models. When you
create a database table that can store and retrieve any amount of data you
can simply use Amazon DynamoDB that will serve any level of requested
traffic. Its flexible data model and reliable performance make it a great fit for
mobile, web, gaming, Internet of Things (IoT), and many other applications.
DynamoDB provides many features like
● built-in security
● backups
● automated multi-region replication
● in-memory caching
● data export tools.
Chapter-3 :- Amazon S3 ( Simple storage services )

Introduction to AWS Simple Storage Service (AWS S3)

AWS Storage Services: AWS offers a wide range of storage services that can
be provisioned depending on your project requirements and use case. AWS
storage services have different provisions for highly confidential data,
frequently accessed data, and the not so frequently accessed data. You can
choose from various storage types namely, object storage, file storage, block
storage services, backups, and data migration options. All of which fall under
the AWS Storage Services list.

AWS Simple Storage Service (S3): From the aforementioned list, S3, is the
object storage service provided by AWS. It is probably the most commonly
used, go-to storage service for AWS users given the features like extremely
high availability, security, and simple connection to other AWS Services. AWS
S3 can be used by people with all kinds of use cases like mobile/web
applications, big data, machine learning and many more.

AWS S3 Terminology:

● Bucket: Data, in S3, is stored in containers called buckets.


○ Each bucket will have its own set of policies and
configuration. This enables users to have more control over
their data.
○ Bucket Names must be unique.
○ Can be thought of as a parent folder of data.
○ There is a limit of 100 buckets per AWS accounts. But it
can be increased if requested from AWS support.

● Bucket Owner: The person or organization that owns a particular
bucket is its bucket owner.
● Import/Export Station: A machine that uploads or downloads data
to/from S3.
● Key: Key, in S3, is a unique identifier for an object in a bucket. For
example in a bucket ‘ABC’ your [Link] file is stored at
javaPrograms/[Link] then ‘javaPrograms/[Link]’ is your object
key for [Link].
○ It is important to note that ‘bucketName+key’ is unique for
all objects.
○ This also means that there can be only one object for a key
in a bucket. If you upload 2 files with the same key. The file
uploaded latest will overwrite the previously contained file.
● Versioning: Versioning means to always keep a record of previously
uploaded files in S3. Points to note:
○ Versioning is not enabled by default. Once enabled, it is
enabled for all objects in a bucket.
○ Versioning keeps all the copies of your file, so, it adds cost
for storing multiple copies of your data. For example, 10
copies of a file of size 1GB will have you charged for using
10GBs for S3 space.
○ Versioning is helpful to prevent unintended overwrites and
deletions.
○ Note that objects with the same key can be stored in a
bucket if versioning is enabled (since they have a unique
version ID).
● null Object: Version ID for objects in a bucket where versioning is
suspended is null. Such objects may be referred to as null objects.
○ For buckets with versioning enabled, each version of a file
has a specific version ID.
● Object: Fundamental entity type stored in AWS S3.
● Access Control Lists (ACL): A document for verifying the access to
S3 buckets from outside your AWS account. Each bucket has its own
ACL.
● Bucket Policies: A document for verifying the access to S3 buckets
from within your AWS account, this controls which services and
users have what kind of access to your S3 bucket. Each bucket has
its own Bucket Policies.
● Lifecycle Rules: This is a cost-saving practice that can move your
files to AWS Glacier (The AWS Data Archive Service) or to some
other S3 storage class for cheaper storage of old data or completely
delete the data after the specified time.

Features of AWS S3:

● Durability: AWS claims Amazon S3 to have a 99.999999999% of


durability (11 9’s). This means the possibility of losing your data
stored on S3 is one in a billion.
● Availability: AWS ensures that the up-time of AWS S3 is 99.99% for
standard access.
○ Note that availability is related to being able to access data
and durability is related to losing data altogether.
● Server-Side-Encryption (SSE): AWS S3 supports three types of SSE
models:
○ SSE-S3: AWS S3 manages encryption keys.
○ SSE-C: The customer manages encryption keys.
○ SSE-KMS: The AWS Key Management Service (KMS)
manages the encryption keys.
● File Size support: AWS S3 can hold files of size ranging from 0 bytes
to 5 terabytes. A 5TB limit on file size should not be a blocker for
most of the applications in the world.
● Infinite storage space: Theoretically AWS S3 is supposed to have
infinite storage space. This makes S3 infinitely scalable for all kinds
of use cases.
● Pay as you use: The users are charged according to the S3 storage
they hold.
● AWS-S3 is region-specific.

S3 storage classes:

AWS S3 provides multiple storage types that offer different performance and
features and different cost structure.

● Standard: Suitable for frequently accessed data, that needs to be


highly available and durable.
● Standard Infrequent Access (Standard IA): This is a cheaper data-
storage class and as the name suggests, this class is best suited for
storing infrequently accessed data like log files or data archives.
Note that there may be a per GB data retrieval fee associated with
Standard IA class.
● Intelligent Tiering: This service class classifies your files
automatically into frequently accessed and infrequently accessed
and stores the infrequently accessed data in infrequent access
storage to save costs. This is useful for unpredictable data access to
an S3 bucket.
● One Zone Infrequent Access (One Zone IA): All the files on your S3
have their copies stored in a minimum of 3 Availability Zones. One
Zone IA stores this data in a single availability zone. It is only
recommended to use this storage class for infrequently accessed,
non-essential data. There may be a per GB cost for data retrieval.
● Reduced Redundancy Storage (RRS): All the other S3 classes ensure
the durability of 99.999999999%. RRS only ensures a 99.99%
durability. AWS no longer recommends RRS due to its less durability.
However, it can be used to store non-essential data.

Practical-1 : How to create S3 Bucket


Steps :- go to amazon web services from [Link]

Click on services tab & than click all services & choose view all services

Go to Storage tab & choose S3

Now go to Create bucket give bucket name Dheeraj or any name whatever
you want

Uncheck to Block public access & Create Bucket now choose ACL enabled

Now go to bucket & upload any image for Test purpose & go to permission
now

choose grant Public read Access now click on upload & your image will be

accessible using URL

Practical-2 : How to create static website in S3


Bucket
Steps :- go to amazon web services from [Link]

Click on services tab & than click all services & choose view all services

Go to Storage tab & choose S3

Now go to Create bucket give bucket name Dheeraj or any name whatever
you want

Uncheck to Block public access & Create Bucket now choose ACL enabled

Now go to bucket & upload any website file ( [Link]) for Test purpose &
go to permission now

choose grant Public read Access now click on upload

Chapter no -4 :- Amazon Ec2 and EBS ( Elastic Block Storage )

What is Elastic Compute Cloud (EC2)?


EC2 stands for Elastic Compute Cloud. EC2 is an on-demand computing
service on the AWS cloud platform. Under computing, it includes all the
services a computing device can offer to you along with the flexibility of a
virtual environment. It also allows the user to configure their instances as per
their requirements i.e. allocate the RAM, Processor, storage & IP Address
according to the need of the current task. Even the user can dismantle the
virtual device once its task is completed and it is no more required. For
providing, all these scalable resources AWS charges some bill amount at the
end of every month, bill amount is entirely dependent on your usage. EC2
provides you to rent virtual computers. The provision of servers on AWS Cloud
is one of the easiest way in EC2 . EC2 has resizable capacity. EC2 offers
security, reliability, high-performance and cost-effective infrastructure so as
to meet the demanding business needs.

Features of Amazon EC2:

Functionality – EC2 provides its users a true virtual computing platform,


where they can use various operations and even launch another EC2 instance
from this virtually created environment. This will increase the security of the
virtual devices. Not only creating but also EC2 allows us to customize our
environment as per our requirements, at any point of time during the life span
of the virtual machine. Amazon EC2 itself comes with a set of default
AMI(Amazon Machine Image) options supporting various operating systems
along with some pre-configured resources like RAM, ROM, storage, etc.
Besides these AMI options, we can also create an AMI curated with the
combination of default and user-defined configurations. And for future
purposes, we can store this user-defined AMI, so that next time, the user won’t
have to re-configure a new AMI from scratch. Rather than this whole process,
the user can simply use the older reference while creating a new EC2
machine.

Operating Systems – Amazon EC2 includes a wide range of operating


systems to choose from while selecting your AMI. Not only these selected
options, but users are also even given the privileges to upload their own
operating systems and opt for that while selecting AMI during launching an
EC2 instance. Currently, AWS has the following most preferred set of
operating systems available on the EC2 console.

● Amazon Linux
● Windows Server
● Ubuntu Server
● SUSE Linux
● Red Hat Linux
Software – Amazon is single-handedly ruling the cloud computing market,
because of the variety of options available on EC2 for its users. It allows its
users to choose from various software present to run on their EC2 machines.
This whole service is allocated to AWS Marketplace on the AWS platform.
Numerous software like SAP, LAMP and Drupal, etc are available on AWS to
use.

Scalability and Reliability – EC2 provides us the facility to scale up or scale


down as per the needs. All dynamic scenarios can be easily tackled by EC2
with the help of this feature. And because of the flexibility of volumes and
snapshots, it is highly reliable for its users. Due to the scalable nature of the
machine, many organizations like Flipkart, Amazon rely on these days
whenever humongous traffic occurs on their portals.

Types of EC-2 Instances :- There are Various types of EC2 Instance in aws
cloud , which are listed below .
Now, let us look at the EC2 service on AWS Management Console.

First login into your AWS account. Once you are directed to the management
console. From the left click on “Services” and from the listed options click on
EC2.
Afterward, you will be redirected to the EC2 console. Here is the image
attached to refer to various features in EC2.

This was all about introducing you about Amazon EC2 or Amazon Elastic
Compute Cloud. If you wish to learn about creating an EC2 instance, follow the
linked article. And if you are also another free tier account user make sure you
delete all the instances or services you have used before logging out of from
your AWS account.
● Practical of Ec2 Instance ( Windows machine )

Steps :- login your account from [Link]

Go to all services & choose EC2 , click on instance

Now click on launch instances

Now give all the credentials to your Ec2 instance

Name :- jetking , Os :- windows server , instance type :- [Link] ,

Click on key pair & choose create new key pair , give key name & choose
create key pair , now download .pem file , now click launch instances , now
instance will start creating , go to instances & click on actions , choose
security & click Get windows password , now browse the pem file which you
have created & click on Decrypt password , copy the password ,

Now click on instances & choose instance , than go to actions & click connect

Your click on windows base machine & follow given

Steps :- go to run & type MSTSC & type public ip address of Ec2 machine

Now paste password which you have decrypted from .pem file .

Instance is now created


● Practical of Ec2 Instance ( Linux Machine )

Steps :- login your account from [Link]

Go to all services & choose EC2 , click on instance

Now click on launch instances

Now give all the credentials to your Ec2 instance

Name :- jetking , Os :- red hat Linux , instance type :- [Link] ,

Click on key pair & choose create new key pair ,


give key name & choose create key pair , now download .pem file ,
now click launch instances , now instance will start creating .

Convert .pem file to .ppk file

Now open puttyGen software & choose load option & choose
downloaded .pem file
Click ok & click save private key with any name
Now open putty & click on SSH & then click on Auth , click on browse & choose
.ppk file which you have saved already .
Now go to session & type ec2-user@[Link]-
[Link] ( Public DNS )

Now machine is successfully log in

You can also login using username with public ip

ec2-user@[Link]

How to create S3 Bucket in Aws


Chapter no-5 Introduction to AWS Elastic Block
Store(EBS)

AWS Storage Services: AWS offers a wide range of storage services that can
be provisioned depending on your project requirements and use case. AWS
storage services have different provisions for highly confidential data,
frequently accessed data, and the not so frequently accessed data. You can
choose from various storage types namely, object storage, file storage, block
storage services, backups,, and data migration options. All of which fall under
the AWS Storage Services list.

Elastic Block Storage (EBS): From the aforementioned list, EBS is a block type
durable and persistent storage that can be attached to EC2-instances for
additional storage. Unlike EC-2 instance storage volumes which are suitable
for holding temporary data EBS volumes are highly suitable for essential and
long term data. EBS volumes are specific to availability zones and can only be
attached to instances within the same availability zone.
EBS can be created from the EC2 dashboard in the console as well as in Step
4 of the EC2 launch. Just note that when creating EBS with EC2, the EBS
volumes are created in the same availability zone as EC2, however when
provisioned independently users can choose the AZ in which EBS is required.

Features of EBS:

● Scalability: EBS volume sizes and features can be scaled as per the
needs of the system. This can be done in two ways:
○ Take a snapshot of the volume and create a new volume
using the Snapshot with new updated features.
○ Updating the existing EBS volume from the console.
● Backup: Users can create snapshots of EBS volumes that act as
backups.
○ Snapshot can be created manually at any point in time or
can be scheduled.
○ Snapshots are stored on AWS S3 and are charged
according to the S3 storage charges.
○ Snapshots are incremental in nature.
○ New volumes across regions can be created from
snapshots.
● Encryption: Encryption can be a basic requirement when it comes to
storage. This can be due to the government of regulatory
compliance. EBS offers an AWS managed encryption feature.
○ Users can enable encryption when creating EBS volumes
bu clicking on a checkbox.
○ Encryption Keys are managed by the Key Management
Service (KMS) provided by AWS.
○ Encrypted volumes can only be attached to selected
instance types.
○ Encryption uses the AES-256 algorithm.
○ Snapshots from encrypted volumes are encrypted and
similarly, volumes created from snapshots are encrypted.
● Charges: Unlike AWS S3, where you are charged for the storage you
consume, AWS charges users for the storage you hold. For example
if you use 1 GB storage in a 5 GB volume, you’d still be charged for a
5 GB EBS volume.
○ EBS charges vary from region to region.
● EBS Volumes are independent of the EC2 they are attached to. The
data in an EBS volume will remain unchanged even if the instance is
rebooted or terminated.

Single EBS volume can only be attached to one EC2 instance at a time.
However, one EC2 can have more than one EBS volumes attached to it.

● EBS volumes are specific to availability zones and can only be


attached to EC2 in the same availability zone. In case AWS’
availability zone is to go down, access to the EBS volume will be lost.
● Can be used for rapidly changing data that needs good I/Ops.
● As compared to EC-2 instance storage the control over data and
flexibility offered by EBS is far greater.
● To provide durability, EBS volumes are replicated in their availability
zone but are limited to one availability zone.
Types of EBS Volumes:

SSD: This storage type is suitable for small chunks of data that requires fast
I/Ops. SSDs can be used as root volumes for EC2 instances.

● General Purpose SSD (GP2)


○ Offers a single-digit millisecond latency.
○ Can provide 3000 IOps burst.
○ IOps speed is limited from 3-10000 IOps.
○ The throughput of these volumes is 128MBPS up to 170GB.
After which throughput increases 768KBPS per GB and
peaks at 160MBPS.
● Provisioned IOPS SSD (IO1)
○ These SSDs are IO intensive.
○ Users can specify IOPS requirement during creation.
○ Size limit is 4TB-16TB
○ According to AWS claims “These volumes, if attached to
EBS optimized instances will deliver IOPS defined within
10% 99.9% times of the year”
○ Max IOPS speed is 20000.

HDD: This storage type is suitable for Big Data chunks and slower processing.
These volumes cannot be used as root volumes for EC2. AWS claims that
“These volumes provide expected throughput 99.9% times of the year”

● Cold HDD (SC1)


○ SC1 is the cheapest of all EBS volume types. It is suitable
for large, infrequently accessed data.
○ Max Burst speed offered is 250 Mbps
● Throughput optimized HDD (ST)
○ Suitable for large, frequently accessed data.
○ Burst speed ranges from 250 MBPS to 500 MBPS.

The above image shows single EBS volumes attached to their respective EC2
instances (Note that EBS cannot be shared between two volumes, however
one EFS can be attached to multiple EC2 servers). These Volumes can have a
multiple pf use cases as discussed below:

● Database storage: Given the low latency and scalability offered by


EBS it is highly suitable for storing relational as well as NoSQL
databases.
● Business intensive applications: Given the scheduled backup offered
by EBS as snapshots the recovery of data is quick and a refreshed
system can be rebooted efficiently with minimal data loss.
● Hard Disks for EC2 servers: EBS volumes can be used as hard drives
to your EC2 servers. They are independent of your EC2 servers and
hence your data in these volumes is safe even if EC2 servers
fails/reboots/terminate
● Hosting Large Applications: EBS provides an exceptionally low
latency period amounting to a great computing power of the
architecture. It can be used to hold big enterprise application
software and data.
● Root Volumes for EC2: EBS types GP2 and IO1 can be used as the
root volumes for your EC2 server.

Drawbacks:

● EBS is not recommended as temporary storage.


● They cannot be used as a multi-instance accessed storage as they
cannot be shared between instances.
● The durability offered by services like AWS S3 and AWS EFS is
greater.

Practical :- How to Add EBS-volume to Windows EC-2 Instance

Steps :- Create a windows EC-2 Instance

After creating instance create a Volume from Elastic Block store with the same
Avaibility zone
Click on create volume & give space ( 10 GB ) & choose Avaibility zone with the
same name of EC2 & create volume . now volume is added and you can see with
instance state

After creating volume tick on new volume of 10 GB which you have just added &
click on action & choose attach volume option , attach the volume with same EC-
2 Windows instance & click on attach volume

Now connect windows instance through Remote desktop protocol ( MSTSC) & go
to run & type [Link]
Modify volume :-

After creating volume you can add storage to disk by choosing option modify
volume
Amazon VPC – Introduction to Amazon
Virtual Private Cloud
Amazon VPC or Amazon Virtual Private Cloud is nothing but a service that
allows its users to launch their virtual machines in a protected as well as
isolated virtual environment defined by them. You have complete control
over your VPC, from creation to customization and even deletion. It’s
applicable to organizations where the data is scattered and needs to be
managed well. In other words, VPC enables us to select the virtual address of
our private cloud and we can also define all the sub-constituents of the VPC
like subnet, subnet mask, availability zone, etc on our own.

The Architecture of Amazon VPC

The basic architecture of a proper functioning VPC consists of many distinct


services such as Gateway, Load Balancer, Subnets, Route table etc.
Altogether, these resources are clubbed under a VPC to create an isolated
virtual environment. Along with these services, there are also security
checks on multiple levels.

It is initially divided into subnets, connected with each other via route tables
along with a load balancer. This whole setup is placed under an internet
gateway.
Let us look at VPC on the AWS management console.

Login in to your AWS account. Once you are redirected to the AWS
management console. Click on “Services”, a list of options will be visible.
Under “Networking & Content Delivery” there is an option named VPC, select
it. Refer to the images attached ahead for understanding better.
In a while, you will be directed towards the VPC Management Console. On
the left of the window, there is the navigation pane, which consists of various
services as options. Refer to the image attached ahead for better
understanding.

Components of Amazon VPC:

Subnet: It is a section of a VPC that can contain resources such as Amazon


EC2 services and shares a common address component. Public Subnet where
resources are exposed to the internet through Internet Gateway and Private
Subnet where resources are not exposed to the outside world.

Route Table: They are the set of rules used to decide where the network traffic
has to be managed. It specifies the destination i.e, IP address and target. The
target can be Internet gateway, NAT gateway, Virtual private gateway, etc.

Virtual Private Gateway: It is the VPN(Virtual Private Network) hub on the


Amazon side of the VPN connection to have a secure transaction. Users can
attach it to the VPC from which they want to create the VPN connection.

NAT Gateway: Network Address Translation (NAT) Gateway is used when


higher bandwidth, availability with lesser management effort is required. It
updates the routing table of the private subnet such that it sends the traffic to
the NAT gateway. It supports only UDP, TCP, and ICMP protocols.
VPC Peering: A VPC peering connection allows you to route traffic between
two Virtual Private Clouds using IPv4 or IPv6 private addresses. Users can
create a VPC peering connection between their own VPC with a VPC in
another AWS account. This connection helps you to smoothly transfer the
data.

Security Groups: It consists set of firewalls rules that control the traffic for
your sample. You can have a single security group associated with multiple
instances.

Elastic IP: It is a static IP address which is a reserved public IP address that


can be assigned to any Instance in a particular region and never changes.

Network Access Control Lists (NACL): It is an optional layer of security for


your VPC that acts as a firewall for controlling traffic in and out of one or more
subnets. It adds an additional layer of security to your VPC.

Customer Gateway: VPN connection links your network (or data) to your
Amazon VPC (virtual private cloud). A customer gateway is a presenter on
your side of that connection. It can be a physical or software appliance.

Network Interface: It’s a connection between private and public networks.


Network traffic is automatically shifted to the new instance if you move it from
one instance to the other.

VPC Endpoints: It allows VPC to make a connection with other services of


AWS without using the internet. They are of two types, Interference endpoints,
and Gateway endpoints. They are scaled, redundant, and highly available VPC
components.
Properties of VPC

Vpc is a virtual Network or Data centre inside AWS for one cloud

● It is logically isolated from other virtual network in the aws cloud


● Max 5 vpc can be created and 200 Subnets in 1 account
● We can allocate max 5 elastic IP
● Once we created VPC, DHCP NACL and security group will be
automatically created
● A vpc is confined to an aws region and does not extend between
regions
● Once vpc is created , you can not change its CIDR , block range
● If you need a different CIDR size , create a new vpc
● The different subnets within a vpc cannot overlap
● You can however expand your vpc CIDR by adding New/Extra ip address
ranges ( Except gov. Cloud & aws China )

VPC Types

There are 2 types of vpc in aws 1. Default vpc 2 Custom vpc


1. Default vpc :- default vpc created in aws region when aws account is
created

-> has default CIDR , security group , NACL and route table settings

-> has an internet gateway by default

2. Custom VPC :- Is a vpc on aws account owner creates

-> aws user creating custom vpc can decide the CIDR

-> has its own default security group, network ACL and Route table

-> does not have an internet gateway by default , one needs to be create
by user

Implied router & route table

● It is the Central Routing Function


● It Connects the different AZ together and Connects the vpc to the
Internet Gateway
● You Can have upto 200 Route tables per vpc
● You Can Upto 50 Routes Entries per Route Table
● Each Subnet must be associated with Only One Route table at only
Given time
● If you do not Specify a Subnet to Route table association, the Subnet
will be associated with the default vpc Route table
● You Can also edit the Main Route table if you need, but you cannot
delete main Route Table
● However You Can make a Custom Route table manually become the
man Route Table then you can delete the former main, as it is no longer
a main Route table
● You Can associate multiple Subnets with the same Route table .

Internet Gateway

● An Internet Gateway is a Virtual Router that Connects a vpc to the


internet
● Default vpc is already attached with an Internet Gateway
● If you create a new vpc then you must attach the Internet Gateway in
order to access the Internet
● Ensure that your Subnet’s Route Table points to the internet Gateway
● It Performs NAT Between your Private and public Ipv4 address
● It Supports both IPv4 and Ipv6
NAT Gateways

● You can use a network address translation Gateway to enable instances


in a private subnet to connect to the internet or other Aws services, but
prevent the internet from initiating a connection with those instances
● You are charged for creating and using a NAT Gateway in your account
NAT Gateway howly usage and data processing rates apply Amazon
Ec2 charges for data transfer also apply
● To create a NAT Gateway, you must Specify the public subnet in which
the NAT Gateway Should Reside
● You must also specify an Elastic Ip address to associate with NAT
Gateway when you create it
● No need to assign public ip address to your private instance
Practical

How to add VPC into EC-2 Instance

Steps :- Login aws root account & go to Network & Content Delivery & choose VPC
Now choose & click on Create VPC give a name tag ie:-Dheeraj give ip address to it
( [Link] /16 )
Click on create VPC

Your VPC is Created Now create subnet

Go to subnet & click on create subnet & now choose VPC which you have created , give
subnet name ( Dheeraj1) & give ip v4 range with CIDR notation ( [Link]/24) & click on
create , your subnet is now created , Create internet gateway now

Go to internet gateway & create internet gateway & give a name to it & choose internet
gateway, gateway is now created , now choose gateway & go to action , click on tab attach
to vpc , choose VPC which you have created , your gateway is now attached to vpc , Now go
to route table

Go to route table & ceate route table & choose vpc you have created & create route table
than click on subnet association then choose subnet click on edit route , now click on edit
route , & click on add route & enter [Link]/0 & in Target choose internet gateway & choose
gateway which you have created & click on save changes
VPC is now created , create a Linux - EC2 instance now & add VPC & check
instance is now working with VPC or not
Choose vpc which you have created while choosing network settings & enable
auto assign ip address

& choose anywhere from source network ip

Click on create instance after configuration ( Practical is done )

Practical :- How to create VPC NAT Gateway

Steps :- in this practical we need to create 2 subnet , 1 : public subnet & 2


private subnet :

Go to VPC , create a VPC , give a name to it vpc-demo , give ip address


[Link]/16 , create & close , go to subnet , choose create subnet , give a
name public subnet , choose vpc , choose availability zone (ap-south-1a)
give ip CIDR block [Link]/24 , click on create .

Public subnet is created now create private subnet

Click on create subnet give name private subnet choose vpc & availability
zone (ap-south-1b) give ip address [Link]/24 & click on create

Private subnet also created now create internet gateway

Click on internet gateway give name igw-vpc click on create , go to actions


& attach with created vpc

Now we need to create 2 route table 1. For public and 2 for private

Go to route table & choose create route table & give name public route &
choose vpc and click close ,

Create second route & give name private route & choose vpc & create route

Now go to routes & choose public route

Select public route & choose subnet association choose edit , choose
public subnet & save , go to routes & add new route [Link]/0 choose
internet gateway in target & choose n save

Now go to routes & choose private route

Select public route & choose subnet association choose edit , choose
private subnet & save , now no need to edit routes .

Working of vpc is done now to create 2 Linux-Ec2 instance 1 with public


subnet & second with private subnet.

1. Launch private EC-2 instance


Steps :- login your account from [Link]

Go to all services & choose EC2 , click on instance


Now click on launch instances
Now give all the credentials to your Ec2 instance
Name :- jetking , Os :- red hat Linux , instance type :- [Link]

In network choose vpc created by us & choose private subnet


( keep auto assign ip disabled ) now review & launch instance.

2. Launch public EC-2 instance

Steps :- login your account from [Link]

Go to all services & choose EC2 , click on instance


Now click on launch instances
Now give all the credentials to your Ec2 instance
Name :- jetking , Os :- red hat Linux , instance type :- [Link]

In network choose vpce created by us & choose public subnet


( keep auto assign ip enabled ) now review & launch instance.

Now both instances are created & ready for practical

Now connect public instance using putty with username :- ec2-user@ip


address & browse .ppk key & launch

Now ping [Link] for internet connecting through public instance

Now connect private instance through public instance , open pem file of
private instance in notepad & copy all the content
Type sudo nano [Link] (for creating file ) or touch [Link]

Now paste content in this file & save using Ctrl+o , now file is created

Now access private instance through public using ssh

sudo chmod +rwx [Link]


sudo ssh ec2-user@[Link] -i [Link] (private ip of private
instance)

Or
Try to communicate with internet & it will not work

Now create NAT gateway for access private instance connectivity through
internet

Go to NAT gateways in VPC ,create NAT gateway , click on public subnet ,


click on allocate elastic ip it will allocate , now choose create NAT
gateway , choose edit route table , choose private route & go to route ,
choose edit & add [Link]/0 & target choose nat gateway & add created
NAT gateway .

Now private instance will communicate with internet

You can also create 2 Windows-Ec2 instance 1 with public subnet &
second with private subnet.

1. Launch private EC-2 Windows

Steps :- login your account from [Link]

Go to all services & choose EC2 , click on instance


Now click on launch instances
Now give all the credentials to your Ec2 instance
Name :- jetking , Os :- Windows , instance type :- [Link]

In network choose vpc created by us & choose private subnet


( keep auto assign ip disabled ) now review & launch instance.

2. Launch public EC-2 instance

Steps :- login your account from [Link]


Go to all services & choose EC2 , click on instance
Now click on launch instances
Now give all the credentials to your Ec2 instance
Name :- jetking , Os :- Windows , instance type :- [Link]

In network choose vpce created by us & choose public subnet


( keep auto assign ip enabled ) now review & launch instance.

● Now connect public windows instance using RDP


● Then connect private windows machine from public windows
machine using private ip address
● Try to browse internet from private windows machine & it will not
work

Now create NAT gateway for access private instance connectivity through
internet

Go to NAT gateways in VPC ,create NAT gateway , click on public subnet ,


click on allocate elastic ip it will allocate , now choose create NAT
gateway , choose edit route table , choose private route & go to route ,
choose edit & add [Link]/0 & target choose nat gateway & add created
NAT gateway .

Now private instance will communicate with internet ( practical completed)

Practical :- how to Configure NACL ( Network access control List )

Steps :- Create VPC

Go to VPC , create a VPC , give a name to it vpc-demo , give ip address


[Link]/16 , create & close , go to subnet , choose create subnet , give a
name public subnet , choose vpc [Link]/24 , click on create .
Public subnet is created now create internet gateway

Click on internet gateway give name igw-vpc click on create , go to actions


& attach with created vpc

Now we need to create route table For public subnet

Go to route table & choose create route table & give name public route &
choose vpc and click close

Now go to routes & choose public route

Select public route & choose subnet association choose edit , choose
public subnet & save , go to routes & add new route [Link]/0 choose
internet gateway in target & choose n save

Vpc is now configured now create Network ACL inside the VPC tab

Go to VPC , then security & choose network ACL ,


Click on create Network ACL , give name {Dheeraj} & choose created VPC &
click on create NACL
Now click on NACL { Dheeraj} & click subnet association & click edit subnet
association & choose public subnet & do save changes

Working of vpc is done now to create windows instance with public subnet
& vpc

Steps :- login your account from [Link]

Go to all services & choose EC2 , click on instance


Now click on launch instances
Now give all the credentials to your Ec2 instance
Name :- jetking , Os :- WIndows os , instance type :- [Link]

In network choose vpc created by us & choose public subnet


( keep auto assign ip enabled ) now review & launch instance.

Now try to edit Inbound & outbound rules with Network ACL name & port
name like http/https/RDP/ssh/Telnet

AWS Management Tools_1 ( High Availability


services)
Introduction to Amazon Cloudwatch
Amazon CloudWatch is a service used for monitoring and observing
resources in real-time, built for DevOps engineers, developers, site reliability
engineers (SREs), and IT managers. CloudWatch provides users with data and
actionable insights to monitor their respective applications, stimulate system-
wide performance changes, and optimize resource utilization. CloudWatch
collects monitoring and operational data in the form of logs, metrics, and
events, providing its users with an aggregated view of AWS resources,
applications, and services that run on AWS. The CloudWatch can also be used
to detect anomalous behavior in the environments, set warnings and alarms,
visualize logs and metrics side by side, take automated actions and
troubleshoot issues.

Terminologies related to Amazon Cloudwatch

Metrics

● It represents a time-ordered set of data points that are published to


Amazon CloudWatch
● All data point is marked with a timestamp
● Metric is a variable that is monitored and data points are the value of
that variable over time
● They are uniquely defined by a name, namespace, and zero or more
dimensions
● Metric math is used to query multiple cloudwatch metrics and use
math expressions to create new time-series based on these metrics

Dimensions

● A dimension is a name/value pair which uniquely identifies a metric


● Dimensions are the unique identifiers for a metric, so whenever you
add a unique name/value pair to one of the metrics, you are creating
a new variation of that metric.

Statistics

● Statistics are metric data aggregations over specified periods of


time
● The few available statistics on Cloudwatch are maximum, minimum,
sum, average, and sample count.

Alarm

● It is used to automatically initiate actions on our behalf


● It watches a single metric over a specified time period and performs
one or more specified actions based on the value of the metric
● The estimated AWS charges can also be monitored using the alarm
Percentiles

● It represents the relative weightage of the data in a dataset


● It helps the user to get a better understanding of the distribution of
metric data

Cloudwatch dashboard

● A user-friendly Cloudwatch console is available which is used for


monitoring resources in a single view.
● There is no limit on the number of cloudwatch dashboards you can
create.
● These dashboards are global and not region-specific

Cloudwatch agent

● It is required to be installed
● It collects logs and system-level metrics from EC2 instances and on-
premises servers

Cloudwatch Events:

● Cloudwatch events help you to create a set of rules that match with
any event(i.e stopping of EC2 instance).
● These events can be routed to one or more targets like AWS Lambda
functions, Amazon SNS Topics, Amazon SQS queues, and other
target types.
● Cloudwatch Events observes the operational events continuously
and whenever there is any change in the state of the event, it
performs the action by sending notifications, activating lambda, etc.
● An event indicates a change in the AWS environment. Whenever
there is a change in the state of AWS resources, events are
generated.
● Rules are used for matching events and routing to targets.
● Target process events. They include Amazon EC2 instances, AWS
Lambda functions, etc. A target receives the events in JSON format.

Cloudwatch logs:

● Amazon Cloudwatch logs enable you to store, monitor, and access


files from AWS resources like Amazon EC2 instances, Route53, etc.
● It also helps you to troubleshoot your system errors and maintain the
logs in highly durable storage.
● It also creates log of information about the DNS queries that Route
53 receives

Amazon Cloudwatch Use Case

Notifying gfg website management team when the instance on which gfg
website is hosted stops Whenever the CPU utilization of instance (on which
GeeksForGeeks website is hosted ) goes above 80%, cloudwatch event is
triggered. This cloudwatch event then activates the SNS topic which sends the
alert email to the attached gfg subscribers.
Step 1: Let us assume that you have already launched an instance with the
name tag ‘instance’.

Step 2: Go to SNS topic dashboard and click on create a topic

Step 3: You will be directed to this dashboard. Now specify the name and
display name.

Step 4: Scroll down and click on create the topic.


Step 5: The SNS topic is created successfully.

Step 6: Go to the SNS topic dashboard and click on gfgtopic link.

Step 7: Under the subscriptions section, Click on Create subscription.


Step 8: Select Email as protocol and specify the email address of subscribers
in Endpoint. Click on create the subscription. Now Go to the mailbox of the
specified email id and click on Subscription confirmed.

Step 9: Go to the cloudwatch dashboard on the AWS management console.


Click on Metrics in the left pane.
Step 10: In All metrics section click on EC2

Step 11: Click on Per-instance metrics


Step 12: Select the instance you launched

Step 13: Go to Graphed metrics, click on the bell icon

Step 14: This dashboard shows the components of Amazon Cloudwatch such
as Namespace, Metric Name, Statistics, etc
Step 15: Select the greater threshold. Also, specify the amount( i.e 80 ) of the
threshold value. Click on Next.
Step 16: Click on Select an existing SNS topic, also mention the name of the
SNS topic you created now.
Step 17: Specify the name of the alarm and description which is completely
optional. Click on Next and then click on Create alarm.
Step 18: The alarm is successfully created.

Step 19: You can see the graph which notifies whenever CPU utilization goes
above 80%.

Advantages of Amazon Cloudwatch

● A large amount of data is produced by web applications nowadays


so amazon cloudwatch acts as a dashboard that contains the
organized collection of whole data.
● It improves the total cost of ownership by providing alarms and also
takes automated actions when there is an error in limits provided.
● Applications and resources can be optimized by examining the logs
and metric data.
● Detailed Insights from the application are provided through data like
CPU utilization, capacity utilization, memory utilization, etc
● It provides a great platform to compare and contrast the data
produced by various AWS services.

Practical of ELB using ALB ( Application Load Balancer )

Steps :- login your account from [Link]

Go to all services & choose EC2 , click on instance


Now click on launch instances
In security group create a new group named ELB & add 2 New rule ( http &
https)
Now give all the credentials to your Ec2 instance
Name :- jetking , Os :- Windows , instance type :- [Link]

In network choose default vpc & choose subnet from (us-east-1a)


( keep auto assign ip enabled ) now review & launch instance.

Now go to server manager & Install web server ( IIS) feature


Then go to directory :- C:\inetpub\wwwroot
Delete all files & create a new html file with name ( This is server A ) & same
using [Link] extension file
Now create machine 2

Go to all services & choose EC2 , click on instance


Now click on launch instances
In security group use existing group named ELB
Now give all the credentials to your Ec2 instance
Name :- jetking , Os :- Windows , instance type :- [Link]

In network choose default vpc & choose subnet from (us-east-1b)


( keep auto assign ip enabled ) now review & launch instance.

Now go to server manager & Install web server ( IIS) feature


Then go to directory :- C:\inetpub\wwwroot
Delete all files & create a new html file with name ( This is server B ) & same
using [Link] extension file

Now create ELB with ALB ( Application Load Balancer) from EC-2 Option

1. Click on create ELB


2. Choose ALB using http & https
3. Give name ELB & choose subnet ( from which you have created EC2
Instances , us-east-1a & us-east 1b)
4. Choose security group ( ELB ) & remove default security group
5. Choose create target group & choose instance keep everything default
& create target group
6. Now choose both instances & create target group ( include pending
below )
7. After creating target group create ELB using ELB security group
8. After creating ELB click on the default domain
[Link]

9. Refresh this domain several types & you will see


Page from both instances

Practical is now Completed

Practical :- configure SNS ( Simple notification services )

Steps :- login your account from [Link]


Go to all services & choose EC2 , click on instance
Now click on launch instances
In security group create a new group named ELB & add 2 New rule ( http &
https)
Now give all the credentials to your Ec2 instance
Name :- jetking , Os :- Windows , instance type :- [Link]

( keep auto assign ip enabled ) now review & launch instance.

Choose Aws sns ( simple notification services ) from aws tabs

Now click on topics & choose create topics , choose standard , give it a Name
( CPU )
Keep everything default & create topic , choose create subscription , choose
protocol option & enter your email ( dheerajjetking123@[Link]) & create
subscription , now verify confirmation from the email you received , click on
confirm subscription .

Now go to services & click on cloudwatch

Choose all metrics , click on EC-2 , click on pre-installed metrics , Now choose
CPU-utilization & your instance & now click on Graphed metrics , now choose
1 minute & click on alarm(create alarm) icon & choose lower/equal & enter 25
& click Next choose in-alarm , select an existing sns topic & choose CPU
which you have created earlier , there you will be able to see your email id ,
Now click Next give alarm name ( CPU ) & click nex & create alarm , now you
will receive E-mail .

Practical :- Autoscaling ( Simple notification services )

Steps :- login your account from [Link]

Go to all services & choose EC2 , click on instance


Now click on launch instances
In security group create a new group name & add 2 New rule ( http & https)
Now give all the credentials to your Ec2 instance
Name :- jetking , Os :- Linux , instance type :- [Link]

In subnet choose us-east-a

( keep auto assign ip enabled ) now review & launch instance.

Now Choose Linux instance & go to actions & choose image & click Create
image & give Name & Description

Now image will be created


1. Now go to Auto scaling & choose Launch Configuration :-
2. .. create launch configuration Now choose ami & click on My Ami
now select the ami-Linux & choose default T-2 Micro & go to Next
give name Demo than Next again Next & choose keypair then
choose existing security group which you have created & click on
create Launch configuration &
Now create an auto-scaling group from auto-scaling , give a group name
Demo-auto & Click on switch to launch configuration n choose created
configuration , then choose vpc & all the subnet to list & then next now enter
60 seconds ( for health check), now click next & enter 4 in maximum capacity
& desired capacity 2 Next & choose Target tracking scaling policy & choose
average CPU utilization & Target value should be greater then 50 & click Next
You can also add SNS ( simple notification services optional) Now next &
create autoscaling group.

You will see instances are already created & you can give a name to it &
we can also open it through RDP . now create a file on Desktop on RDP
instance with name [Link] & run it , it will continue running & increase CPU
utilization . Now you will see more instances are added

if you want to decrease instances create new alarm :- if cpu utilization


is less then or equal to 20 % for 1 minute , create alarm & remove 1 instance
now choose next & now review & create auto-scaling group now desired
instances are 2 , minimum are 2 , & maximum are 7 & check in history 2
instances are created you can check scaling policy & you guys will see
instances are automatically creating & check history & can check policy , now
terminate 2 instances & you will see instances are automatically creating &
check in Autoscalling & instances are adding ( autoscalling) automatically &
you can also increase & decrease instances by policy & choose decrease &
add policy of increasing if cpu utilzation is more then 80 % ( instances will be
automatically deleted )

Practical is now completed

Chapter-AWS - IAM ( Identification & access


management )

● AWS Identity and Access Management (IAM) is a web service that helps you
securely control access to AWS resources for your users.
● IAM is used to control
○ Identity – who can use your AWS resources (authentication)
○ Access – what resources they can use and in what ways
(authorization)
● IAM can also keep your account credentials private.
● With IAM, multiple IAM users can be created under the umbrella of the AWS
account or temporary access can be enabled through identity federation with
corporate [Link] third party providers.
● IAM also enables access to resources across AWS accounts.

IAM Features

● Shared access to your AWS account


○ Grant other people permission to administer and use resources in your
AWS account without having to share your password or access key.
● Granular permissions
○ Each user can be granted with different set granular permissions as
required to perform their job.
● Secure access to AWS resources for applications that run on EC2
○ IAM can help provide applications running on EC2 instance temporary
credentials that they need in order to access other AWS resources
● Identity federation
○ IAM allows users to access AWS resources, without requiring the user
to have accounts with AWS, by providing temporary credentials for e.g.
through corporate network or Google or Amazon authentication
● Identity information for assurance
○ CloudTrail can be used to receive log records that include information
about those who made requests for resources in the account.
● PCI DSS Compliance
○ IAM supports the processing, storage, and transmission of credit card
data by a merchant or service provider, and has been validated as
being Payment Card Industry Data Security Standard (PCI DSS)
compliant
● Integrated with many AWS services
○ IAM integrates with almost all the AWS services
● Eventually Consistent
○ IAM, like many other AWS services, is eventually consistent and
achieves high availability by replicating data across multiple servers
within Amazon’s data centers around the world.
○ Changes made to IAM would be eventually consistent and hence
would take some time to reflect
● Free to use
○ IAM is offered at no additional charge and charges are applied only for
use of other AWS products by your IAM users.
● AWS Security Token Service
○ IAM provide STS which is an included feature of the AWS account
offered at no additional charge.
○ AWS charges only for the use of other AWS services accessed by the
AWS STS temporary security credentials.

Identities

IAM identities determine who can access and help to provide authentication for
people and processes in your AWS account
Account Root User

● Root Account Credentials are the email address and password with which you
sign-in into the AWS account
● Root Credentials has full unrestricted access to AWS account including the
account security credentials which include sensitive information
● IAM Best Practice – Do not use or share the Root account once the AWS
account is created, instead create a separate user with admin privilege
● An Administrator account can be created for all the activities which too has full
access to the AWS account except the accounts security credentials, billing
information and ability to change password

IAM Users
● IAM user represents the person or service who uses the access to interact
with AWS.
● IAM Best Practice – Create Individual Users
● User credentials can consist of the following
○ Password to access AWS services through AWS Management
Console
○ Access Key/Secret Access Key to access AWS services through
API, CLI or SDK
● IAM user starts with no permissions and is not authorized to perform any
AWS actions on any AWS resources and should be granted permissions as
per the job function requirement
● IAM Best Practice – Grant least Privilege
● Each IAM user is associated with one and only one AWS account.
● IAM User cannot be renamed from AWS management console and has to be
done from CLI or SDK tools.
● IAM handles the renaming of user w.r.t unique id, groups, policies where the
user was mentioned as a principal. However, you need to handle the
renaming in the policies where the user was mentioned as a resource
IAM Groups

● IAM group is a collection of IAM users


● IAM groups can be used to specify permissions for a collection of users
sharing the same job function making it easier to manage
● IAM Best Practice – Use groups to assign permissions to IAM Users
● A group is not truly an identity because it cannot be identified as a Principal in
an access policy. It is only a way to attach policies to multiple users at one
time
● A group can have multiple users, while a user can belong to multiple groups
(10 max)
● Groups cannot be nested and can only have users within it
● AWS does not provide any default group to hold all users in it and if one is
required it should be created with all users assigned to it.
● Renaming of a group name or path, IAM handles the renaming w.r.t to
policies attached to the group, unique ids, users within the group. However,
IAM does not update the policies where the group is mentioned as a resource
and must be handled manually
● Deletion of the groups requires you to detach users and managed policies
and delete any inline policies before deleting the group. With AWS
management console, the deletion and detachment is taken care of.

IAM Roles

Refer to My Blog Post about IAM Role

MultiFactor Authentication (MFA)

● For increased security and to help protect the AWS resources, Multi-Factor
authentication can be configured
● IAM Best Practice – Enable MFA on Root accounts and privilege users
● Multi-Factor Authentication can be configured using
○ Security token-based
■ AWS Root user or IAM user can be assigned a hardware/virtual
MFA device
■ Device generates a six digit numeric code based upon a time-
synchronized one-time password algorithm which needs to be
provided during authentication
○ SMS text message-based (Preview Mode)
■ IAM user can be configured with the phone number of the user’s
SMS-compatible mobile device which would receive a 6 digit
code from AWS
■ SMS-based MFA is available only for IAM users and does not
work for AWS root account
● MFA needs to enabled on the Root user and IAM user separately as they are
distinct entities. Enabling MFA on Root does not enable it for all other users
● MFA device can be associated with only one AWS account or IAM user and
vice versa
● If the MFA device stops working or is lost, you won’t be able to login into the
AWS console and would need to reach out to AWS support to deactivate MFA
● MFA protection can be enabled for service api’s calls using “Condition”:
{“Bool”: {“aws:MultiFactorAuthPresent”: “true”}} and is available only if the
service supports temporary security credentials.

Practical

AWS – Types of Databases

Read

Discuss
Amazon Web Services provide a wide range of database solutions to its
clients. Depending upon the nature of the data and the cost constraints of the
client these various database types serve all users accordingly.

Various databases that are provided by the Amazon Web Services(AWS)


are :

1. Amazon DynamoDB
2. Amazon Aurora
3. Amazon Relational Database Service
4. Amazon Timestream
5. Amazon Neptune
6. Amazon Quantum Ledger Database (QLDB)
7. Amazon RDS on VMware

Let’s explore each of them in brief.

Key-valued Databases

It focuses more on the values rather than the structure of the databases. It
includes DynamoDB.

Amazon DynamoDB:

Amazon DynamoDB is the NoSQL database service provided by amazon


which is fully managed and automated. NoSQL means that you don’t have to
write queries to create a table or retrieve the data you can do so by some
clicks to create a dynamic table which means you can add any amount of
attributes, columns and store the data. The main advantage of using this is
that it is fully managed and it automatically handles the traffic of data on the
multiple servers and gives the optimum performance and you don’t have to
lookup for the underlying hardware, setup, configuration, scaling is all
managed by the amazon. It also automatically backup and restore that
provides the security of data. The feature provided by the amazon which is
commendable is that according to your need of data or traffic it automatically
scale up and scale down you don’t have to look upon the underlying servers
or their maintenance and according to the usage you have you used it
charges accordingly and also there are no minimum charges for the usage.
According to the AWS, DynamoDB can handle 20 trillion of the request per
day and also can handle the peak of the traffic up to 20 million per second
which is huge and commendable. Because of its advantageous features,
many large companies Lyft, Airbnb, and Redfin as well as enterprises such as
Samsung, Toyota, and Capital One transferred their workloads to DynamoDB.

Amazon Relational database service

Amazon RDS is the service provided by the AWS which makes it easy to set
up, deploy, scale, and operate relational databases in the cloud. It provides
you with six familiar database engines to choose and that includes Amazon
Aurora, PostgreSQL, MySQL, MariaDB, Oracle Database, and SQL Server.

Amazon Aurora:
Amazon Aurora supports MySQL and PostgreSQL which is a relational
database engine provided by the Amazon web service. It means that code,
applications, and drivers are used in the database. You have to write proper
queries for creating tables and storing data in it as you do in MySQL. Aurora
charges minimal or no charges for using this. It is five times faster than the
actual MySQL and three times faster than the actual PostgreSQL. It can auto-
scale up to 64 TB per database instance. There are certain features of MySQL
that are not provided by the Aurora such as the MyISAM storage engine.
Using extensions you can communicate between two or more databases of
Aurora and can move your databases across aurora and your local engine
which is also a feature of this. The main advantage is speed, security, and
availability which is done by replicating data over three availability zones. It
provides the feature of self-healing i.e. it performs the automatic error
scanning of your data and the blocks and also provides fault tolerance i.e it
provides the ability to continue operating without interruption when their ifs
fault in one or more component. It also provides autoscaling, according to your
database size it scales out and scales down you don’t have to worry about the
servers or their charges just have to pay what you are using.

Amazon RDS on VMware:

Amazon Relational Database Service (Amazon RDS) on VMware allows you


to deploy the database on the VMware environment using the Amazon RDS
technology. It allows you to work on the same simple interface, same
database with the same environment on-premise you will not face any type of
difference in that. It enables you to set up, configure, and operate your
relational database on the cloud within a few clicks. It also supports MySQL,
PostgreSQL, and the Microsoft SQL server database. It is also fully managed
and doesn’t have to look upon the provisioning, the configuration of the
hardware or the managements all are automated. It can utilize the use of the
cloud watch for the monitoring of the data. For security purposes and the high
availability features it also backups its data. Having RDS on-site makes it very
easy for you to operate and integrate Amazon RDS on VMware within your
existing VMware vSphere private data centers. There are some perquisites to
use this: you will need to have Administrative privileges on the cluster to set
up RDS on VMware. You will also need to have a second set of credentials for
use by RDS on VMware And the hardware that you use for the RDS should be
registered in the valid VMware Hardware Compatibility Guide.

Graph type Database

These contain the databases in which data are linked to each other or forming
hierarchy.

Amazon Timestream:

Amazon timestream is used to handle the time series data that assesses how
events change over time. The data which changes according to time which is
used by the IoT and the other operational applications gather, maintain, and
query with the help of Amazon Timestream. It is a serverless database. Like
other databases, it is also automated, fully managed and you don’t have to
care much about the maintenance and the hardware provisioning, setup, or
configuration so that you can give much time to your work. It also provides the
feature of autoscaling, ensuring that you never run out of space. Amazon
Timestream is optimized to assess, query, and store timestream data by
storing data is set of time intervals, ranging from milliseconds, microseconds,
and even nanoseconds. Other features that provide the ability to automatically
configure retention, tiering, and data compression. It is much faster than the
other relational databases. It can handle the trillions of the request every
single day which helps in the reduction of the cost and also it is much faster
than the other databases. All the features combined provided the cost
reduction. The data stored by the time stream database can later be used for
the business intelligence tools and machine learning services.

Amazon Neptune:

Amazon Neptune supports the graph database. A graph database is used for
the data which are connected, which are correlated to each other and have
some relationships between them. It is different from the SQL database. It
feels like a NoSQL database with no query, no table only two entities i.e
vertices and edges. The main purpose of developing a graph database is
network security, fraud detection, to understand the drug discovery, and many
more. Use cases for such highly-connected data include social networking,
restaurant recommendations, etc. The features provided by the Neptune is
high-performance data graph and maintaining billions of the relationship of
data with very ease and with very low latency. To make the data available it
continuously replicates all its data to amazon s3 and other availability zones
for the security purpose also and for higher availability also. It also supports
the most popular model graphs which add-on its feature. It is also fully
managed, the user doesn’t have to look upon the underlying hardware or
provisioning and also provides the feature of autoscaling so that you will never
run out of space and pay only for what you use. It was developed to address
the limitation of the relational database and to solve or make work more
efficient for the complex data.

Amazon Quantum Ledger Database (QLDB):

Amazon Quantum Ledge Database (QLDB)was introduced by Andy Jassy


alongside the Amazon-Managed Blockchain service. It is also a fully managed
and serverless database but the main function that provides is that it is a
ledger database which means it is used for recording or storing the financial
and economic data of an organization over some time. It allows you to
maintain the complete history of accounting and transactional data between
multiple parties in an immutable, transparent, and cryptographic way through
the use of the cryptographic algorithm SHA-256, making it highly secure. It is
serverless so the cost of the underlying hardware is also reduced. You only
have to focus on your data and the transaction made. It’s a new type of
database which is provided by the amazon which focuses on the ledger so
that you can focus more on the development of data rather than its managing
technique. It keeps the record at one place which is easy to retrieve and work
upon and can focus more on analyzing and solving issues. it has been
adopted by many of the large enterprises and businesses such as Wipro,
Splunk, sage, etc. AWS said that they are using the version of the Quantum
Ledge Database internally for a long time but now as it is made available for
the external users also, so they have added the ability to cryptographically
verify the data integrity and comes out to be very useful.
Practical ( Create Database Table using DynamoDB)

Steps :-

Login aws account , Open dynamoDB from database section , click on create
table

Give table name { emp_db } , give primary key { emp_id } , & choose Number ,
click on provisioned ( free-tier eligible) & click on create

Now open table from table section & you can see all the information from
table

Now go to actions & click on create item add Emp name :- Dheeraj ,
emp_designation :- tech. Trainer.

Practical 2 :- create an RDS instance & connect it through Linux Machine


Steps :- open RDS from aws in database section

Click on create Database , choose database engine ( free-tier eligible)

Choose DB engine & licence & DB engine version , give DB instance name in
DB instance identifier section ,Master username ( mydb ) , master password
( 123@mydb) & click on Next , choose default VPC , choose ( ap-south-1a) in
availability zone section , uncheck enable deletion protection & click on create
database

Now launch a Linux Ec2 Instance


in subnet setting choose choose south-1a

Add tag , EC2 instance ,


create a New-security group & add 1 rule in security group ( add rule type
(amazon aurora & TCP , access from anywhere ) now launch instance

Now connect EC2 instance using putty

Now install mysql services in Linux instance

Type yum install mysql

Mysql will be installed

Now connect Mysql instance in EC2 instance


Open RDS instance from RDS section

Go to security group and add inbound rule

Choose Mysql/aurora & add ec2 instance from source section


Save the rule

Now open instance & copy Endpoint link from connectivity & security

Now open Linux instance & type

Mysql -h {endpointurl} -p 3306 -u admin - p

Your connectivity is now done & create database & enjoy


Note :- in few cases you need to add your ec2 instance through database
services & the command will be

Mysql -h endpointurl -u admin - p

To delete an rds instance disable ( enable deletion protection in database,s


modify section )
AWS Redshift
● Amazon Redshift is a fully managed, fast and powerful, petabyte scale data
warehouse service
● Redshift automatically helps
○ set up, operate, and scale a data warehouse, from provisioning the
infrastructure capacity
○ patches and backs up the data warehouse, storing the backups for a
user-defined retention period
○ monitors the nodes and drives to help recovery from failures
○ significantly lowers the cost of a data warehouse, but also makes it
easy to analyze large amounts of data very quickly
○ provide fast querying capabilities over structured data using familiar
SQL-based clients and business intelligence (BI) tools using standard
ODBC and JDBC connections.
○ uses replication and continuous backups to enhance availability and
improve data durability and can automatically recover from node and
component failures.
○ scale up or down with a few clicks in the AWS Management Console or
with a single API call
○ distribute & parallelize queries across multiple physical resources
○ supports VPC, SSL, AES-256 encryption and Hardware Security
Modules (HSMs) to protect the data in transit and at rest.

● Redshift only supports Single-AZ deployments and the nodes are


available within the same AZ, if the AZ supports Redshift clusters
● Redshift provides monitoring using CloudWatch and metrics for compute
utilization, storage utilization, and read/write traffic to the cluster are available
with the ability to add user-defined custom metrics
● Redshift provides Audit logging and AWS CloudTrail integration
● Redshift can be easily enabled to a second region for disaster recovery.
Redshift Performance
● Massively Parallel Processing (MPP)
○ automatically distributes data and query load across all nodes.
○ makes it easy to add nodes to the data warehouse and enables fast
query performance as the data warehouse grows.
● Columnar Data Storage
○ organizes the data by column, as column-based systems are ideal for
data warehousing and analytics, where queries often involve
aggregates performed over large data sets
○ columnar data is stored sequentially on the storage media, and require
far fewer I/Os, greatly improving query performance
● Advance Compression
○ Columnar data stores can be compressed much more than row-based
data stores because similar data is stored sequentially on disk.
○ employs multiple compression techniques and can often achieve
significant compression relative to traditional relational data stores.
○ doesn’t require indexes or materialized views and so uses less space
than traditional relational database systems.
○ automatically samples the data and selects the most appropriate
compression scheme, when the data is loaded into an empty table
Redshift Single vs Multi-Node Cluster
● Single Node
○ single node configuration enables getting started quickly and cost-
effectively & scale up to a multi-node configuration as the needs grow
● Multi-Node
○ Multi-node configuration requires a leader node that manages client
connections and receives queries, and two or more compute nodes
that store data and perform queries and computations.
○ Leader node
■ provisioned automatically and not charged for
■ receives queries from client applications, parses the queries and
develops execution plans, which are an ordered set of steps to
process these queries.
■ coordinates the parallel execution of these plans with the
compute nodes, aggregates the intermediate results from these
nodes and finally returns the results back to the client
applications.
○ Compute node
■ can contain from 1-128 compute nodes, depending on the node
type
■ executes the steps specified in the execution plans and transmit
data among themselves to serve these queries.
■ intermediate results are sent back to the leader node for
aggregation before being sent back to the client applications.
■ supports Dense Storage or Dense Compute nodes (DC)
instance type
■ Dense Storage (DS) allow creation of very large data
warehouses using hard disk drives (HDDs) for a very low
price point
■ Dense Compute (DC) allow creation of very high
performance data warehouses using fast CPUs, large
amounts of RAM and solid-state disks (SSDs)
■ direct access to compute nodes is not allowed

Redshift Availability & Durability


● Redshift replicates the data within the data warehouse cluster and
continuously backs up the data to S3 (11 9’s durability)
● Redshift mirrors each drive’s data to other nodes within the cluster.
● Redshift will automatically detect and replace a failed drive or node
● If a drive fails, Redshift
○ cluster will remain available in the event of a drive failure
○ the queries will continue with a slight latency increase while Redshift
rebuilds the drive from replica of the data on that drive which is stored
on other drives within that node
○ single node clusters do not support data replication and the cluster
needs to be restored from snapshot on S3
● In case of node failure(s), Redshift
○ automatically provisions new node(s) and begins restoring data from
other drives within the cluster or from S3
○ prioritizes restoring the most frequently queried data so the most
frequently executed queries will become performant quickly
○ cluster will be unavailable for queries and updates until a replacement
node is provisioned and added to the cluster
● In case of Redshift cluster AZ goes down, Redshift
○ cluster is unavailable until power and network access to the AZ are
restored
○ cluster’s data is preserved and can be used once AZ becomes
available
○ cluster can be restored from any existing snapshots to a new AZ within
the same region

Redshift Backup & Restore


● Redshift replicates all the data within the data warehouse cluster when it is
loaded and also continuously backs up the data to S3
● Redshift always attempts to maintain at least three copies of the data
● Redshift enables automated backups of the data warehouse cluster with a 1-
day retention period, by default, which can be extended to max 35 days
● Automated backups can be turned off by setting the retention period as 0
● Redshift can also asynchronously replicate the snapshots to S3 in another
region for disaster recovery

Redshift Scalability
● Redshift allows scaling of the cluster either by
○ increasing the node instance type (Vertical scaling)
○ increasing the number of nodes (Horizontal scaling)
● Redshift scaling changes are usually applied during the maintenance window
or can be applied immediately
● Redshift scaling process
○ existing cluster remains available for read operations only while a new
data warehouse cluster gets created during scaling operations
○ data from the compute nodes in the existing data warehouse cluster is
moved in parallel to the compute nodes in the new cluster
○ when the new data warehouse cluster is ready, the existing cluster will
be temporarily unavailable while the canonical name record of the
existing cluster is flipped to point to the new data warehouse cluster

Redshift vs EMR vs RDS


● RDS is ideal for
○ structured data and running traditional relational databases while
offloading database administration
○ for online-transaction processing (OLTP) and for reporting and analysis
● Redshift is ideal for
○ large volumes of structured data that needs to be persisted and
queried using standard SQL and existing BI tools
○ analytic and reporting workloads against very large data sets by
harnessing the scale and resources of multiple nodes and using a
variety of optimizations to provide improvements over RDS
○ preventing reporting and analytic processing from interfering with the
performance of the OLTP workload
● EMR is ideal for
○ processing and transforming unstructured or semi-structured data to
bring in to Amazon Redshift and
○ for data sets that are relatively transitory, not stored for long-term use.

Amazon Redshift Practical


Steps :-

1. Create a IAM user with the name of Redshift & add


policies to user { Redshiftqueryeditor &
RedshiftreadonlyAccess }
2. Go to Redshift tab from all services option & click on
create cluster , give name to the cluster
“examplecluster” give a name to database user & set
password for that. ( default database for redshift is
dev.
3. Set IAM roles which we have assigned to the IAM user
inside the cluster & and select the cluster then enter in
cluster properties
4. Add inbound rule in security group which is connected
to the Redshift cluster { port no. is TCP - 5439 } &
choose accessible from anywhere - [Link]/0
5. Your Redshift cluster is now configured & created
6. Go to Ec2-user login with Redshift account
7. Go to redshift cluster & click on redshift cluster
{ change region if you are not able to see the cluster }
8. Click on cluster & choose query editor , now connect to
the database with using { database-name - Dev ,
username - awsuser , password - Dheeraj123 }
9. Now give query of creating table inside the query editor

Practical is finished

Amazon Route DNS & 53

Introduction to Amazon Route53


● Last Updated : 25 Jun, 2022

Read

Discuss

In Simplest terms, cloud computing means storing and accessing the data and
programs on remote servers that are hosted on the internet instead of the
computer’s hard drive or local server. It is also referred to as Internet-based
computing.

Features of cloud

● No up-front investment
● Lowering operating cost
● Highly scalable
● Easy access
● Reducing business risks and maintenance expenses
● No need to guess the capacity
● Flexible

Amazon Web Services is a subsidiary of [Link] that provides on-


demand cloud computing platforms to individuals, companies, and
governments, on a paid subscription basis.

Amazon Route53

Amazon Route 53 is a highly available and scalable cloud Domain Name


System (DNS) web service. It is basically designed for developers and
corporate to route the end users to Internet applications by translating human-
readable names like [Link] into the numeric IP addresses
like [Link] that computers use to connect to each other. You cannot use
Amazon Route 53 to connect your on-premises network with AWS Cloud.
Functions of Route53

● If a web application requires a domain name, Route53 service helps


to register the name for the website (i.e domain name).
● Whenever a user enters the domain name, Route53 helps to
connect the user to the website.
● If any failure is detected at any level, it automatically routes the user
to a healthy resource.
● Amazon Route 53 is cost effective, secure and scalable.
● Amazon Route 53 is flexible, highly available and reliable.

Methodologies related to Route53

● Records: Records are created to route internet traffic to the


resources. They are the objects present in the hosted zone which
determines how the internet traffic has to be routed for a domain
name so that it finally reaches the resources. The name of each
record in a hosted zone must end with the name of the hosted zone.
● Hosted zone: When the domain name is registered, Route53
creates a public hosted zone that has the same name as the domain
name. It is a collection of records that contains information about
how to route traffic of its domains and all of its subdomains.
● DNS query: It is a request for information sent from DNS client to
the DNS server.
● Alias records: Alias records helps in routing internet traffic to AWS
resources like S3 bucket, Amazon CloudFront, etc. It is created at
the top node of the DNS namespace.
● Name servers: They are the servers in the DNS that translates the
domain name into IP address so that internet traffic can be routed to
the resources.
● DNS failover: A method for routing the traffic from unhealthy
resources to healthy resources, whenever a failure is detected.
● Routing policy: Routing policy determines how Amazon Route53
responds to queries.

Types of Routing Policy

● Simple routing policy: It is a simple Route53 routing technique that


can be used to route internet traffic to a single resource. For
example; Web server to a website. Using this, routing multiple
records with the same name cannot be created but multiple values
( such as multiple IP addresses ) can be specified in the same
record.
● Failover routing policy: Whenever a resource goes unhealthy, this
policy allows to route the traffic from unhealthy resource to healthy
resource.
● Geolocation routing policy: This routing policy routes the traffic to
resources on the basis of the geographic location of the user.
Geographic locations can be specified by continent, country, or
state. For example; A person residing in France will be redirected to
the website in the French language while a person from the US will
be redirected to the website in the English language.
● Geoproximity routing policy: It routes traffic on the basis of the
geographical location of the user and the type of content user wants
to access. The user can optionally shift traffic from resources at one
location to resource at another location. Using this policy, a user can
shift more traffic to one location compared to another location by
specifying a value known as bias.
● Latency routing policy: If a website has to be hosted in multiple
regions then a latency based routing policy is used. To improve
performance for the users, this policy helps in serving requests from
the AWS region that provides the lowest latency. To use this policy
the latency records for the resources are created in multiple AWS
regions.
● Multivalue routing policy: It is used when users want Route53 to
return multiple values in response to DNS queries. It first checks the
health of resources and then returns the multiple values only for the
health resources.
● Weighted routing policy: This routing policy routes traffic to
multiple resources with a single domain name according to the
proportion decided by the user.

Benefits of Route53

● Highly Reliable: Route53 is built using AWS’s highly available and


reliable infrastructure. The distributed nature of the AWS DNS
servers helps ensure a consistent ability to route the end-users to
the web application.
● Scalable: It automatically scales the resources during large traffic
and also handles large queries without the user’s intervention.
● Easy to use: Very user-friendly and easy to configure DNS settings.
It can start to answer your DNS queries within minutes. Can be
mapped easily to any resource.
● Health Check: Route 53 monitors the health of the application. If
any failure is detected, it automatically redirects the user to a healthy
resource before the customer can identify the problem.
● Flexible: You can decide which policy you want to use at given time.
● Simple: Using routing types, Route53 helps to manage traffic
globally.
● Cost-effective: Payment is done only according to the services
used.
● Secure: By integrating it with IAM, the access to Amazon Route53 is
secured by giving its permissions to only the authorized users.
● Mapped with various AWS services: It can be used to map
domain names to Amazon EC2 instances, S3 buckets, and other
AWS resources.

You might also like