Hello everyone! I welcome you all to this
session on AWS tutorial. Today in this
session, I'm going to give you a
comprehensive overview of what AWS is
and we're going to confine ourselves to
basically what in AWS solutions
architects should know right. There are a
100+ services in AWS, it's very
difficult to know all the services and
I'm sure there's no AWS
professional out there who knows all the
AWS services which are offered by Amazon
right. So, without wasting the time guys
let's go ahead and start with the agenda
to understand what all we'll be covering
today. So, guys, we're gonna follow a
top-down approach, we're gonna start with
an introduction to cloud computing.
Then we're gonna understand the various
cloud models that are available in cloud
computing on which the companies operate.
After that, I'm gonna introduce you to
what AWS is and how it fits in the
storyline where we start and talking
about cloud computing then talking about
cloud models and then talking about AWS.
It'll all be clear when we reach
this particular point. After that, I'm
gonna introduce you guys to the various
domains and services that AWS has to
offer based on which companies are using
AWS and have made AWS, the
number one cloud provider in the world
right. After that, I'm gonna show you guys
an application which basically resides
on my local computer, I'm going to show
you guys how you can architect its
infrastructure on AWS after this session
and I'm sure it'll be helpful to you. Now
guys, this session is a live session so I
want you guys to be as interactive as
possible so that it will benefit both of
us right. So if you have any questions
during the session please comment it in
the chatbox and I'd be happy to answer
it for you right. So, just a quick check
guys are we all clear with the agenda that
I've just discussed if yes please put a
yes in your chatbox and we'll move
further all right. So I can say
Shubham is clear so is Akanksha, Roshan. Alright guys, so I see that all of you guys
have given me a yes so let's go ahead
and start with the session with the
first topic which is introduction to
cloud computing. So what is cloud
computing exactly, let's understand that
as we move along. So guys cloud computing
is nothing but the use of remote
servers on the internet to do a
particular task right. Now you would ask
like why do we need to connect to remote
computers when I can do everything on my
personal computer. Now imagine if you
have an application which requires a lot
of processing right, so what will you do
will you buy a server which has a lot of
processing power, put your application
over there and then see how your
application is functioning or if I give
you one more option that you can rent a
server from a cloud provider and
basically do a RDP or an SSH into that
put your application over there and see
the working of that application how it
runs and I also tell you that the moment
you are done with the server you can
just give it back to me and I will
charge you only for the time that you
used it. On top of that, what if I tell
you that it's as she passed
$0.0005/hour.
Isn't that amazing and that is
exactly what cloud computing is all
about guys. So cloud computing for a
beginner, it's nothing but the use of
remote servers for a personal needs
right and rather than using the our own
computers or rather than buying servers
of our own, I just want to rent a server
on a cloud and I will pay them
accordingly to the time that I have used
and the prices are as low as the figure
that I just told you right. So this is
what cloud computing is guys. Now you
would wonder, how it actually came into
the picture right. So let's go ahead and
understand that. Alright guys, so let's
take an example to understand this.
Imagine you're a developer and you
created your first app which you think
is going to be a hit right, so how do you
make this app available to the world
right or how do you make this app or
website available to the world. So what
you do, you buy some servers and you
put that application over there right
and just putting your application on the
servers will not do it, you'll have to
connect it to the Internet and once you
connect it to the Internet that is when
people start to come on your application,
come on a website and start to use it
alright. So this is how typically
work used to be done. Now I want to take
a focus onto certain things that I just
said when I was explaining you this example,
first of all, I will have to buy these
servers right and guys servers are not
cheap they are very expensive and buying
a stack of servers will already cost you
a lot of money and you're not even sure
whether your app will be a hit or not
right, you've just created your app and
you want to try it out and you put it on
some servers and because you know you want
to make it production-grade obviously
we'll have to buy a stack of servers
which is going to cost you a lot right.
Second thing is, you will have to
configure everything manually. If these
servers have to be connected to the
Internet, you will have to do the
connections you know to this servers
manually, you will have to set up a
static IP address so you'll have to
contact your ISP and say that you know I
need a static IP address for my servers
so that people can just go to one
particular address and they can visit it.
After that, you again have to buy a
domain, let's say if you go to
Intellipaat.com you see the website right.
So what is happening, Intellipaat.com in
the backend, the domain is getting
converted into an IP address by a DNS
server and then that IP address is
basically pointing to these servers
right. So you will have to buy a domain,
you will have to point that domain to
these servers and that's how it used to
work right and obviously if you have
these servers, you'll have to hire a team
also who's gonna manage these servers in
case there the number of users increase,
you'll have to increase the number of
servers etc. etc., there are a lot of
things that you'll have to do and
because of these things, there were some
problems and because we wanted to
overcome these problems, we use cloud
computing right. Now, like I said,
you were using this kind of an
architecture before, now let's see if we
don't use this kind of an architecture
and I just use cloud computing what is
going to be the difference. The
difference will be that I created my
application.
Next thing is, I'll go to AWS I'll launch
a stack of service, I'll put my
application over there.
AWS automatically gives me a static IP
address. It has a service to basically
give me a domain name as well. I would
just configure my domain name to connect
to this IP address and I'm done right.
It's so much easy that I don't have to
hire a team to manage my service because
AWS says whatever servers you want to
launch,
I'm gonna handle it for you. Not AWS,
it's, in fact, any cloud
provider for that matter, all the servers
are managed by them, all the hardware upgradations are managed by them everything
is managed by the cloud provider and
that is like cloud computing model
itself is such a big hit right. So what
are the advantages, so first thing is
that there is little or no investment. So
I don't have to buy a stack of servers
to get my application up and ready I can
just rent them right and the cost is
minimal for launching the stack of
servers and basically getting them up
and ready right. I don't have to invest
much even though I'm starting fresh I've
just launched my application,
I don't need seed money for setting up
for infrastructure, which is going to
be huge for the whole world to see right.
The whole world can access your
application but you don't have to worry
about it because AWS is backing you up
right. So there is little or no
investment. Second thing is, more focus on
app development. So you can focus more on
app development than worrying about
whether my infrastructure is fine or not.
How is the traffic coming on to my app.
Is my infrastructure scalable enough
that it can handle all the traffic which
is coming on to it. Everything is managed
by AWS once you configure it correctly
right. Third thing is, it requires less
workforce. So like I said if you are
buying your own servers, you obviously
have to have a team which is going to
manage your servers for you right. Any
hardware upgradation, any security
patch that you have to do, all of that is
done by a team correct. But if you are
launching your infrastructure or if
you're creating your infrastructure on
any cloud provider, the cloud providers
headache is to manage the servers. It's
their headache to do these security
patches. It's their headache to improve
or upgrade the hardware once you know
the processors becomes slow. So all of
that is managed by your cloud provider
and all you will do is focus on your app,
focus on your business goals and then
succeed towards the goal that you have
right. So this is an advantage that you
get when you use cloud computing and
that is why most of the companies today,
so I guess only the companies who
started out earlier that it before cloud
computing came into the picture are
still working on their own servers,
hosting their own applications but companies
who are very young who have just started
out for example startups particularly
they prefer cloud computing or they
prefer their servers to be on the cloud
because obviously when you are starting
off with a new company you have very
limited amount of money that you can
invest in things right. So it's always a
good idea to invest on the things which
are required and rest you know, if it
works in a certain way that they are not
costing you much it works that way right.
So for startups especially cloud
computing is a huge thing, it's a
huge bonus and that is why you can see a
lot of new business ideas are coming in,
a lot of new people are trying out their
own app or their own websites to provide
a particular service reason being the
major part of starting up a business was
setting up the infrastructure that is
handled by cloud computing these days
right. And in a way, you can see more and more
young companies are coming up and they
are trying out an app if they fail you
know, there was little investment
involved in it so it doesn't matter and
that is what is encouraging the young
entrepreneurs of this age. So guys these
are the advantages of cloud computing.
Moving forward now because cloud
computing is so huge, there are a lot of
products which are available in cloud
these days right and you won't even know
whether they exist in cloud or not. For
example, Netflix is the biggest example
that everyone is probably using every
day in their life.
The popular service Netflix which is a
movie streaming service, its entire
infrastructure is on AWS. Everything from
A to Z, there scaling part, there content
delivery network, the networking part the
security part, everything is handled by a
AWS. Now don't worry guys, if you
don't understand the jargons that are
just used like content delivery network,
security, everything I'll explain in this
video. For now, I just want to tell you
guys that because of the advantages that
cloud computing has to offer and because
of the kind of services that you get
from cloud, companies such big such as
Netflix, Air BNB, Amazon itself are
relying on the infrastructure of the
cloud providers so that they never go
down. Now how did it come
to these companies minds, to you know
switch to cloud. So I give you a very
small example, Netflix suffered a huge
blackout on the internet I think in
somewhere around 2008 or 2009 where in
all the services were down, you know why
because the more more number of users
came up to use the service and that's
when the servers crashed right. The whole
application went down and it caused a
huge loss to the Netflix company itself
right and that is when they decided, dude
I cannot manage all my servers,
I can either do the app development or I
can manage the servers there's only one
thing that I can do.
So then Netflix started to migrate
itself on the AWS infrastructure which
is highly scalable, which is highly
available right and now seldom do you
see that you know Netflix services down.
In my experience, I've never seen Netflix
down since I've been using it in front
of past two-three years, I've never seen
Netflix down or I have never seen an
error that you know this server is out
or there's a problem with the
infrastructure, I've never seen that
right and that is because of the high
availability that is provided by the
cloud providers these days. Netflix is
just one example, other businesses that
we are all aware of is the Amazon
ecommerce website right. The Amazon
ecommerce website is also hosted on the
AWS infrastructure right. Now a company,
an e-commerce website whose bread and
butter comes from a website from online,
being online right. Imagine, they are
relying on the AWS infrastructure that
all of you guys also have, you know
access to right. So imagine yourself you
are sharing the same infrastructure
which the biggest e-commerce company in
the world is using, so you can be rest
assured that your application is in safe
hands
right. Another great example of cloud
computing is Google Drive. So Google
Drive is a cloud product. The Google
Documents, the Google Drive where you can
upload all your files and folders that
are all hosted on the Google cloud right.
And that is again a fantastic cloud
product. Then we have Air BNB which is
actually a website which is hosted on
AWS and it's fully hosted on AWS for all
its functionality, scalabilities and
availability.
Prime video which is video streaming
service for Amazon that is also hosted
on AWS and the funny thing is Netflix
which is its biggest competitor is also
hosted on the same infrastructure as
Amazon Prime video right, awesome isn't
it. So these were all the products that
you see in a day to day life that are
actually cloud products and you won't
even know whether they were on cloud or
not so now you know. Moving further guys,
now let's talk about the cloud computing
modules. What are the different kind of
models there in cloud that are there
in cloud computing and what are models
exactly. So guys, cloud computing is
basically divided into two kind of
models, the first model is the deployment
model and the second model is the
service model. So how do we get these two
categories, the way you can deploy on
cloud has three ways to it and the way
you can access services on cloud has a
game three ways to it right. So one is
about putting your application out there,
so if you're putting your application
out there, you have three options either
to use public cloud, private cloud or
hybrid cloud. If you're using the service
from cloud, you again have three options
which is Infrastructure as a Service,
Platform as a Service, Software as a
Service. Let's understand all these
things one by one, don't get carried away
with all the big words used here, we'll
understand each and everything one by
one and then as you move along if you
have any questions you can put it right.
So far, I have not got any
questions, I guess everything is crystal
clear to everyone. So moving forward in
the next slide, I'm going to start with
the deployment model, so if you have any
questions now is the time guys you can
ask me all out and I'll be happy to
answer it for you. Alright, so Shambhavi
has a question and she says that Netflix
is using AWS so that means all the
videos that we see are also hosted on
AWS. Yes Shambhavi, all the videos that you
see, the software itself, the website
exists on AWS, okay so she has one more
question. But when I install the Netflix
app, it's available on my mobile how is
that on cloud.
Okay, so Shambhavi, there are two sides to it.
Netflix application, it's basically a
client application. The videos that you
get they don't exist on your phone,
they're actually streamed from the
Internet
right. So your Netflix application is
just a client application but it
interacts with the AWS servers on which
the Netflix servers have been deployed.
All the videos that you see there's a
service called Amazon S3, all those
videos they exist over there, they are
stored over there and they are basically
provided to you using a Content Delivery
Network which is basically nothing but a
caching system that is, I'll give you a very
simple example that if you, if you are
residing let's say in India and you are
watching let's say a US television show,
so obviously that US television show is
would be existing on these servers of
the Netflix US right. But if you are
viewing in India, it doesn't make sense
to stream all the way from US your video
right. So the server has to be connected
through the internet from the US to
the Indian client app which is existing
on your phone that's a long way 
right and that that's when the concept
of latency comes in where in you know
how does an application respond to your
queries also depends on how far is the
server from your application right. So
this is a service called Content
Delivery Network which basically what it
does is, it caches all the videos that
you have to see or you're watching on to
an Indian server if you are in India
right and that's when you know a server
which is nearer to you has all the
content which exists on the US server
and this is all on demand right. So this
is how, this is just very simple, a very
small thing that Netflix does to improve
its service using the AWS infrastructure
and this concept that I just told
you is Content Delivery Network, don't
worry if you don't understand what I
just told you as we move along I'm gonna
explain this in detail alright. Any
more questions guys, alright so
everybody is giving me a go, alright
guys so if everything is crystal clear
let's go ahead and discuss the models
one by one. So the first model that we're
gonna discuss is the deployment model. So
what is a deployment models? So guys
deployment models are nothing but the
various ways using which we can deploy
our application alright. Now there are
various ways, let's look at those ways
one by one. So the first
way of deploying your application on the
cloud infrastructure is called Public
cloud. Now, what is public cloud? Public
clouds are these servers which are
offered by your cloud provider in which
each server can have multiple companies
hosting their application alright. It
could be your Netflix and it could be
that your you know its competitor
that is prime video. If you have offered
for public cloud, your application would
share the same server as some other
application it could be prime video as
well right. So, but why is there a
segregation? Although there is no problem
when there are multiple application on
the same server but what happens is some
companies are still skeptic, some
companies have data policies that they
say that you know we have confidential
data and we cannot take any risk where
you know some other company is also on
our server and there's a risk of our
data being hacked into right. So that's
why because of these data policies, there
were different deployment models that
were created. So like I said, public cloud
is when you know the data that you're
providing to the cloud is not that
sensitive, is not that confidential and
hence you are okay when you know AWS
tells you although there will be no
problem when a separate application is
also deployed on the same server, there
will be no harm to your data and they
say like okay anyways we don't have any
data policies like that right. So public
cloud is when you are using all the
cloud computings or the cloud providers
servers and you allow them to host more
applications on the same server you are
ok with that far, alright so that is
public cloud. Next is private cloud. What is
Private cloud? Private cloud can be two
things, the first thing is like I said if
you want a separate server all for
yourself where you say no matter how
much space is empty, no matter how much
of the server is free, I don't want any
other company's data on my server. I want my data to be isolated. I want it to
be isolated on this particular server
that you have in your infrastructure, so
that becomes a private cloud. The second
way of creating a private cloud is you
buy your own servers and you create your
own cloud in your data center right,
that is you buy all the stack of servers required
and you host your application as if
you're hosting on a cloud provider, it's
just that it's your own cloud that you
have created right. You have bought
your own servers and you're putting your
data on your own server, so that is
private cloud. Okay, so the third thing is
Hybrid cloud. Now, what is Hybrid cloud
guys? When you want to have a kind of
infrastructure wherein you are using some
of the public cloud and some of the
servers from the private cloud in that
case it becomes a hybrid cloud. So let me
give you an example let's say there is a
research company so that research
company the marketing website for that
research company exists on the public
cloud but on that marketing website also
people have the access to login and when
they log in they can see their research
materials that they're working on ok but
this research material it does not exist
on the server of the public cloud it
exists on some of our other server which
is private cloud so from a user's
perspective I'll say that it seems that
everything is on the same website but
actually the infrastructure is like this
that the private cloud is or your
sensitive or your research files are
basically on some other server or let's
say the private cloud right and the
website that you're hosting which
doesn't have that much of confidential
data is actually hosted on the public
cloud right so this is a fine example of
how a hybrid kind of architecture is
created one more example that can that I
can think on top of my head is that
let's say there's a company we're in
it's it's been there since the past 15
years right so they have some legacy
systems that they don't want to touch
which they have bought and on which the
application is working but what they
have decided now is that any of the
servers that we are going to launch from
now on any of the new applications that
we are going to launch from now on we
are going to launch it on a cloud
provider server right so in that case
what happens is these servers which were
there in your data center they they have
to be on the same network as the cloud
providers servers right that is a public
cloud and hence
that also that kind of a mixture that
kind of a arrangement again becomes a
hybrid cloud so guys these are all the
cases you know where in you can or these
are all the ways you can deploy your
application on cloud so first we
discussed public cloud which was
basically when the servers they are
basically they can be shared between
multiple clients of the cloud provider
right and basically those servers are
owned by the cloud Rider second is
private cloud wherein there are two
cases the first case could be that you
own or you ask your cloud provider to
give you a separate server stack where
no other data will be available only
your data will be available that is one
kind of private cloud second kind of
private cloud is when you buy your own
servers and you set up a datacenter and
that becomes your own private cloud that
is also a way of creating a private
cloud or using a private cloud third
kind of deployment is a hybrid
deployment wherein you use some servers
from the public cloud and you use some
servers from the private cloud and hence
it's called hybrid all right so guys any
doubt and whatever you've discussed so
far if yes please comment in the chat
box or put your question in the chat box
and I'll be happy to answer it for you
any doubts guys if there are no doubts
we'll move forward but if any doubts now
it's time that you can mention it and
I'll clear it for you all right so
Shubham is saying can you explain
private cloud once more sure Shaboom so
private cloud is nothing but using using
a server which is not shared by anyone
else right so how does AWS work or how
does any cloud provider work for that
matter they buy a very big machine or
very big server with a lot of RAM and
with a lot of processing power right and
what they do is they launch multiple
instances of virtual machines on it
right so it could be that you know you
imagine your laptop you can probably if
it's a i3 or it's a high five with
around 8 GB of RAM you can launch around
3 operating systems on the same server
at the same time using a virtual machine
right you can do that now similarly what
cloud providers do is they have
they buy stock of servers and whether do
is they launched multiple machine
virtual machines on that so right and
those virtual machines are all owned by
people who basically launch it through
the AWS console of the azure console the
GCP console right they launch it from
there now when your application or when
your when your instance is up and ready
it is actually a part or it's actually a
virtual machine which is a part of a
server but it could be that that same
server is hosting seven or eight more
virtual machines which are owned by
other people who have created their as
your GCP accounts okay so if that is the
case then there are some companies like
let's take the example of government
agencies you know secret government
secret agencies which are intelligence
agencies like CIA or in CIA in us like
homeland Department in u.s. all all of
them they have very confidential data
which have to be accessed by their
internal employees in respect to the
fact where they are sitting in the where
they are sitting in in what part of the
world they're sitting right now in those
kind of cases what happens is although
they can buy their own servers they can
set up everything by themselves also but
then like I said they'll have to hire a
team also that'll manage the servers
so what cloud providers do is they give
you an option of having your own server
stack which is isolated from the rest of
the infrastructure of your cloud
provider right that server stack is
exclusively for you it will be a little
higher the price will be a little higher
but it'll again be an up pay-as-you-go
model that as you can say that for how
much ever time you'll be using it for
that much time only you'll have to pay
the cloud provider so that is what
private cloud that you get a separate
isolated server for yourself on which
you will be working you will be putting
your applications on it right and those
applications will nowhere be connected
to or no will nowhere will be sharing
the infrastructure which the other
clients of that cloud provide are using
so that is private cloud
other way of saying what a private cloud
is that you buy your own servers and you
set up in a datacenter right so although
in that case you're not getting the
benefits of cloud computing but yes that
also is called a private cloud because
you buy the same kind of infrastructure
you buy the same kind of infrastructure
at scale at the same scale that a cloud
provider does you buy it at the same
scale right when I say scale in the same
quantity
you set up a datacenter according to it
and it becomes your own private mini
cloud right that is also water private
cloud so all right I guess you boom now
you're clear with the doubt
all right thanks ohm so others if there
is any doubt in whatever you explain so
far please let me know I'll clear it out
and if not I will move forward to our
next topic all right so everybody is
giving me a go guys so great let's move
on to a next topic which are service
model so we have discussed deployment
models that is how what are the various
ways in which I can deploy my
application on a cloud provider now
let's discuss the various kind of
services that I can get from a cloud
provider ok
so let's discuss that so what has
service models now where there are three
kind of service models that we get in
cloud computing the first one is
infrastructure as a service now what is
infrastructure service basically the
cloud provider will give you an access
to the server that is you will get an
access to the operating system of the
server and you can install anything you
want on that server and that will become
it can either become a database server
it can become a website server you know
it can become anything
so basically when we say infrastructure
as a service you're getting the whole
infrastructure you're getting the whole
system is getting the whole virtual
machine as a service delivered to you
all right so that is infrastructure as a
service second is platform as a service
so in contrary to what we got in
infrastructure as a service we're in I
got a machine that I could use in
platform as a service I do not get the
access to the operating system okay what
I do it and access to is kind of like a
dashboard where in in that dashboard I
can upload any files
that I want and those files would
automatically be put on the server by
AWS and I can see those files hosted on
this over if it's confusing let me give
you an example let's say if I want to
set up a website and what I get is
infrastructure as a service so in that
case what I have to do is I get a fresh
operating system on that operating
system I'll have to install a web
hosting software like Apache or ROM cat
or anything once I have installed it I
will have to do an FTP or I will have to
transfer my files from a local computer
on that AWS server using FTP once I've
done that I have to put those files in a
specific folder on that particular
server and only then I will be able to
access it when I go to the IP address of
that particular server this is the case
of infrastructure service where I have
done everything that I had to do right
in case of platform-as-a-service what
happens is that I will not get the
access to the operating system all the
software's all the settings that are
required to be done is done by AWS what
I do get an access to is a dashboard
where and I have a button called upload
I click on that upload button and what
it will do is it will upload my website
automatically it will directly upload it
to the location where it has to be it
will give it give it the required
permission so that my website is hosted
so as a user I don't have to get into
the nitty gritties of what kind of
software has to be installed what
version of software has to be there
everything is managed by AWS
I just upload my website and my website
gets up and ready or a particular IP
address okay so this is platform as a
service it's a basically an automated
version of infrastructure as a service
when you get specific access on the
server that you can just upload your
files there is nothing else that you can
control on that so that is
platform-as-a-service the third kind of
service that you get is software as a
service right what happens in software
services that in contrary to what do you
want in infrastructure service I didn't
I did not get access to the server or
where I got access to the operating
system of the server I could install
anything I could make that server
anything right second thing was platform
a service where I go to dashboard where
I can still a program
and those files would be hosted for me
rest everything else should be managed
by a lab Louis or the cloud provider on
which I'm taking this service from third
kind of services software as a service
now what is software service you do not
get access to our dashboard where you
can upload your file so you do not get
access to the server where you can do
whatever you want on the operating
system what you do get is a soft food
which has already been hosted on the
cloud and that software you can use the
straightaway example for this would be
Netflix and Netflix is a software
correct it doesn't matter which server
it is owned it doesn't matter whether
you can upload your files you know it
but you can use the software which is
hosted on the cloud that is software as
a service software has been provided to
you by the cloud provider to use as a
service and that services a
pay-as-you-go service where and you have
to do a monthly subscription okay
another example for this could be the
Google Docs that you use you use Google
Excel or you use Google a word right all
of those are software's which are hosted
on the cloud provider and you can use
those often it doesn't matter which
server it exists on it doesn't matter
what kind of inso phase and install on
that server I just have one software
that I can use and it has been hosted on
the cloud so that is
software-as-a-service all right so this
is all about the different cloud models
which exist which are offered to the
customers right moving forward now let's
talk about cloud providers now whatever
you discussed so far is in general or is
general to cloud computing right now
these kind of models are these business
models that we just discussed have been
adopted by various companies which are
out there right so companies like AWS is
there this is this is the most prominent
one second is Microsoft Azure and then
you have Google Cloud and there are a
hundred plus most of more companies
which give you the same kind of services
like another famous cloud provider which
comes on the top of my mind it is
digital ocean which is there right which
offers the same services just that the
jargons that it uses for giving you that
service is different the terminologies
would be different but at the backend
it's doing exactly the same thing right
so digital ocean is there
is there Telemark is there IBM cloud is
there a lot of cloud providers but why
are we or why I just showed you these
three clowns provider because these are
the three top cloud providers in the
industry right now which give the cloud
services okay I'll say 90% of the whole
cloud paradigm is actually covered by
just these thick cloud providers that is
people if there are hundred people who
are using the cloud computing in the
world out of them 90 people would be
using a service among these three only
okay now today in this session we are
talking just about AWS but why we only
talk about AWS why we not talking about
the others let me walk you through the
points so there's the number one reason
for a double is being so popular is that
it covers 35% of the market share that
is using the cloud computing platform
these years that means that if there are
hundred people who use cloud computing
computing or if there are hundred
companies which use cloud computing out
of them thirty five companies would be
using AWS right so that's what the
thirty five percent market share means
second reason is that AWS was way back
in Septon in 2006 and since 2006 I think
it's been 13 years so since 13 years AWS
has been running the cloud computing
business and when a double has launched
its cloud computing business I guess it
was the first and foremost cloud
provider which went into the cloud
computing domain and thought okay I can
run a business on it I guess back then
there was no company which was providing
the cloud computing services except AWS
and that is the reason you know AWS has
such a huge market share which is 35
percent if you compare it with Azure and
Google Cloud Azure is at 13% 1/3 and
Google Cloud is at 6.5 percent right so
as all is a number two cloud provider in
the world and Google Cloud is at number
three so you can just judge by the
distance between this 13% and 35% that
how huge AWS is right and Microsoft
Azure has to do a lot of catching up to
basically beat AWS right now
and the point that I'm trying to make
here is that the reason for that gap is
because AWS was launched way back in
2006 and as your was I guess launched in
2012 followed by Google Cloud in 2013
right so that is the reason most of the
companies were already on AWS when
Google Cloud and Microsoft Azure came
into the picture all right
so Microsoft Azure has 13 person Google
Cloud has 6.5% AWS was launched in 2006
and that is the reason AWS has a more
mature model of infrastructure now why
is that because any company or any
product that you launch it always has so
many of the first time when it's
launched it always has a lot of bugs to
it and it's as and when the companies or
your clients start to use it you get to
know okay so this is also a problem this
is a problem this is a problem that you
have two souls right and when you solve
it your product becomes more mature it
becomes more reliable and since it's
been 13 years now that Amazon has been
in the game it has matured a lot and
when we compare it with Google cloud or
Microsoft assumes they still have a long
way to go already or although they have
launched pretty good products but they
still are no match to what AWS has in
terms of reliability and that is the
first and foremost reasons companies
also have you know the stick to AWS as
their first choice because most of the
companies that they see like we
discussed we there has Netflix there is
Airbnb the Amazon ecommerce company then
you have Prime with you all of them are
an enable us and they're doing well
right none of them has experienced any
down time being on the AWS platform so
any company who's trying to launch their
product into the market they also stick
to AWS reason being it's so reliable
third reason that why we are learning a
revolutionary buy you guys are learning
a double yesterday is because of the job
opportunities so because it has a
greater market share because there are
more companies who are using AWS
obviously the job opportunities for AWS
are also more right when you compare it
with its counterparts that is Google
cloud and Microsoft Azure so like I said
if there are hundred companies and how
do those hundred companies of 35
companies are using
Louis that means 35 companies you can
apply on to become a Solutions Architect
to become an awl a per to become an EWS
administrator cloud engineer or anything
right so it's always better if you want
to get into the cloud domain to first
get to know the major player right and
then obviously you can also learn
Microsoft Azure once you have understood
EWS it's very easy to actually
understand the other cloud platforms
like Microsoft Azure and Google cloud
because they're almost the same all of
them are basically giving the same
services just as the Germans or the
terminologies that they use are little
different all right
having said that guys let's move on and
now that we have known that you know why
AWS is so successful we understand that
why are we learning a SS today let me
introduce you to what aww aces
so there's AWS is basically a subsidiary
of amazon.com which is basically the
largest e-commerce company in the world
right so the way a tableau has came up
in the market was that Amazon the
largest e-commerce company was building
the infrastructure for its website right
and they've designed an infrastructure
which was highly scalable highly
available it can auto scale itself it
can you know down scale itself so all of
these things were part of their
architecture of the Amazon Web site now
when they created an infrastructure like
this they thought why are we only using
it for our website why don't we make it
available to the general public and they
can use it as long as they want in a
pay-as-you-go model and that's how the
cloud computing model or the cloud
computing business came I came into the
picture right so the same infrastructure
that it was using for its website
it got or it made it introduced to the
world to say like I am hosting a website
or a muse I'm hosting my Amazon
ecommerce website on this infrastructure
if you also want your application to be
as successful as reliable as available
as my website you can use the same
infrastructure and you know what you
just have to pay for the time that you
used it and it causes as low as point
zero zero zero five dollars isn't that
amazing so that's how AWS came into the
picture right and now today it offers
services and compute at officers in
storage networking
management security and many more that
we're going to
as we move along alright so this is the
AWS story guys we understand now that
what is cloud computing it we understand
now that the different kind of models
that cloud follows all of those things
are followed by all cloud providers AWS
is one of those cloud providers and I
told you the back story of it how it was
launched how it was in separate and
since it's the first player which came
in the market it's very matured in terms
of its services I think they have
covered all their edge cases as to how
our application can actually not be of
use to a particular company or can fail
and they've covered all that so you can
be less assured that if you are in
deploying an application onto AWS it is
in safe hands alright moving forward
lines now let's talk about the thing
that we are here to learn for let's talk
about the AWS services let's see what
kind of domains does AWS gives its
service into so AWS provides its
services in compute it gives in storage
database security management customer
engagement app integration etc so we're
gonna will discuss each one of them one
by one as we move along so first up the
compute domain or the AWS domain is
compute alright so I think I have a
question from Shaboom
so Shah is asking me among these domains
what is the difference between storage
and database
electrum so storage is basically used
when you you have a workload wherein you
want to upload binary files like what
are binary files files which like like
video files or mp3 files or photo files
all these files are called binary files
because they're not data it's basically
you know it's content and that content
is basically binary in nature alright so
all your videos all your music right any
kind of file which you execute your
games all of those are binary files when
you compare it with database database
usually deals with databases textual in
nature and has a proper structure it
could be unstructured as well but
basically textual data that a human can
read is included inside a database right
but on the other hand files that
non-computer for example any program or
any video file any music file or any
other file in that case these kind of
things can not or should be stored on
storage a kind of platform it should not
be stored on a database it can be but it
should not be because it unnecessarily
makes the database the the size of the
database big which actually causes a
problem many Aquarion through the data
when you are using a database alright so
guys this is the difference between
story in the mesh room is your doubt
clear about all the difference between
stories and database alright so i'm
corey yes from sure are those guys if
you have any doubts in these domains you
can ask me let me explain you all these
domains one by one so compute domain
basically deals with souls so if you
have if you need servers or if there is
a workload which needs processing the
compute domain will have services that
you can launch and implement that
workload more on this we will discuss as
we move along alright then you have the
storage domain which like I said is DS
with storing binary files on the remote
servers so for that we have a dedicated
services and we will not discuss those
dedicated services in storage then we
have a service called database sorry a
domain called database in the database
domain you have lost services so if you
have structured data you have one kind
of database for that or we have one kind
of database service for that if you have
unstructured data you have another
database service for we will discuss
more on that as we move along then there
is a domain called security so all
security related to the application that
you have uploaded to the servers that
you are using to the account that you
are using for all those kind of things
would be included in security so there
are specific services for each kind of
workload that I just mentioned we're
going to discuss that when we reach the
security domain then we have the
management domain which will include
monitoring which would include deploying
the whole architecture at once right all
those kind of services comes in
management don't worry if you don't
understand it I'll explain you more as
we move along
that domain then we have customer
engagement so sending email sending
notifications all those kind of services
comes under customer engagement and in
the end we have app integration so
services like use like for example if
you have an application on which you
have to give a lot of jobs it's better
to have a queue where you will store all
your jobs and that queue is separate
from the server which will be executing
your jobs right so these kind of
integrations are called app integrations
and we will be discussing the services
in that domain as we move along all
right so guys these are the domains the
main domains that are there in aw there
are a lot of other domains as well but
we'll be focusing more on these domains
since you know this is what is actually
going to be asked for in your solutions
architect exam and at the same time
these are what you will generally be
using when you become NE WS engineer all
right all right so moving forward guys
now let's start with the compute domain
and let's see what all services are
there in the computer main alright guys
so let's discuss the a doubler services
in the compute domain so here are the
set of services which are included in
the compute domain of AWS so this
particular service is ec2 elastic
beanstalk lambda or scaling AWS load
balancer SS e CR and AWS CCS now for the
sake of explaining you guys I have taken
the liberty of shifting some services
from some other domains which I think
should fit in this domain right but you
don't have to worry the explanation
would be the same it's just that you
would find it somewhere else in the AWS
management console like for example auto
scaling would not be under by the
compute domain it would be under some
other domain I'll show you when we move
on to the AWS management console as to
where you can find each and every
service for now guys let's start with
the first service which is AWS ec2 and
let's see what is it all about
so there's Elastic Compute cloud is
nothing but a server it's a raw server
it's just like a fresh computer that AWS
gives to you so what you basically do is
you ask AWS for
server right and that server service is
called easy do so what you wanna do is
you specify the kind of processor that
you want you specify the kind of RAM
that you want and then you click on
launch and what happens after that is
you get a server which is basically of
that exact configuration now what do you
do you will have to connect to it
remotely so if it's a Linux machine you
will connect through SSH if it's a
Windows machine you'll connect through
RDP right and once you connect to it
it'll give you the UI of how an
operating system actually is if you
installed it on your local it'll be
exactly the same it's just that now it
has been in basically launched on the
infrastructure of AWS and that can be
accessed using various tools like the
RDP tools or resistors tools I'm gonna
discuss more about easy to I'm gonna
basically launch any zero instance in a
moment but before that let's discuss all
the services which are then compute and
then we do that
ec2 demo as well right so there is an
elastic cloud compute like I said it's
just like a row so that is given to you
and on this raw silver you can install
anything you can make it anything you
can basically build it up make it a web
server you can make it a database server
it can be anything right that is what
ec2 is all about now in the diagram as
you can see you can launch either a
single ec2 instance or you can launch
multiple ec2 instances you also have an
option of launching of creating a ec2
instance and then installing some
software's on it and then you can launch
multiple copies of that particularly
through instance so that you don't have
to launch or you don't have to specify
or you don't have to install all the
software's all over again you can create
multiple copies of the ec2 instance
again right and at some point of time if
you feel you want to increase the
configuration of your system
you can also do that right let's say if
my Ram was a GB over here and then I
want to make it 16gb even that is
possible in ec2 and that is why the name
is Elastic Compute cloud elastic means
that you can increase the size of the
instance or decrease the size of the
instance configuration as n1 required
right so this is was about Elastic
Compute cloud or that is
see to write a next service is elastic
beanstalk now elastic beanstalk guides
is an advanced version of ec2 how is it
an advanced version of easy to n easy to
do what you could do was you could just
launch a server right and then he can
install software's on it you can make it
a database server you can make it a web
applicable a stick Beanstalk you get
certain restrictions on ec2 and there is
a certain amount of automation involved
so what is elastic Beanstalk exactly
elastic Beanstalk basically is a web
application server right you cannot
install any other software on it it is a
web application server on which you can
upload your website and you don't have
to install any software you don't have
to do anything like I said we talked
about what is infrastructure as a seven
what is platform as a service right so
infrastructure as a services ec2 okay
where you get the whole server you get
the access to the operating system etc
elastic Beanstalk is platform as a
service so in this what you get is a
dashboard you don't acts and get access
to the operating system you don't get
access to the software's that you have
to install on that server right
everything is pre-configured all you do
is you say that I need a PHP server
it'll launch a PHP server and you'll
give you a dashboard where you'll have a
upload kind for button you click on that
upload button and you'll have to put or
upload your website over there so once
your uploaded your website files they
automatically go into the path where
they have to go and all you have to now
do is just go to that IP address or the
domain name of that particular elastic
Beanstalk instance and you will be able
to access your website if you compare it
with what if the same thing you have to
do an easy do you'll have to first
install the softwares then you'll have
to upload the file using FTP because
there's no dashboard to upload it so
you'll have to download an FTP client
connect to the instance upload your
files like that in that particular
folder and then if you go onto the IP
address of the easy to do only then
you'll be able to access the website
with elastic Beanstalk what they did was
like if you have a use case where you
have to deploy a web application you
don't have to do all that manual stuff
of installing the software of installing
or or putting your files on the server
all
have to do is you have to open elastic
beanstalk select the environment that
you want to deploy and upload your
website over there that's it
right so it's an automated version of
ec2 in which you have certain
functionalities of putting a website
over there but there is a limitation
that only it can be a application web
application server right it cannot be a
back-end server for you elastic
Beanstalk is only used to deploy your
websites let's remember that because the
next service of files is a little
different from elastic Beanstalk right
and it also has some limitations a next
service is AWS lambda now a SS lambda
again guys is an automated version of
GCC - it's an advanced version of ec2
but with some restrictions now what are
those restrictions it cannot deploy an
application you cannot upload your
website on it and it cannot host
application for you what is a WM na aw
lambda is basically just used for doing
your back-end processing now what is
back-end processing you might wonder so
let me give you an example let's say you
have an image processing application so
what do you do you have a UI or you have
a website through which you can upload
image and what that website does is it
stores the image on its storage and then
it reduces the size of the image right
and then you can download it again now
you might be wondering this is one
website so ideally everything should be
happening on one server in this case but
that is not the case over here guys so
what happens is your web application is
on a separate server the processing
happens on a different server right and
AWS lambda specializes in processing now
why is a double is lambda preferred for
processing is because when you launch
the server wise you have to select the
configuration that you want right you
have to select the processor you have to
select the RAM with aw slam de you don't
have to specify any configuration you
don't have to choose what services
should be for my application to cater to
the workloads that are coming in aw slam
de and what it does is it sees what kind
of workload it is being given it
automatically scales up if it has to in
terms of its configuration and then X
suits on your workload and gives the
result to the server which is the web
application server where it has to
result gives the result on the website
so basically only processing happens on
AWS lambda only website deployment
happens on elastic Beanstalk right and
AWS give us these two wonderful services
so that we can create a distributed kind
of an architecture wherein you know
there is no fault if there's a Fault in
one server it's not like my whole
application will go down I have certain
redundancies in place I have distributed
my work among multiple computer nodes so
that even if one gets quality it's not
like my application will go down we will
discuss more on this as we move along
and we talk about auto scaling but guys
remember this a doubles lambda is only
used to run your background code AWS
elastic Beanstalk is only used to deploy
a web application easy to can be used
for anything it's your own private
computer you can install any software
make it a back-end server make it a web
application server make it a database
server for that matter do anything with
it
right that is not AWS easy to is now if
you see the diagram over here as you can
see that let's say there is an
e-commerce application right and that
e-commerce application there's a trigger
for basically buying something let's say
you order a package right so when you
order a package what happens on Amazon
that entry is made into the database so
that entry is stored let's say in dynamo
DB which is a kind of database in AWS
right now what happens now once the data
is stored in dynamo DB you want to do
some processing on the data and then go
ahead and store it somewhere else right
so once the data has been stored in
dynamo DB I mean the processing to be
done now the one way to do it is you do
everything on the same server where
basically let's say my package order
confirmation happen on the web
application right the web application
server triggered this prediction that I
have my package order is confirmed and
that's when it issued a command to store
the data in dynamo DB that is all done
by my web application server now I can
also this server itself can also do the
processing for dynamo DB and then store
it on
redshift warehouse let but you know the
process
takes a lot of time and that is the
reason I differentiate my processing on
a different server or I make my
processing do happen on a different
server so that there is no overhead on
my website so that my website is not
becoming slow irrespective of the fact
that what kind of workload is running in
the back end because that workloads
being managed my AWS lambda right so my
website can be up and running it will
always be available to all the users
irrespective of the fact how huge of
processing I have to do right so that
happens my a double standard one more
thing is one one cool thing about a
double is lambda is that whatever job
you give to AWS lambda it's not one
server which does the job aw lambda
takes a job execute sit in one server if
it gets one more job in the meanwhile
what it does is it launches the second
server on which that job will be
executed similarly if there is a third
job which is coming it will be executed
on a third AWS lambda so so that's how
it works right
and once the processing is done you know
it can also give the communication back
to the web application and that's how
you get the message that the operation
is done but what you don't understand is
how many computers or how many servers
are working in the backend right so now
you know so it'll sound a wrapping up
guys so a double is lambda is used for
executing your back-end code a double
elastic beanstalk is used to deploy a
web application an AWS ec2 is a robot
server which you can use to make that so
or anything right it could be a web
application it could be a back-end
server it could be little bit server etc
a next service guys is load balancing
now why is what is load balancing
basically and why do we need this kind
of a service nowadays I told you that
whenever we create a production grade
application we basically deal with
distributed computing right so when you
talk about distributed computing we also
talk have to talk about redundancies so
that my application is highly available
now what does that mean imagine these
three servers are your web application
servers now if you just had one imagine
you just had one in that case what will
happen if my there is any kind of fault
in this particular server my application
will go down right so what I do I launch
3
exact copies of that so
right and what happens in that case is
if this server goes down my user can
view my website on this server if both
these servers goes down my website can
be viewed on this particular server
right but now you might be wondering how
will the user know which server to go on
right and that is exactly what a elastic
load balancer is all about so elastic
load balancer what it gives you is it
will give you one domain to go on I'll
give you one IP address to hit on you
hit that IP address and elastic load
balancer will automatically analyze
where to send the requests so the Rasik
load balancer constantly keeps a check
on all the instances which are running
in your cloud environment and it sees
which of them are healthy in which
around them are unhealthy if there is a
server which becomes unhealthy what your
load balancer will do is it will stop
routing traffic to that particular
server right and it start routing server
to your traffic to other servers and
this is the main job of elastic load
balancer which is to distribute traffic
among all the healthy instances which
are out there right also one more
important thing over here is guys if if
all the three servers are functioning in
the healthy state and what will it do in
that case so it will distribute the data
equally among all the servers now you
might be wondering how will that help so
let's say I just have one cell over here
with around 16 GB of RAM and let's say
an i5 on an i7 processor right so it'll
be able to serve a limited mono users
let's say there are 10 people right so
who are there on the website let's say
the server will be able to serve 10
people now what happens if there are 20
people tomorrow in that case you always
have to plan ahead and you have to keep
more servers in your group so that or in
your architecture so that if there is
more traffic my requests can go in the
other servers so that the load is
actually decreased on the first server
right so what load balancer does is it
will never make one server max out on
its performance it will always
distribute the traffic equally among all
the servers so that the processing or
you know the overhead on any server does
not go
and my application should not become
slow right now you might be wondering
that how do I do it do it constantly
keep a check on how much traffic is
coming on the website and accordingly
deploy servers so that answer I will
give you in my next service which is a
SS auto-scaling
so what is redouble the sort of scaling
it automatically scales up the number of
servers based on how much traffic is
coming on to those servers now how does
it do that
you can set a certain threshold let's
say there are four instances which are
running on my architecture so what I can
teach auto scaling is that whenever the
collective CPU usage goes beyond 80
percent launch one more instance in the
group and the load balancer should now
route the traffic to the new instance as
well right so this is what auto scaling
is similarly when the CPU usage goes
collectively goes below 40 percent let's
say decrease the size of my fleet
decrease the size of my server fleet so
in that is one who is at the moment the
collective CPU usage goes below 40
percent it will decrease the number of
instances in your auto scaling group
right and that's how it works for is and
the auto scaling service cannot exist
alone it always has to work in
conjunction with AWS load balancer why
because if the size of the fleet is
increasing if the size of the fleet is
decreasing this should be an entity on
top of it which will distribute the
traffic equally among all the instances
right so if you are making use of auto
scaling you will always make use of AWS
load balancer on the other hand you can
just make use of AWS load balancer and
you might not want to use auto scaling
that is fine but if you are using auto
scaling you absolutely have to use a
load balancer for your traffic routing
all right so this is what or scaling is
guys and next service is elastic
container registry now what is the
elastic container registry for this guys
you have to know what docker is right so
if I have to give you a brief about what
docker is docker is basically a tool
using which you can launch up
rating systems in the minimum size
possible so the minimum container size
that I know of is 40 MB so what you can
do is let's say we were talking about
distributed computing right so in
distributed computing what happens is
each of your server plays a different
part in your application right so
similarly what we can do is we can
launch containers now what containers do
is they act as a virtual server right
but they take the minimum resources
possible they take minimum space
possible like I said 40 MB is the size
of a container which holds an operating
system right so in those containers you
can deploy applications okay and these
applications then run as if they were
running on a separate server they are
isolated from the operating system on
which the container is running I'm sorry
guys if I cannot go in depth of what
docker is right now because it's
altogether a separate topic but you can
understand it like this that it's
basically a mini virtual computer that
you can run in your system and ECR
service basically what it does is it
stores these containers in a repository
like you have github for storing code
you have ECR for storing your container
images right for example like I said
operating system 40 MB size the image
has to be stored somewhere so it will be
stored in easier now if you want to run
those images you have a service called
GCS so what easiest does is it runs any
docker image on the AWS infrastructure
right and it orchestrates is in a way so
that if there is anything wrong with
that container service that container
service can again be launched not don't
get confused guys with what we do in ec2
now you might have a question that I can
launch multiple ec2 instances inspite of
that why don't I launch just multiple
containers because in that case what
will happen is your still the machine on
which the containers are running that
becomes node point of failure that means
if there is anything wrong with that
machine any number of containers which
are running on your particular system
will go down right so this is also a
redundancy that you can make in your
architecture that you can also run
applications on containers which are
running on an auto scaling in
structure that is a machine on which
docker is running but if there are
processing or if the CPU gets an
overhead and the CPU processing
increases you can scale your machines
and you can scale your containers as
well right so if it's a little complex
for you guys you can just ignore this
service which is ECR Anish yes
it's only for those guys who understand
what docker is so guys ECR is nothing
but it's a repository on which you can
store container images and ECS is
nothing but a service to run your docker
containers if you don't know that is
what docker is I'll just give you guys a
link after this class it's basically a
video for introduction to docker it's a
half an hour 45 minutes video you go
through that and then again you can go
through this recording wherein you can
find a description for what easy are any
CSS and that'll make more sense to you
in that case alright so guys we have
discussed easier we have discussed CCS
alright guys so moving forward now let's
go ahead and do some hands-on I think
it's enough of theory for compute let's
go ahead and launch some compute
instances in AWS alright so what I'm
gonna do is let me first show you how
you can create your account on AWS for
so let me just jump on to my browser
alright guys so the first thing that you
would be doing is heading on to
aws.amazon.com ok so once you are on
this website you will see a big orange
button over here which says create an
AWS account right just click on that and
that will take you to the next screen
wherein you will have to fill out your
details so fill out all your details
over here right and once you have done
that let's say let us enter some pseudo
values so let's say it's ABC at inter
part.com password I can set anything
over here
similarly I'll set anything over here
AWS account name let's say it's in
telepath - right well click on continue
then it will ask you whether what is the
common type is it a professional account
or it is a personal account so we'll
select personal account because we are
just trying out AWS right you want to
use it for ourselves gifts on the MER
let's say I gave boot one two three four
five six seven eight
and the country or region you can select
any region that you are in your address
the city that you are in postal code so
let's say the city is Magne state let's
say it's cannot car and once everything
seems fine to you just click on click
create account and continue once you do
this you will reach this screen where
you will have to enter your debit card
number or credit card number right enter
everything over here and click on secure
submit once you've done that the next
page will ask you what kind of account
do you wanna grid is it a business
account or a standalone
account what what purpose will you use
this account for just it's all logical
you just know what you have to answer
just remember this you are creating a
personal accountant it's no way related
to a business select everything click on
finish and you will have a new AWS
account created for you now one awesome
thing about AWS guys is that it will
give you free Theor that is you can
launch instances free for one year right
and every account that you create on AWS
or when you sign up on AWS you will get
a one year free their account where you
can launch a certain ec2 instance for
free and that too for 750 hours a month
so 750 hours is actually 30 days and
that too for when you write so one year
of free instances you can launch so I
will show you guys how you can launch
instances as well but this is how you
can sign up for AWS so once you have
signed up for AWS guys next thing would
be to basically login right and for that
you'll have to once you go to
aws.amazon.com just click on AWS
management console and it will take you
to the sign in page ok so on the sign-in
page just enter the email address that
through which you want to connect one
second guys so this would be the email
address that I want to enter followed by
the password and this will make you sign
in into a deployer so this is a step
that you should reach once you have
completed your signup ok and now what I
want to do is I want to launch my
was server on AWS now how would I do
that so we have studied about the ec2
instance right so for launching the
easier instance here is domain or so the
domain that we went through was compute
right so in computer you have these many
services you have easy to ECR ECS then
you have lambda elastic beanstalk there
are other services well we have not
touched those services because they
would go beyond the scope of what we
intend to do in this session this
session is an overview for AWS foreign
AWS solutions architect right so the
services that we have picked up there
there are all the basic services that
you should know about and once you
understand all those services
understanding the rest of AWS would be a
cakewalk for you right so there are so
many services in AWS you have ground
station security ibadah fact you know if
you are into game development then you
have Amazon game lift but all these
services are basically confined to a
certain kind of work that you want to do
like I am NOT going to develop a game
right or are not in gaming where I'm
going dot into game development so this
service is not for me
similarly there are IOT services that
you have to know of but I will be not
every company would use IOT correct some
companies would use IOT and for you to
learn the IOT service it would be a
waste of time for you right and that is
why what we have done is we have picked
up some sources which are essential and
which most of the organizations will use
who are into IT and one their
application up in ready and we have just
selected those applications right or
those services also your AWS solutions
architect exam would be confined to only
these services that we are learning all
right now what we wanted to do was we
want to launch our first server and for
that there is a service called ec2 so
either you can find it under the domain
compute that is easy to overhear or you
also have an awesome option over here to
search for any kind of service let's say
I want to launch or I want to go to easy
to so I can just write easy to in the
search bar and I will get the respective
result over here let's click on that and
now this link would basically open your
ec2 dashboard right so from here you can
launch your first ec2 instance there are
lot of options on the left Kyle do not
worry about each of these
since these are options that we will be
studying about when we purposefully just
talk about ec2 service and that will be
in the further sessions that we want to
have for now just understand how to
launch any zero instance and for that
you just have to click on this blue
button which is here it says launch
instance just click on that once you
have clicked on launch instance you will
get an option to select the operating
system that you want to run in your soul
right so there are a lot of operating
systems to choose from you have the
Amazon Linux ami which is a custom Linux
that AWS has created then you have Red
Hat OS that you can run you have SUSE
Linux you have one two there are host of
operating system tearing around from
your windows as well right so you choose
whichever you want and always ensure you
choose an operating system which says
free clear eligible which would mean
that it will fall under the free thin it
will not be charged for you ok so let's
say I select Ubuntu so I'll click on
select and now it will ask me what is
the size of the server that you want how
much of CPUs do you want how much of
memory do you want so the only server so
there are a lot of options over here to
choose from
alright by the only server that is free
for you would be T 2 dot micro ok which
has 1 CPU and 1gb of RAM which is enough
for demo purposes when you want to try
out AWS okay so you would select T 2 dot
micro if you want to be under the free
tier and not be charged you just select
T 2 dot micro next you will click on
next and then it will ask you for all
the details that are over here do not
worry about anything just leave them
blank click on next next step would add
ask you for the hard drive storage how
much of hard drive storage do you want
so by default it's a GB when you're
launching a Linux instance so we leave
it at default if you want even change
this right then click on next are you
going to add tags over here what are
tags tags are nothing but metadata to
your instance right like for example I
can say the name I can add a tag that
the name of the instance is something
then the department to which this
instance belongs to is there so all
those values I can write over here and
those will serve as a metadata for the
instance so that when somebody is
searching for all these instances for
let's say the IT
Department they just have to type in
department equal to ITN to list all the
instances so for those kind of searches
you have tags click on next then it will
give you the option of configuring your
security group
what is the security group it's nothing
but a firewall it's very simple firewall
varies in this what you have to tell is
so basically the all these rules that
you can add over here these are all
inbound rules right so inbound means
what kind of connections are allowed on
this server so there's a SSH connection
which is allowed right so you can select
the protocol that you want to allow on
this server right so right now what has
been allowed is the SSH protocol so that
we can login to this server SSH means
that right if you select SSH it will
fill out all the details for protocol
and portering by itself now who do you
want the SSH protocol to be used by
right if you want it to be accessed by
anyone you can just give anywhere why is
this option helpful this option is
helpful when the IP address of your
computer is not fixed let's say you can
access this instance from office but you
also wanted to exit from home as well
right so if you want to access it from
home then you have to select anywhere if
your IP address is not changing you can
select my IP right let's say this is my
IP address right now and only I will be
allowed to connect to this instance
using the SSH protocol but it's the
general use case that everyone deals
with is that they want to log in from
anywhere right so I'll select anywhere
it fills the data by itself and now
finally I can just click on review now
so if you wanna delete a rule guys since
in this rule I did not define anything I
can just delete this from here and now
let me click on review and know okay so
now I can review all the settings that
I've done once I feel everything is
correct I'll just click on launch and
this is a very important step guys now
to log in to any server which is there
on the remote system imagine like if
somebody gets your IP address anybody
can access that server and they can make
any change that they want right but it's
obviously not like there's a security
layer that we add or which AWS has added
to the servers that it launches it gives
you a key pair right
what is a keeper a keeper is nothing but
it will give you a key that you will
have to use while you're connecting to
the instance okay so as you can see
there's no keeper right now so what I
can do is I can create a new key pair
let's name this key pair as let's say
test
- Intel apart let's say this is the name
correct I will click on download keep it
so until I unless I don't create a new
key pair it with this launch instance
button will not be active so this will
download a PEM file for you this is a
file which of the PEM extension right so
this will be used to connect to our
instance and finally when everything is
set let's click on launch instance so
now you can see your instances are now
being launched this is a message that
they are getting so I can just go to the
instance and see that ok so there is an
instance being in launch the instance
state is pending which means it's still
in the launch process I can give this
instance a name let's call it test ok
and now it's in the running State great
so now once you've selected test you can
refer to all the details of test in the
below panel so here is the IP address
which will be used to connect to it
right the instance type which is T 2 dot
micro the stage which is running right
then you have the security group so view
inbound rules you can see there's a SSH
rule that you have added over here right
and then the next step would be that
what are the key pair name for this
instance it's test in teleport so on and
so forth right now that you have
launched in since the next step is to
connect to it now when you want to
connect to this instance there's a
software called putting that even
download right so here is a software
that I've already downloaded if you want
to download this just search on Google
for download for it you will get this
link go to this link right now guys
there are two things that you have to
download one is you have to download
putty which you can use by clicking on
this link it will take you on this page
just select if your window is just
select put these 64-bit just click on it
and label be it'll basically download
the footie software for you the other
thing that you'll have to download is
put ijen right this is also required
I'll tell you why it is required so this
is basically put each in and the other
software that you need is putting ok so
once you have both the software's in
place and you have installed both the
software's next step would be do connect
to our instance so this software of mine
is footage n let me launch it for you
this is footage n guys the fam file that
you get guys if you have to use it with
putty the way you can use it is by
converting this PEM file first to PPK
because that is what you are putting
software would accept right so first
I'll have to load this file on my
petition so let us do that so I click on
load and then I'll select the PEM file
which is this let's say successfully
imported great now I want to save the
private key if I say the Prime Huber you
you it will ask you are you sure you
want to save this key without a
passphrase yes right and let's name this
private key something let's name it
let's say test so as you can see the
format now is being changed to PPK great
let's save the file the file has been
saved
next step is launch your putti software
right this is my putti software the
instance that I want to connect is this
this is the IP address that I am going
to connect to I'll mention it over here
then I'll go to SSH because I mentioned
the IP address in the session part now I
also have to put the key using which I
will connect right so for putting the
key you have to go into SSH then you
will be clicking on earth in Earth I
have to select the PPK file which I
created so this is the file test let's
select that and let's click on open so
now it will give you a message
that this service is not cached in the
repository just click on yes on this
message and now you will see the screen
which says login as right so now since I
was launching and one to instance what I
have to enter over here is Ubuntu I'll
hit enter and now it will verify the key
that I inserted and will be able to
connect to thee put T to the server that
I created on AWS using the key that I
put right and now I am logged in on mine
so now I can do anything over here I can
install any software that I want so this
is how you can connect to n easy to
instance which has launched a linux ami
or Linux OS ok for connecting to Windows
guys you do not get a PEM file you do
not get a PEM file what you basically
get is an RDP file
along with the password okay so you will
be given the password you will be given
the username you will be given a RDP
file so you select the IDP file and then
it will ask you for the password just
enter the password that was given to you
by the AWS management console you click
on connect and then you will be able to
launch your Windows instance so there
are only two types of OS that you can
launch on AWS one is lyrics second is
windows so I told you how to connect to
Linux instances
let me also walk you through how to
connect to a Windows machine alright
guys so now in order to launch a windows
instance again we'll just click on
launch instance let's select a Windows
OS which is free tier eligible let's
select this right t2 dot micro is
instance server on launch let's click on
next let's leave everything at default
let's click on next here you can see the
default size is 30 GB because in Windows
it takes a lot of space so it's 30 GB
over here let's click on next configure
the security group here you can see that
instead of SSH you have RDP right
because for Linux instance because it's
a command-line what you do is you
collect through its SSH but because
Windows is a GUI based OS you have to
connect through RDP all right so we'll
click on review and launch and now we
will select the same key pair which is
death and let's click on launch
instances so our instance is now
relaunch guys we can just go here and we
can see it's in the pending state all
right so let's name this instance as
Windows
all right and now in order to connect to
it this is the IP address that you get
now just click on actions so select the
machine that you have to connect with
once it's launched you'd be able to
click on actions and you'd be able to
click on connect so in the connect so
when you click on connect you will get
all the options of how to basically
connect to this particular server so
let's wait for this instance to be in
the running state and then let's review
okay so the instance is now in the
running state car is now let's click on
actions let's click on connect and this
is basically the way to connect to it
you can download the RDP file by
clicking over here so as you can see I
got the RDP file the user name is
administrator and if I click on get
password it says password not available
yet please date at least four minutes
after launching an instance okay so the
password will be available once the
instance is four minutes since lunch but
this is the way you get the password ok
now if I click on the RDP file it will
directly give me this kind of a window
where it will say are you so you wanna
connect to it let's click on connect and
now it is asking for the password so all
you have to do now is wait for the
password to be available over here all
right and once the instance is ready you
will get the password here once you have
the password just put the password over
here click on OK and you should be able
to connect to your Windows instance so
let's give it the time let's wait for
this instance to get in the running or
in the password state and then we'll
just enter the password here and click
on ok and let's see how it goes alright
guys so let's try now so I just click on
actions I click on get Windows password
I get this page now what I have to do is
I have to choose the key pair path
so in this PEM file will work so I will
just enter the test in telepath dot Pam
remember the PEM file will work and not
the PPK let's click on open and now
let's click on decrypt password so guys
this is the password for connecting to
my instance let's copy it go to our
instance let's paste it over here and
now let's click on OK now it says the
identity of the remote computer cannot
be verified it's ok just click on yes
and now you should be able to connect to
so
so here you go guys here is a server
launched on AWS for you it's a fresh
server you can do anything that you want
on this right you can install any kind
of tool on this you can make it a
database server make it a web server you
can make this over anything
okay so this is how you can connect to a
Windows instance I've showed you how you
can connect to a Linux instance as well
right this also you can install any
software on this server and it can
become anything for you right now let's
go ahead and come back to our slides
alright guys so I've showed you how you
can connect to an ec2 instance we got to
know how to connect to a Linux instance
we got to know how to connect to a
Windows instance right and let's talk
about the other services well so let me
come back to my dashboard so likely to
realize ec2 is a infrastructure as a
service where you get access to the
operating system right now there is a
service called elastic beanstalk and
there is a service called lambda let's
look at elastic Beanstalk how is the
dashboard look for elastic Beanstalk
right so as you can see it says welcome
to a double elastic beanstalk and it
says just select a platform upload an
application and run it that's it you
don't have to connect through ssh to
that instance in order to install the
software and get your application ready
right so as you can see when I said get
started it gives me creative there bap
right so you can only create a web
application here it not act as your
back-end server right
it can only host applications let's give
it a application name let's say it's
test ok and then let's choose a platform
platform what do I want that software or
that web app to run so I can put my web
app in dotnet I can put my web app and
go I can put my web app in PHP it's all
my choice so let's click on PHP right
and the application code let's have the
sample application first and now let's
click on create application so these are
all the settings that you have to do
guys nothing much right and now it will
start to create your elastic beanstalk
it will not give you an access to the
operating system remember this guys you
will not
get an access to the operating system
all you will get is a dashboard on which
you can upload your website and should
be hosted for you when I created the
easy to server I could not do anything
on it I had to install the software then
I had to put my application on it and
only then I'd be able to access it but
in this case everything is done
automatically I can just upload my code
in that's it all right so let's wait for
this to be ready and then we'll go
forward
all right guys so as you can see my
elastic beanstalk is now ready and now
if oh dude this particular URL which
elastic beanstalk has given me you'll be
able to see the web app right this is a
sample application which has been
deployed I can click on upload and
deploy and just I have to choose a file
click on deploy and that website will
get deployed automatically over here I
will just go to this link refresh it and
my website will be visible over there so
I guess now you know when I said that
you just get an access to a dashboard
you are actually not getting an access
to the whole operating system right you
do not have a control on that all right
let us look at lambda as well so let's
see what happens if i click on lambda
all right so when I click on lambda guys
this is the dashboard that you get and
as you can see it just says run so if I
run it it says hello world right you
just have to enter the code here it will
give you the output that's all what
lambda is it will not host your
application it can just give you actual
output in the form of JSON or in the
form of textual content it can just give
you that okay now if I change something
over here let's make it hello world 1 2
3 if I run it it says hello run world 1
2 3 so if you want to create a function
just click on create a function over
here author from scratch use a blueprint
browser or SAP repository you can just
see if there's any code that you want to
take from what has been done before you
can do it from here that browser will is
a preparatory user blueprint here you
have a lot of blueprints which most of
the companies use right so you don't
have to write the whole code from
scratch you can just click but the
blueprint that you want for example it's
a micro Service HTTP endpoint that is
you just have to hit on the API and it
will give you the result if that is the
kind of lambda function you want you can
also do that right then you have
kindnesses firehouses local json there
are a lot of things aware don't get
confused with all the job ins you use
over here right this you will be able to
get once you have a hang of all the
services in AWS which we will teach you
in the upcoming sessions right for now
you just understand what lambda does
right lambda you give the code it will
run the code that is it it will not host
an application elastic Beanstalk it will
host the application for you and easy to
do you can do anything
you can also configure your ec2 server
to basically become AWS lambda but you
will have to manually install this
office and then you'll be able to do
that job
so I guess hope guys that you are now
clear with basic services of the compute
domain of AWS that is easy to elastic
Beanstalk and lambda auto scaling and
load balancing we will do it as we move
along in the sessions because that
requires you to know a little bit more
right so let's move on and come back to
our pivot ease and let's start with our
next domain now all right guys so I'm
next to mean is the storage domain ne WS
and let's see what all services do we
have in the storage domain so these are
the important services that we have in
the storage domain of AWS our first
service is Amazon s3 then we have Amazon
glacier Amazon EFS and AWS Storage
Gateway so let's look at these services
one by one and understand what they do
so where is s3 is an object storage
service which basically means that all
the files which are uploaded on the s3
they are basically regarded as objects
objects for us as layman users they
don't differ much
I mean you won't see the difference in
terms of when you're using the file or
downloading the file that you know it
was a five before and now it's an object
object basically is at the back end that
is how you store a file is in the form
of an object right so it's basically on
the infrastructure side that it makes a
difference that each file in s3 bucket
acts as an object right now why do we
use s3 why do we need a storage service
right it is because like we have
discussed previously that we need
distributed systems on an application
the more distributed it is the more
fault-tolerant it becomes when I say
fault tolerant basically it can tolerate
faults in its nodes each node in the
application whether it be the storage
nor the compute node it will be the
back-end compute node the
note each of these node if they fail
right it can tolerate that failure in
your application can still be working ok
so Amazon s3 is a fire storage system by
AWS which says that it will give you the
availability of 99.99% times that means
only there's a point zero one percent
probability that you know your service
is gonna fail
otherwise ninety-nine point nine nine
it's actually nor ninety-nine point nine
and it's ninety-nine point nine nine
nine nine four times nine right that is
the kind of availability that AWS
guarantees that your object will have
and obviously you can increase this SLA
this basically code is in a service
level agreement that what kind of
service relateable is provide to you you
can further increase this SLA by
providing redundancies by using certain
techniques wherein you can take a backup
of your bucket at every 24 hours so that
if there is a data corruption you can
always get that data back you know from
the vaults and then store it back again
in the bucket but that is only when you
have failure in the s3 servers and for
that I told you the probabilities point
zero zero zero one percent okay that is
the kind of service that AWS provides so
you can be less assured that if you want
to host files on AWS if you and if you
host it on s3 your files will be
available pretty much all the time right
that is what you have s3 for now what
are the common use cases where you will
be using AWS s3 you can imagine it like
this that if there is a website where in
the logo is there if there are certain
images on that website that have to be
loaded at the time of web page reload
all those images will be taken from s3
and will be presented over there right
so rather than storing all these files
on the server on which the website
exists you can store all these files all
these images on s3 and then you can just
get it from there right s3 also provides
you the facility of hosting static web
files right so you can host a website
also by using an s3 bucket and all you
have to do is enable static hosting on
that
and you will be able to host static
websites in that case all right our next
service guys is AWS glacier so AWS
glacier is an extended version of the s3
service which is the glacier does not
give you a direct access to itself it
basically takes a backup of the s3
service so let's say you created a
folder in s3 so a folders in s3 are
basically called buckets right the root
folder in s3 is called bucket so if you
have a bucket and you have a lot of
files inside that bucket and if you want
to take a backup of all those files you
can take it using the glacier service in
AWS right and glaciers all this the
reason we have two services over here
the reason for that is that s3 you can
get the objects instantaneously the
moment you put the link of the object
you can download it right you can access
it but when we talk about glacier it
takes time for the object to be
retrieved it takes sometimes take stands
in are sometimes 2 or 3 hours to
retrieve a file in Amazon right so that
is the kind of service that glacier is
and it's a backup service and it's also
cheap so the main difference between s3
and assure is that if you are taking a
backup in glacier it'll be very very - I
think it'll be one tenth of the cost of
the same size of files which exists on
Amazon s3 the reason for that is glacier
is strictly a backup service and because
it is low priced because of that there
are some compromises in its performance
we're in the time to retrieve the object
it takes time right it takes two or
three hours to retrieve an object in
Amazon glacier when you compare it with
Amazon s3 it's instantaneously and that
is why even the price is higher on the
s3 service more about pricing we'll talk
as we move along in the session right
but right now it is very important to
understand the functionalities of these
services right so why do we use AWS s3
for hosting our files and those files
can then be retrieved on whatever
application we want it's basically
anywhere on the internet if you put that
link you will be able to download that
file so that is what AWS s3 is for you
if you want to take a backup of AWS s3
then you can use AWS s3 glacier which
will help you to take backup of any
buckets or files which are there in your
s3 inside
right after gives you guys the the other
service that we're gonna discuss is EFS
so what is EFS EFS service is again a
storage service but it's different from
s3 how is it different from s3 that EFS
service can be mounted on your operating
system as a one um-- it isn't that
interesting so you can mount amazon EFS
as a volume on any computer on the AWS
network they'd show you let's say you
launch a server of windows on AWS and
you feel that you know you need a
network driver if you guys have worked
with network drives then EF is IG's
exactly a network drive it mimics the
usage of a network drive right and it's
also scalable that means the size
increases as and when you need it right
so that is scalable it is it can be
attached to multiple computers that it
can serve you as a shared drive that is
it there could be tens on hundreds of
computer which have the same volume
inside them and that same volume would
be EFS for you so how does that help
that helps when you have a scalable
architecture when there where there are
seven or eight systems and whatever
changes one system is doing that has to
be seen by the other system as well so
in those kind of cases you use EFS
wherein they will have a common drive on
which the data will change dynamically
no matter which server is changing it
all the changes will be available on the
other servers as well and that is what
EFS is for you guys right so EFS can be
mounted on Windows machine it can also
be mounted on Linux machines and the way
you use it is I just told you it acts as
a shared drive and where you use it you
use it where you want shared data
between multiple servers which are
working in an architecture all right so
that is what EFS is for you guys then a
next service is AWS Storage Gateway so
it basically helps you to connect and
on-premises system to the AWS cloud
infrastructure so if there is any
storage application which is there on
your on-premise systems and you want it
to be connected to the AWS
infrastructure you will be using the AWS
Storage Gateway service all right so
this dismiss all about the storage
domain in AWS let us quickly
bond to our AWS management console so
I'll show you few of the services in AWS
that ways so let me jump on to my
management console alright guys so here
I am on my management console
the first service that we discussed was
under storage which was s3 so let's
click on the s3 link and that will give
you UI which will look something like
this so I have some buckets already
configured you can create a new bucket
so like I said bucket is nothing but the
root folder where you put all your files
right so let's say the bucket name is
test - in teleport right this is the
bucket name then the region that I want
to put this is let's say I want to put
it in Oregon region and that's it let's
click on next and keep all versions of
an object in the same bucket leave
everything a default just click on next
leave everything in live at default and
now let's just click on create bucket
alright so my bucket is now created I
can go inside this bucket and I can
upload files over here let's try to
upload a file let's click on upload
let's click on add files let's go to
pictures and then let's try to upload
something let's go documents let's say I
want to plot a file and let's say I
upload this particular file ok so this
is the file that I'm gonna upload I just
click on next
it will now upload it click on next
again here other so this is basically
the types of classes that you can access
right
Damona access put it in s3 you want to
archive the data put it in glacier all
those you can do let's click on next and
click on upload so right now we have not
changed any setting in s3 right we are
just uploading an object and as you can
see my file is now uploaded over here
right now if I select this file I can
actually see the properties of this file
via this link right here is an object
URL that you get if I click on this
object URL it will say access denied why
access denied because first I have to
make that object as public so for that
what I have to do is I'll be going into
properties right and hope over here I
will go to permissions and then I will
go into public access right so right now
it says you can't grant public
because block public access settings are
turned on let's go ahead and remove
those things so I'll just go to Amazon
s3 click on the bucket and then let us
click on permissions and in this
permission I want to edit block all
public access I've done that let's save
this thing and to confirm these settings
just type confirm hidden confirm and my
settings are now done now let's go back
to overview this is my object right and
if i refresh this
it says still this access denied now
what I do is I'll go to permissions and
now I'll give public access so I want to
give read object to everyone let's click
Save now if I go to the website hit
refresh I can see the image over here
now this link anybody who has access to
this link will be able to see this image
so you can also embed this link in your
website and you will be able to load
that page on your website just like that
right this is what the link does this is
what the link is all about so if you
upload object guys and you want to make
it public just go to the permissions of
that particular object make it as yes
and you're set all right so this is how
you can read from s3 alright guys so now
let's start off with EFS so I just click
on the EFS service on my AWS management
console I will reach this page where I
will have an option to create a file
system let's click on that and now it
will ask me for the V PC that I want my
EFS to be created in now remember there
is the V PC that you select here should
be the same as the instances on which
you want to mount the EFS volume so for
right now it's V PC 4 B 5 a 2 double 3
let's click on next step right leave
everything in d4 guys don't touch
anything else let's create the file
system now alright guys so my file
system is now being created now remember
guys the security groups that are
attached to this particular EFS Drive
has to be the same as well for your ec2
instances ok so how to check which
security group is
EFS drive mounted on you can check that
by you can check it over here in this
table so right now it is in creating
state so once it is available you will
have security groups listed over here
okay now since my EFS is going to take
some time to set up let me show you the
instances that I've launched so I have
two instances one is Ubuntu and the
other is 0.02 I'm gonna mount the same
EFS volume which have created over here
to basically connect through these two
instances right now how to do that
first I will click on let's connect to
our Ubuntu instance let's connect to
this Ubuntu instance first so this is
the IP address and I guess I have
already connected to this IP address a1
7231 51 195 this is the private IP
address for the Ubuntu instance and this
is the same right so even this is the
same so let's close the extra terminal
from here and now let's connect to our
second Ubuntu instance as well so this
is the IP address case let's copy it
let's launch a new putty console let's
paste the IP address let's select the
PPK and let's click on open
for clarity let us change the colors of
the terminal let's make it orange so
that we can differentiate between the
first instance and the second so as you
can see the IP address for this is 170
231 51:17 and the IP address is same mo
here as well so that means we have to
open two servers that are now open on my
pootie terminal and what we will be
doing is we will be connecting this EFS
mount point to my Ubuntu instances so
this is the security group base seven F
0 8 7 2 3 6
now we'll have to ensure that both my
instances have that security group
associated with it right so if we have
to check the security group for my one
two instance here it is guys the
security group which you will have to
connect so what you will be doing is you
going will be going to networking will
go to actions go to networking and click
on change security groups so as you can
see it is only launch visit one has been
connected to it my security group that I
have to connect is seven F zero eight
seven so this is the security group that
I have to connect to my instance so
let's connect both of them right and now
let's click on assign security groups so
my Ubuntu instance is now connected to
the security group of my EFS let's do
this to our second instance as well
let's select the default security group
which is there great so now both my
instances are connected to the security
group of my EFS right now what I will be
doing is I will be following a set of
instructions that you will find on this
console as well right so the first thing
that you have to do is turn on Ubuntu
instance you will have to install this
package let's do that so this is my
first instance let me copy the command
and it is already installed great let's
do the same on our second instance as
well so let's first update the machine
sudo apt-get update alright once it's
updated the next step would be to run
that command
now let's run that command and my NFS
common package will install over you
right now what I can do is I can create
a directory on my first instance let's
the directory be EFS best okay great and
let's create a directory here as well
let's name it as EFS test - okay now
what I'll be doing is I'll be mounting
my EFS volume so for mounting it just
copy this command go back to your server
paste the command and put the directory
name so in case of my first instance the
directory name is EFS test let's hit
enter great so FS test directory is now
connected to my EFS volume will verify
whether that is working or not right
let's similarly copy the command over
here as well and this would be EFS
there's - this is the directory name
okay so even this instance is now
connected to EFS let's go into EFS test
- great
now as you can see if I do i LS over
here there's no file right similarly if
I do wireless over here there's no file
let's create a one dot txt file
let's put sudo great if I do an LS you
can see there's a one dot txt file over
here if I do LS over here you can see
there's a one dot txt file here as well
that means this is a shared volume
correct if I create let's say 105
over here Purdue analyst over here I can
see the two dirty X is also available
similarly I can create a file from here
as well and if I do any race over here I
can see that the three dot txt file is
also present so the guys this is how EFS
works it acts as a shared drive between
multiple instances in AWS all right so
let's come back to our slides guys now
so as you successfully discussed we
discussed what s3 is we discussed what
glacier is we discussed what EFS is and
we have discussed what storage get bins
our next set of services are belong to
the database domain so let's go ahead
and understand these services so the
first service so there's the database
domain comprises of these many database
services in AWS the first AWS services
that service that I have is Amazon IDs
then we have Amazon DynamoDB
Amazon redshift and in the end elastic
caches so let's understand these
services one by one starting off with
Amazon RDS so guys Amazon RDS is nothing
but a relational database service guys
it's not a database it's a database
service what do you mean by that is that
you will in under the IDS service of AWS
you can launch these many databases you
can learn some microsoft SQL server you
can launch the MySQL service you can
launch the Oracle SQL push ksq Maya DB
Amazon Aurora you can launch all these
databases but what is IDs for IDs
basically manages these databases now
how does it manage we make sure that it
takes automated snapshots of all these
databases which will be corresponding to
a particular time it can also ensure
that if there is read replicas required
or if there any replication required in
your database that also can be taken
care of IDs or by RDS third thing is it
also takes care of any security patch
which has to be applied on your database
if you enable automatic updates right so
this is how RDS works guys now again let
me emphasize on the point that RDS is
not a database it's a relational
database service in which you can launch
all these relational databases alright
so i guys i hope RDS is clear with you
next
service is Amazon DynamoDB now what is
Amazon DynamoDB it's basically a no
sequel database by Amazon right and what
is the no sequel database whenever you
have to store unstructured data that is
data which does not follow a particular
format you use unstructured data base
like DynamoDB now ordinary goes to this
you might have seen or you might have
heard about MongoDB or you might have
heard about other no sequel databases
this Amazon DynamoDB is a no sequel
database by Amazon right so there is no
database that it supports it itself is a
database unlike RDS and in this you can
store unstructured data ok third service
is guys Amazon redshift so Amazon
redshift is a data warehouse service
which basically what it does is under
the data warehouse you will have
multiple databases so those databases
can be queried by your warehouse and it
looks as if the whole all the data bases
they combine together to give one
database where all the data exists but
it is actually not like that Amazon
redshift comprises of multiple database
engines which it can connect to and give
the output as required next service is
Amazon Elastic caches so it lasts Amazon
ElastiCache a basically is a service
which serves as a cache a so what is the
cache a a cache a is a layer between the
client and the web server or the server
from which the information is being a
question what happens is let's imagine
you want to get the data for an employee
whose salary is greater than 10,000 and
you basically want to get all the
current cities that the employees are
staying in right now let's say you do
this query time in again now what
happens your server is again and again
doing a query on the database using a
particular query that this is the data
that I want now what happens is when
again and again you are doing the same
query it does not make sense to run the
same query again on the database let it
do the computing work and get then get
the results so what these kind of data
what ElastiCache it does is whenever it
sees that there's a frequently accessed
data it stores that data on the cache a
which means whenever
a similar request will come rather than
querying the database the same data will
be going back to the customer from the
cache a layer itself so it decreases the
overhead on the database and it also at
the same time increases the performance
of your application right so that is
what elastic cachet is all about guys
hi guys our next domain is the security
domain so in security domain these are
the following services that we have in
AWS so we have the first service which
is AWS I am and the nut service is AWS
kms let's check out both you services
and understand what they do so guys I am
is basically used to authenticate users
to your AWS account now the account that
he just created on AWS it basically is
the root account for that either Plus
account now what happens is big
companies are companies like Netflix a
B&B they own only one AWS account and
what they doing that AWS account is they
create multiple users with restricted
permissions ok so each user can have
their own user ID and password but
basically they will be logging into this
same AWS account and that is possible
using AWS I am right so you can create
multiple users for a single AWS account
with granular permissions such as what
actions can they do on the a SS
management console that you can also
restrict them them to particular
services that they can access for
example the user can just access s3 or
you can just access ec2 or it just
really easy to when cannot stop and
start an instance or you can just start
and stop an instance but cannot create a
new instance right or you can put also a
restriction that nobody can terminate an
instance who whoever users you are
adding right the account or the user
that you signed up with that is
basically the root account now what is
the root account root root account
always has all the privileges right it
has all the privileges can do anything
but if you have to put any restrictive
access to a particular person you will
have to create a user account in I am so
that is one type of account that you can
create and I am the second type of
account that you can create in I am is
an application account now what is an
application account let's say I have a
website which can upload data to s3
now how do i authenticate my website to
upload data on s3 for that we have the
AWS I am service using which I can
create application identification keys
as well so what you get in that case is
you get access key and you get a secret
access key so that access key and secret
access key has to be embedded in your
program and only then your program is
authenticated to upload data on to the
s3 service of your AWS account otherwise
it cannot write so this is what are the
reasons or these these are actually the
reasons that you use I am for right it
can help you to put a restrictive access
on user accounts as well as application
accounts alright moving forward guys the
next service is kms cavus means key
management service so key management
service is basically used to create the
key pairs that we saw while we were
creating ec2 instances right so those
key pairs are actually created by the
kms service right so similarly if you
want more key pairs to be created you
just have to head on to the kms service
and you can create your key pairs over
there and authenticate yourself
accordingly to whatever service you want
alright so this was the securityq domain
now let's move on to a next domain AWS
services management alright so this is
our next domain guys so let's see what
all services are included in this domain
so these are the domains that are
included in this these are services that
are included in the domains of first
service is AWS CloudFormation then we
have AWS opsworks then we have AWS cloud
trail and in the end we have cloud watch
now what is AWS CloudFormation guys
readable as cloud formation is basically
used to template eyes and AWS
infrastructure ok so let's say I have
launched to zero instances with the load
balancer with a now in an auto scaling
group which is connected to an RDS
instance which in turn is also you know
connected to my EFS so all these things
I will have to launch right if I know
what the architecture is I have to
launch everything one by one and then
probably my architecture would be ready
but what I can do with cloud formation
is everything I can specify in a JSON
file
so in a JSON file I can specify all the
resources that I want to launch all the
things that I want to configure in the
network everything I can specify in the
JSON file and just run it through cloud
formation so what cloud formation will
do it'll create that whole architecture
according to my JSON file so I don't
have to stress too much on you know
creating my architecture one by one
using either through my management
console or through my CLI right I can
directly do that from by just writing a
JSON file and passing it through my
cloud formation so this also helps us
when we want to replicate our
architecture across multiple regions
right let's say I have an architecture
in one particular region I want to
replicate it across multiple regions so
in that case also cloud formation helps
us a lot
so it's an automation tool which can
help us to launch AWS resources by
specifying it in a JSON file a next
service is AWS opsworks now it's a
little similar to cloud formation
because this also deals in automation
but basically this is a configuration
management tool so if you guys are aware
of DevOps
there is a configuration management tool
called chef right so chef recipes are
readily accepted by AWS opsworks and
what you can do is in this in a table so
ops worth what happens is there are
multiple layers that you have to
configure and all these layers together
they form to become a stack okay so what
I'll be doing is let's say in the first
layer I specify the the ec2 instances
that I want to automate on right the
second layer could specify what all
software that I want to be configured in
that ec2 instance so that is how ops
works is helpful guys so a configuration
management tool is nothing but which can
configure all the software requirements
on a particular set of servers at the
same time right that means if I have to
install it say MySQL on let's say
hundred servers how would I do that it's
a very daunting task I have to go to
each server I'll have to install MySQL
so opsworks makes it easy for me and it
makes it easy in a very effective manner
that is every server will have the same
configuration that is specified in
opsworks now don't get confused with
cloud formation and optics guys cloud
formation is
used to deploy an architecture opsworks
is used to specify consistencies in that
architecture with respect to the
software's that we are going to install
in that okay so and also it's not just a
one-time deployment that you will be
doing through ups works let's say
tomorrow your database link and the
password is changing right and you have
some 200 servers in your fleet how will
you do that so that is possible using
opsworks all you have to do is just
quote that layer very have specified the
link and the password just change that
and update or deploy the opsworks
architecture and then in that case it
will update all these servers with that
very small change that is specified in
one of the layers right so for all these
very small changes which are very
important and have to be same across all
the servers I use options right next
service guys is AWS cloud trail so AWS
cloud trail is basically a monitoring
service which logs everything which is
happening in your architecture right so
that logging is not enabled by default
to some of the services you can enable
logging by specifying that you know AWS
cloud trail should log each and every
action which is happening and it exactly
does that it basically would log each
and every action or each and every event
that is happening inside a particular
Aidid Louis resource once you attach a
double is counter into it and then that
log data basically you can use to do
further monitoring by connecting it to
probably a bi service which can
visualize your log data etc alright so
that is what AWS cloud trail is all
about then our next service is AWS cloud
watch now what is cloud was cloud watch
is basically again it's monitoring
service but it's a little different kind
of monitoring service right so what you
can do with your cloud Watchers you can
set up alarms for example if let's say I
want an alarm whenever one of my servers
goes in unhealthy state right now so how
would I do that
so one thing would be that I
continuously hire
my employees and they are constantly
checking if my servers are in the
healthy state or not or what I can do is
I can configure very well take very less
time to just configure my cloud watch to
monitor all my resources and whenever
there is a resource which goes in the
energy state it will trigger an alarm
now what kind of alarm can it trigger it
can either email you or it can basically
trigger a next set of events it can
trigger to create earn ec2 instance or
it can trigger an AWS lambda function it
can trigger something else as well so
this is what cloud watch is all about it
watches all your resources and on basis
of that it can do for the simple process
that you define an cloud watch okay
moving forward guys our next domain is
customer engagement domain so in this
domain we have the following services
the first service is Amazon Connect and
then we have simple email service so
let's look at what these two services do
so that they are so helpful in the AWS
community
the first service being Amazon Connect
guys so Amazon Connect is nothing but
it's a it's a full-blown customer
contact center for your company for
example you would have seen that
whenever you purchase a product there's
always a customer helpline that you can
call on right and then you get the IVR
options in there where you choose and
then you get connected to human agent to
talk your way out right or you to put
your grievances and you talk to your
customer service agent right now if you
want to set up something like that for
your company it is very simple to set up
that using Amazon connect you can build
a customer contact center in less than
five minutes with Amazon connect right
all you have to do is go to Amazon
connect service click on get started and
it will allow tieu toll-free or a normal
phone number based on what you choose
after that you just have to fill in the
agents that you want to be on the other
side so that whenever people will be
calling that one particular toll-free or
normal contact number they should be
routed to the agents screen agent screen
right and this happens on the internet
so there is no need of purchase and
carry
plans or something like that right so
this is what Amazon Connect is all about
guys a next service is simple emailed
service now this is also plays a vital
role in customer engagement you would
have seen that you get marketing emails
from her off companies for example if
there are food companies that you order
for or if you have went into a store you
gave a phone number over there in the
contact lead a low also message you
these are delivery stores or grocery
stores they want email or SMS you one
way or the other right this service
right here is when you want to have
email interactivity with your customers
right you can send bulk emails you can
also set up your simple email service to
respond to particular reply emails right
so that is what SES is all about and
this also can be configured to route
emails for example if there is a email
address that you set up for a company
for example support at the rate in
telecom is our email address right so if
you email to that particular email
address and you get routed to our
support agents who will help you out in
solving your queries right so that all
can be set in Amazon SES guys so this is
it for the customer engagement services
our next two main talks about app
integration right so in this domain will
basically have services which help you
to integrate two or three services in
AWS let's look at what services they
have to offer so there are two services
basically guys one service is called
simple notification service and the
other one is simple queuing service
let's see what these services are the
first service which is Amazon simple
notification service basically helps you
to send notifications to other AWS
services in occurrence of an event right
so it waits for a trigger to happen and
based on the trigger it sends a
notification to a corresponding AWS
service which has to work next for
example you can set up a web site which
can send you an email and all you have
to do is let's say whenever a customer
purchases something from your website
you want to get in an email to the
customer with all the details now if you
have to do this on a distributed
environment what will you do is the
meant there is a trigger that there is a
cash payment received from a particular
customer your lamda event will be
triggered right now that can be
triggered in numerous ways one way is
either your service can directly trigger
the lamda event but that is only
possible for some of the AWS services
the other way around is that you can
send a notification to SNS right so SNS
will detect the type of notification
received and it will have a mapped out
road too as to which service it has to
notify next so in this case it will
receive the notification it will see
okay so this is the type of notification
you'll receive it will invoke the lambda
function which will basically send out
the email to your customer all right so
this is what this is how an SNS service
basically works as you can see in the
diagram here as well that you have a
publisher a publisher is a person who
sends out the notification right the
next thing that you do is the way of
filtering out different kind of
notifications in SNS is that you define
topics okay so based on the topics the
messages are filtered and what you do is
in the topics you will define which
service to basically trigger and based
on that those services will be triggered
and the services to be triggered are
basically called subscribers okay so
guys this is how an SNS service actually
works moving forward now let's look at
the simple queuing service now what is a
simple queue service it's basically a
queue for or it's basically a place
where you can store all your jobs
whenever you have a stateless kind of an
architecture what is stateless kind of
an architecture let's say you have a
system which doesn't have its own memory
the prime example for this would be a
The Bluest lambda so what aw slam that
does is it does not know what is
happening in your application okay what
it knows is just the job job that it has
to do for example let's say the job of
the lambda server is just to send an
email right it will not know whether it
has already sent an email to that to a
particular customer or not it will not
know whether it has already sent an
email to a customer right what it will
do is it will just pick up jobs from the
queue that you have and based on that it
will perform the job and
that is exactly why you have a simple
queuing service so that it can feed to
lambda watch the next show bills without
clam lambda having to remember what it
has to do right so guys this is what the
STS services now ways this was all about
the different AWS services that we have
and that you need to know in order to
get started with AWS so for I think we
have almost got all the use cases that
you can encounter in an organization and
basically your job would be to that base
of the problem you would have to suggest
an AWS service and that AWS service
implementation also details you will
have to know right so based on the
knowledge that I've just given you what
each and every service does you can now
decide what an architecture should
basically have in order to get a job
done all right moving forward guys now
let's talk about a very important topic
which is AWS pricing now what now we
know about all the services that we are
going to use right but what will we do
or how will we use these services
totally depends on the pricing of these
services correct so let's move forward
and understand how the pricing model
works in AWS and if I'm using a set of
services how will I be charged how much
will I be charged so guys the AWS
pricing options are among these three
right the first option is pay-as-you-go
model which means whatever amount of
time you will be using an instance for
or whatever amount of time you will be
using a server for that amount of time
will be billed to you and will be given
back to you so whenever you will be
launching any server you will get a per
hour basis charge on that particular
service right so you can see that
service you can see what the charges are
and accordingly you you will be charged
whenever you terminate that instead of
whenever there is a monthly billing
cycle of yours which is ending right so
the first model is pay-as-you-go model
which is widely used second model is
save when you reserve now what do you
mean by that let's say you are launching
a website today right and that website
is for your company and you foresee that
I will be at least running this website
for the next three years based on it's
just a start up I might not see that
much growth but I will sustain it for
three years and
my website is one of their right let's
say this is the scenario so what you can
do with the influencers you can opt for
dedicated instances or reserved
instances so you can say that I'm going
to use this instance for three years
from now right and I'm not going back
out I am going to use the three years
this instance for three years then what
AWS will do for you in that case is it
will give you a counteroffer it will
give you a discounted price right reason
being that it is no longer an on-demand
service it's a service that we have
asked from EWS which you will use for
three years which means that you will
pay you will have two options in front
of you to get this kind of deal one
thing is you can do a full up from
payment of three years right you can pay
all the whatever discounted price they
deliver to you you can just give the
amount for three years and you can use
your instance right then you logged in
or what you can do is you can also do a
partial upfront payment if that is is
out the financial stress on you right
for example you do not have that kind of
money to pay for three years so what do
you do ways you can divide your payments
into EMI and then you can pay you to a
double that's a partial upfront payment
so with this you can get discounts up to
seventy percent of the pricing which is
there in pay-as-you-go model right so
the guy that's very cheap so if you have
an application very know the server that
you're going to use is going to be there
for like three or two or three years
then it's better to go for resolved
instances where you can opt for taking
the server and you get huge discounts on
using them all right the third kind of
pricing is a less by using more what
this basically means is the more you
will be using your instance for example
your instance the the type of pricing
that we get for instance is on a per
hour basis right the more you will use
your instance the less the hourly rates
will become right so that's also an
awesome feature by AWS which says pay
less by using more right so then these
were the pricing options in aw there's
one more pricing option that you get in
AWS which is called spot pricing what is
fort pricing or spot instances spot
instances are basically idle instances
which aw
running and what it does is it offers it
to you in a cheaper price right so for
example it's 2 p.m. in the afternoon and
I know the load is less at this
particular time so what AWS will do is
it will offer you some instances as a
lowered price rate because those are
just sitting idle over there and if you
want to use them you can use them so
what happens in that case is you take
that instance and you bid it right if
you want to take that instant you'll
have to bid amount on that particular
instance the highest the higher the bid
amount is obviously that bid amount will
be lower than the actual rates but the
higher the bid amount is that instance
goes to that particular person right now
there is a catch in this basically that
if somebody bids higher than what you
have bid it in that case your instance
will be stopped immediately and will be
given to someone else who has done the
bidding higher all right so that's a
catch over here but it's but it could be
particularly helpful when you are
dealing with workloads which are not
that important but anyways you have to
do them right in those kind of scenarios
you can take up spot instances and you
can just bid a particular amount which
you feel you are comfortable in and in
case in future the price goes up your
instance will be stopped by at least
you're getting your work done in a
cheaper rate right so that's the
ideology behind spot instances so I
guess now it's clear with all of you
what ADA Blue is pricing options you
have now let me know where and let me
tell you a very exciting point about AWS
pricing right the free theorem so the
free tier is basically one-time offer
that you get whenever you sign up so
whenever you sign up on AWS if you are
using at e2 dot micro instance which is
1gb of RAM and 1 v CPU of computer in
that case it will be totally free of
cost to you right so what you do get in
a month is 750 hours of usage so you can
launch four instances five instances all
of them together collectively can be run
for 750 hours the moment you cross 750
hours you'll be charged the normal price
but up till 750 hours of server usage
you will be not charged a penny right
and that this is what the free tier is
all about now it is particularly helpful
for people who are trying out AWS or
people like us who are trying to learn
AWS for future careers right so I
request you all guys so whenever you're
practicing on EWS always be under the
free tail because that is literally not
gonna cost you anything all right so the
the 750 hours irrigate are particular to
ec2 and RDS apart from that you get some
other free Thea limits as well for
example in s3 you have if you store data
up to 5 GB you will not be charged
anything ok
then in dynamodb if you have to store
something which is if you're at the
instance which you are running is
another free tier and if you want to
store something on DynamoDB till it 25
gb it is absolutely free ok so that is
this is the kind of pricing that you get
or these are the kind of perks did you
get when you're using AWS for the first
time for more details on AWS retail you
can just visit the aws.amazon.com
official website and they'll give you
all the details for their lot of other
services as well that they offer free
theöin
or free limits in for example the amazon
connect that is the service that we
discussed which was basically a one-stop
customer center support center set up in
that you get in a month you will get the
first 90 minutes of your polling for
free and the way you get charged for
that particular services not on the
number of hours that you'd be using that
service but on the number of minutes a
customer is speaking to an agent right
that is how you get charged that's I
think pretty cool about Amazon connect
all right moving forward guys I think we
have covered enough of theory nah let's
go ahead and do a hands-on oh where
basically I will show you guys how to
set up your AWS services and how to
migrate an application from your local
computer on to AWS so let's start off
with our hands-on so guys what I've
basically done is I have created a
website using which we can upload data
on s3 ok so this is how the architecture
looks like so basically my website can
data upload data on AWS s3 and that
record is also saved in a my sequel
database now as of now this my sequel
database is on the localhost and also
the website is on
localhost and right now my website
cannot connect to s3 because it is not
being able to authenticate itself all
right so this is what we are going to
the first step that we are going to do
is we're going to authenticate a website
to inter process to upload data once you
have done that we will migrate this
website onto AWS infrastructure all
right so without any ado guys let me
first show you how my website basically
looks like so let me jump on to my
browser right so guys my website
basically exists on local hood slash new
right so this is how my website looks
like the first thing that I would have
to do is I will have to check if it is
able to connect to a database so
basically whatever I will be uploading I
can view that over here as a list but
right now it cannot connect to the
database so what I do is I'll open up my
MySQL on my local host here it is right
and now what I'll do is I create a
database called images so because that
is what I have configured in my code
right and now let me create a table with
the name names and let there be one
field called name with the value as far
care and let us give pretty big value so
that any length of characters can fit in
this particular table all right so it
says no database selected oops I'm sorry
for that so use images and now let's
create the table so when I do a refresh
over here it should be able to connect
but now it will show you an empty list
because there is nothing inside my tea
repeats right if you want to show
anything over here it will basically
will be visible once the entry is made
inside the database
second thing is right now if I try to
upload anything let me go to pictures
and let me say let's say this is the
image that I upload if I click on open
and after I click on submit my file
basically will not be a uploaded reason
being it will say the authorized header
is malformed which basically means
authentication is not yet given to my
account now how can I give autentic
ation to my website so that it can
upload on s3 for that I'll have to head
on to my AWS management console and as
we have learned
a service called I am so I will go
inside that I am service and over here
what I do is I will create a user
alright and let's say the user name is
web demo and what I will have to give
this user is the programmatic access so
that by code this user will be able to
access all these services on EWS now the
kind of services that I want my website
to access is only s3 right so let us put
an s3 over here and as you can see
there's a permission over here which is
Amazon s3 full access let's give this
you access to this particular user and
let's review it and let's finally create
the user once we have created the user
guys I will have the access key ID and I
will have the secret key access key now
this is very important for my
application to be authenticated so what
I do is I will just copy this access key
ID I'll go to my terminal I will create
a new page and this is my Access ID guys
and this is what my secret access key
looks like okay so this is my access key
this is my secret access key and this
will be used to basically connect my
website on to AWS s3 okay now let me
show you how my index or all my code
looks like guys so guys this is my code
which I'll basically use to upload files
onto si as you can see the key and the
secret key are not filled as of now so
let us fill the key first the key is
this let us enter it over here and the
secret key is this right so once I enter
the key and access key our secret access
key my website will now be able to
authenticate itself on to s3 and now it
should be able to upload objects into a
bucket right which bucket are we talking
about let me quickly show you so there's
a bucket that I have just created on s3
and that bucket name is basically test
in telepods so as you can see there are
no objects in this bucket as of now
right and now what I'm going to do is
let me refresh this website and as you
can see now it says new record created
successfully that is the image that I
chose earlier should now be uploaded
over here so now if I do a refresh
see there's one image that has been
uploaded lets me upload one more image
for the sake of understanding it let's
upload this particular image and let's
click on submit so what happens is the
moment it takes up a file it changes the
name of the file into a random name and
then it applies it over here so if i
refresh you can see there's one more
image which just has been uploaded now
what I can do is I can just go back to
my website and I can just click on
checklist so this will give me a list of
files which are uploaded onto my s3 if I
click on this list I can basically
download the file from s3 and if I click
on it you can see the file this is what
I uploaded right similarly if I click on
over here this is the file that I
uploaded right similarly let me upload
one more file so that it's clear for
everyone let's say I upload let us take
not let's take let us not take an image
let us try to put something else so
let's say there's this app this test dot
jar that I can upload so let's just
click on open and let's click on submit
so this is the file I click on submit
and now if I do a refresh over here I
should have that file ok so that file
might be a little larger in size that's
why it's not uploading so what I can do
is let me take this particular image
right and let me submit this as you can
see a new record has been successfully
created if I click on checklist there is
a new image which has been added if I
click on this image I can clearly see
that this is the image that I uploaded
similarly if let us try some other file
as well let's choose a file let's try to
upload this excel file let's click on
submit and when I do that a new record
has been created great if I check the
list this is the excel file that has
just been uploaded if I click here the
excel file is downloaded if I click open
this this basically file should now open
right great guys so I think our website
is working fine but the problem is this
website exists on my local host right
and right now it is basically feeding
data on to my local MySQL instance so if
I basically would just do a select star
from images so I select star from
names this is the name of the table you
can see that this is all the values that
are there in the table and these are the
values that you can see over here so the
first thing that I should do is
basically let us deploy a database on
AWS on through which my website will
basically be connected for that I will
be heading on to RDS since this is this
database that I'm using is MySQL let us
try to deploy a MySQL database on AWS so
for that I will be clicking on create
database and the type of data it is that
I want is MySQL that's like that and now
let's click on next next I want to
create a dev environment to test
environment because this is just a POC
so I selected this and I'll click on
next next I can select the MySQL version
so let's leave it a default right now
and I want to enable only options which
fall under the free ter usage okay so
let's select this option and everything
is filled automatically let's identify
our DB using a name let's say it's web -
demo write the master user name let's
say the Amish user name is hay month
let's specify the master password as
well and now let's finally click on next
right now it will ask me what VPC do I
want to put my instance into so I have
the default view PC where my instance is
being launched in that's great
second thing is public accessibility do
I want Internet to have to be able to
access RDS so yes I want public
accessibility to be enabled if I select
no in that case you know they'll not be
any public IP which will be assigned to
my RDS instance only the B PC in which
my RDS instance resides in only the
instance is launched in that particular
instance or in that particular V PC
would be able to access that RDS so when
I say be PC is basically a virtual
private cloud or it's basically a
virtual network right so if I do not
except if public accessibility to my
audience then it will only be able to
connect to machines which reside in that
particular network on which it is being
deployed right not on the Internet
ok so but we because our website right
now is in my local host from local oh so
I should be able to upload
later on to the database of AWS so for
that I will need public accessibility
right do I want to create a new security
group no I don't want to let us select
the default security group ok what
should be the database name so the
database name would be the same that I
have given for my local machine instance
which is images less you can just leave
a default backup I don't want any backup
so let's select zero and disable
monitoring we don't want that we don't
want any upgrades made to my database
right and I think that's it now let's
finally click on create database now
there is the database instance it takes
around 3 or 4 minutes to create
meanwhile while this database is being
created and let me tell you the next
step that we have to do now since this
website exists on localhost I want this
website to be existing on basically AWS
I want this website to be uploaded on
AWS and for that let us use elastic
Beanstalk which is the
platform-as-a-service service on AWS
right so let's open the AWS management
console and now let's head on to elastic
Beanstalk in elastic Beanstalk you can
basically upload your website and I'll
show you how you can upload a website
and you don't have to configure anything
on the instance every software
everything will be configured by lasting
Beanstalk itself so as you can see when
you reach this page user Safa click on
get started and now it will ask you the
application name let's say the
application name is there - demo write
what platform is my website based on so
it's based on PHP do I want a sample
application to be deployed previously
yes I do so I'll just click on create
application now so as this will
basically create a web app for me in
elastic Beanstalk we have done this
earlier as well we're doing it once more
so that we can upload our own website on
to this particular elastic Beanstalk
application ok so it will again take
guys three four to four minutes for
elastic Beanstalk to get deployed
meanwhile let's check if our RDS is
ready I'll just head out to our yes I
can see the instance which is running so
it is still in the creation phase so
once the creation phase is over you
be able to get an end point over here so
an end point is basically a URL through
which you will be able to connect to
your database right so let us wait for
this database to be ready and once it is
I will try and connect to this database
from my local host and see how that goes
right so it's in the creating phase
similarly my elastic Beanstalk is also
being created let me show you my code
guys let me explain you my code a little
bit right so this is my main file so in
this file basically I am using the PHP
back in language on which I have
basically imported the AWS SDK right
this is decay you can basically just
Google on you can just Google AWS SDK
for PHP and you would be able to
download it now I have included this
particular folder in my root directory
of my website which is over here this is
the folder which has all the libraries
right and my index or PHP will basically
has included this particular library and
then the service that I want to connect
to is s3 so we are using the libraries
of s3 over here right my bucket resides
in Oregon region the code for that is
uswest - this is my key this is my
secret access key don't worry guys I
will be deleting the user account so
don't try using these keys they will
they will no longer work once I have the
username deleted apart from that it's
pretty simple it's a very
straightforward code days right now the
database that I am connecting to is on
localhost that's why the server name is
localhost one I would want to connect to
my ideas instance all I have to do is
change this server name to the endpoint
of RDS and then it should work like a
charm right that's it this is my index
or PHP my list or PHP where I get a list
is basically I'm just connecting to that
same database which are gives on
localhost and I'm trying to read
everything from the table this is the
field that I am reading on the front of
that name I am attaching this URL so
this is the URL for my bucket and this
remains the same for each and every
object which gets uploaded right so I am
uploading so I am attaching this along
with the name
and this I am basically storing in an
aah ref tag which basically gives me a
link on my website right so if I can
show you over here as you can see this
is a list right and this is the link so
this link is basically a EHRs link in
which I have embedded this URL with my
file name all right so once I've done
that it works great it works like it is
supposed to now I guess we should go
ahead and check if my IDs is ready
yes guys some ideas is now in the
available State so how do you connect to
RDS they will be a database which has
been created on mod yes but the still
the table is still not created right so
first I'll have to create a table on
this RDS instance which would basically
be exactly the table like what I have on
a local host so how do I connect to my
RDS so just copy this endpoint guys and
now you'll have to go onto CMD right so
once you are on the CMD guys the next
step is to go to the bin directory of
your MySQL installation so my MySQL
installation is basically in program 64
so I'm gonna go in there right so I'm
inside the bin directory now next thing
would be that I will have to call it
MySQL - H would be the host name the
host name in my case is the Amazon host
name this is this the user name for this
RDS instance it's hey month and the
password is this let me specify it over
here
let's hit enter and now if everything
has went well I should be able to
connect to my RDS instance let's wait so
while this is happening guys if it gets
stuck like this it could be that you
know you're not able to connect to your
instance and the reason for that could
be in the security group so you'll have
to check if the inbound rules for the
our security group are open to accept
traffic so let's click on n bound and
yes so this is the problem over here
it's allowing all traffic but it's only
allowing to this particular security
group so what I'll do is I'll make it
anywhere and I'll save it once I do this
let us come back here and
along the command again I'll enter the
password and hit enter so as you can see
I have successfully connected to my
MySQL instance which resides on AWS
now this instance should have a database
called images let's use that and now
let's create a table which would be the
same as what I did on my local host so
the table name would be names and the
field name would be name and the type of
information that can go in it is Val cat
let's specify that okay so my table is
now successfully created guys and now my
database is ready to basically take in
data now what I will be doing is let us
go back to our dias and let's copy this
endpoint and now let's make our website
maybe be able to basically interact with
my RDS instance so it's pretty simple
just change the server name to the
endpoint of RDS the user name in my case
is hemant and the password in my case
for my RDS instance is a mid-1994
alright that's it guys that's all we
have to do and let's save this code
similarly in my list I will have to
change the values from localhost to
these variables I'll save it and now
when I go back to my website let us open
the local MySQL instance also so this
was my local MySQL instance as you can
see there are only four entries over
here right now let's choose a file let's
try to upload the same excel XX file the
excel file that is and that's now click
on submit so it says new record created
successfully but let us check here if
this is where my data has been entered
sono Madeira has not been entered over
here let us check on the RDS if my data
is being entered correctly over here
select star from names so yes a data has
been entered over here with the this
particular name and if I click on check
list
as you can see even here I get the same
value so you can compare that this is
the name that I'm getting over here and
this is the name that I'm getting on my
website if I click here I'd be able to
download that excel file successfully
great guys this is what I wanted so now
my website is basically connected to my
database instance on AWS it was that
simple now the next step is basically to
put this website on AWS for good so that
everybody in the world can access it now
how can I do that this is my elastic
Beanstalk guys and this is the dashboard
that I get when I use the platform as a
service instance right now it says here
upload and deploy so that's what I'm
gonna do I'm going to click on upload
and deploy and now it's going to ask me
to choose a file now the way you can
upload your website over here guys is
you will have to go to your website
codes right and then you will have to
zip these files like this right
so once the files have been zip this zip
has to be uploaded over here so I'll
choose a file let me go into that folder
where I have the zip here is the folder
let's click on open motion level let's
try to give this version label as 1.0
okay and now let's click on deploy so
now my website is now getting deployed
to AWS elastic Beanstalk it will hardly
take some two or three minutes for my
website to be ready on this particular
platform and once it is we'll be able to
use it by this particular link this link
will basically be my application now
that I've shown you on localhost this
will now be available on this particular
link so let me close all the unnecessary
windows and now let's wait for this to
be ready ok so it will take around 2 to
3 minutes like I said and whatever
version that I've specified that version
will now be reflected over here ok so it
would be AWS : 1.0 so let's see in the
future I make change to my code any kind
of change to my code I would be able to
upload it over here in the same manner
possible that is I will have to click on
upload and deploy and then I will have
to increment the version I will show you
as well let this complete and then we
will go ahead and check so as you can
see my running version is now a ws 1.0
great so this is what I wanted now it's
the moment of truth let's try to go to
this URL and see if our website is
working or not so great guys my website
is now available on this particular URL
let's let it check if it is able to
upload everything so let's first check a
list so we have one file which is there
my dear base which is uploaded now let's
choose a file let's try to upload the
zip file itself all right I'm not sure
if it will be able to upload let's check
so the uploading has started it says new
record created successfully awesome
let's go here let's refresh this as you
can see a new entry has been made let's
try to download this so as you can see
the zip is being downloaded and if you
go to RS 3 if we refresh over here you
can see the zip is present over here as
well and my zip is also downloaded if
you want to verify if all the contains
are fine or not let's do one simple step
let's create a new folder here
right and now let's try to paste this
extract over here if we extract all the
files click on ok so all the files are
now being extracted let's do a control X
and it's based here let's delete these
files
so basically on my local oh Sh hello
there should be a file my website should
be up and running so local ooh slash
hello so as you can see I can see my
website over here and if I do a
checklist so I if I do a list dot PHP
here I should be able to see even the
list so that means these files that have
now been uploaded to s3 are working
correctly and also as successfully
migrated my website which is there am a
local host onto elastic Beanstalk
without even going to the terminal
without installing any software on the
server right it is now up and ready and
anyone who will visit this particular
URL will be able to access my website ok
and as simple as that guys and it's
basically hosting my files as well my
files are now available on this
particular link so anywhere in the world
if sub anybody you would go to this
particular link they will be able to
access these files they just have to
click on it and they'll be able to
download it alright so thank you guys I
think this is it for this session let me
just come back to my slides alright so
thank you guys for attending this
session I hope this session was useful
to you so I have showed you a pretty
good hands-on which I would request you
guys to practice so this code will be
available in your LMS so I would request
you guys to go in your LMS and download
this code and try it out once on your
machine as well right for setting up PHP
on a machine all you have to do is there
is a software called vamp
if you're on Windows just download that
software and install it just put that
code file that you will get from LMS in
the www folder inside see inside ram 64
right once you put it there you go to a
browser go to localhost / the folder
name that you have named where the code
files exist and then you would be able
to use the website right mind you guys
you will not be able to see any files on
the list dot PHP page reason being you
will have to connect your own database
and your
own bucket to make the code working
right so I have a comment on the codes
wherever you have to add values you can
add those values and your website will
then be up and running alright so thanks
a lot for attending the session guys
have a great day and good night
