Okay hello welcome to the slap shot
This lecture we going to build a civilis web page using API Gateway and Lambda
Not appreciate we haven't covered off what API Gateway is just yet we will do that further alone in the coast
I'm but for the purposes of this lecture is just to show you how we can build out setlist webpage
And that uses various different components and then you don't have to worry about
You know ec2 and going in and managing that environment
Humble just reacts for when you're uses
Actually go
Time is it
The site and this is exactly what happens when you visit the a cloud Guru website
Which we do not run
On any service whatsoever we use a combination of angularjs across all the client devices
We didn't use API Gateway
We use Lambda to trigger an individual Lambda functions
And then we'll about video files stored in S3 which we then back off 2
To cloud from
I'm so we have built a civilist learning management system
That's one of the reasons why Al courses are so cheap compared to Al competitive
Because it we have a much lower
Call space
Then them
And we pass that cost based on to you we don't have to worry about me
Running Data Center
Example
Accent
We don't need to worry about Network administrators system administrators at cetera
I'm all about code just runs Nate
Wait to play in the cloud
So let's have a look at what our website would
He's going to look like so here we head out user and then making a get request will they making the trying to resolve
Gold a time which will be hello cloud gurus.com
As I have registered this domain name and we will cover this off in the Route 53 section of
What's the cost I'm don't worry if you don't have a domain name we can just
Use the DNS name for the S3 bucket
I'm so when we result this through
It's going to resolve to a straight and inside a straight we going to have out index. HTML
Web page there
Well it going to have an HTML web page in there
And then in the sexual little webpage we've got a button on that you're going to push when you push that button
It's going to trigger a get request
To API Gateway
The net is going to trigger a Lambda function
And that Lambda function with simply I'm print out your name so you just change your name in that
And then that will be passed back through API Gateway to your S3 bucket
And then it will be returned to the user and instead of saying hello cowgirls
When you hit the button it's going to say hello and then your full name
Like I said this is a lot and you will need to log into the AWS console
Okay say here I am in the AWS console
On the first thing I want to do is go ahead
Can create my
Street bucket
MC can go down to storage
And go to
Straight
Way to go
Create a bucket I'm going
Hold it a cloud and then
Play cloud
In my
Survey
Website
The head
Kidcreate I'm going to do it in the London region cuz that's
Me
Can you like
So go ahead and created that website
Going
I know the very first thing we want to do is
Is just go over to the property
Android static website hosting
I'm going to use this to a hosta web
And it's asking me for my index document and my documents
I'm going to do exactly that
I'm going to do the
Suggested once again
Index. HTML
Naruto HTML
HTML
EDD
Can I go ahead
Say
And then the next thing I want to do is upload these objects to my S3 bucket now these will
Will be available in the results of section of this lectures you should be able to download index. HTML error. HTM
Then our little python script
Which is cool Hello Cloud Gary Stop py
Nice to go ahead and download that now
Let's go ahead and have a look
This is our index HTML
Go to little scripting here
When is little script
What is basically going to run every
Define I'm somebody
He clicks on the
I'm such a little function in here
And we got a button that says click me
When you click that button
This script
Is going to run
And essentially what it's doing is
Is it's going to send a get request
To your API Gateway you going to have to
High school API Gateway
I will do that in a second
And then once that has happened
Time it will update
Page
I'm so before we apply this
To S3 and make it public we need to set up API Gateway and we need to basically upload
Code to land
So let's go and have a look at
Out of the flower Halo Cloud Gary stock
Py
Before I do that actually the era Pages just literally saying they has
I'm in this week or a little python script
I'm sitting here we've got our
Function
My response is a status code of 206
HTTP status code saying that it's being
Successful response
And here we go to headers
Now because the way this is working is Lambda is
Responding to API Gateway which is
Responding to S3 which is that
Responding back
I'm in a two uses browsers
It's cold cross origin resource sharing
We need to have this little line of code in
Here to allow
Kitchen Brazil sharing
This can be a popular
Exam topic
Thumbs up invite
Need developer associate
Solutions
It is well and I'll cover off work hoses
Can a little bit more detail
In the actual
API Gateway section
What's the cost
I'm an in here with just go out to the body so this is the actual response
Sunsets is Ryan critic
It's just my
You might want to change this and put you on
Rain in the
Okay so now that we know what this python script does we're going to go back over to
The AWS console going to look
Until Enda
Okay so I'm here in the AWS console and before we going to land if we just scroll down and look under
Application service
We click on
API Gateway
You should just get a splash screen
Because we haven't created
API gate
The full let's get back to the council
And we'll go down to compute
Stent
Play the computer
Click on Amanda
We're going to get star
Now and we're going to start with a
Blank funk
Is it go ahead and
Are you old blank
Say now we need to configure Outriggers so what is going
Frigga this land
Well it's going to be when somebody makes
API cool to our API Gateway
So go ahead and click
It was really cool about this is this is going to
Probation API Gateway old for you don't need to worry about setting it up
We can relieve the API name is Lambda microscopist
On deployment stage we're going to put this into production
Security what levels of security do you want or I want this to be open so I won't
What's the time anyone to be able to trigger this
Gateway function
In the end
Is it make it an organ
Go ahead and hit next
I'm saying here it's going to ask us what a function name is
So we'll just call this hello
Old Gary's
What's the name of a Lambda function
Then we might just want the same description
Terms of the runtime we're going to be using python 3.6
And you can either edit the code inline or
You could
I played it I'm going to edit in line so you need to do is open up
Hyatt in
Text editor
It just copy and paste it
Bring it back over here
Skip Ace this in here sir
Does Alco scroll down
It hits all skin statues in existing roll he probably went to say that because you might not have use Lambda
Let's just go create new row
Template
I in here we'll just call it
Hello
Cloud
Scary
Linda
And it's basically
Execute the policy
Template that we going to use
Scroll down
Simple microscope is
Is click that is y
Go ahead and hit next
And now we ready
Create
So we can create
Now function
Takes a couple of the 2nd so I'm because it's ulcer provisioning our API Gateway as well
I'm back I'm just going to post video
Wait for this
Create
And then
Danny Danny
Post video stair we go
So look under triggers with gaunt
Owl API
You are up
I'm in here with Kendra.
His Al configuration
And then you got your monitoring in your tags right now it's never been invert
Let's go ahead and click on triggers and just click on this link
Hopefully it will load up your name
Should we have now just invite on Land of Funk
What should I buy going to that
API Gateway you are
Searches going back in my browser we go back home
Moana string
Probably a bit too soon to see that
Invocation
If you want to come back
Cared like 10 15 minutes you should
I'll be able to
To see that
So let's go back to the council and let
Next some scroll down and have a look under
Application services and go to API Gateway
And in here we can see it's created a new API which is a Lambda microscope
We can click in here
In here with doing any method
You can change that to get
What if you want I'm just going to leave it
Default tell what we need to do is just go back
To Lambda
End in Lambda click on your function
And then go over to your triggers
Then grab this URL
So we need to
Then grab this URL Sweeney doubt
API Gateway URL
Then what you want to do is just go back over to your text editor and go to your index
Nextdoor HTML
We need to pay
Splat in here
Can't see your API Gateway
Kia heistad in
And save it
Now what we want to do
Applied
The index stock HTML and the era.
HTML to
Straits let's go back to our browser
Go back over to S3
Straight
Find a storage
And then we'll go to Al bucket so it's a cloud Gary my service website
Now going to upload these
To file
To his mighty files here index HTML and HTML5
Open them
Go ahead and hit upload
I'm very quickly and clicking here and just go to more and make sure you go and
Make these public
Say that people be able
Actually access them
Make public
And that we go so good are index. HTML with code
HTML
Let's go ahead to our properties and clicking static website hosting
Then you should just be able to
Click on this link
There we go let's the page hello clouds and this is a picture of
Anti team
Oscilloscope
In Austin
Sydney's the people who help
As well as developing out platform as well as
Etc etc
Say in here we go to Obama says click me if we click that
There we go does an API call
It doesn't get requests to API Gateway that
Get request
Tickets to Lambda function
The Lambda function is a simple python function which is basically just going to print out your full name
SMS back to API Gateway which
Which is then pause back
To S3 which is impossible
To your you
Browser
So we've created a really quick little Service website now one of the thing that we can do
Who is resolve this to a dentist name
Set to do that we would go back to the council we would go down to Route 53 which we haven't come it off yet but it is an
Dissection
Sets coming out in the cold
And here you can register your own domains you can go to register
What's the domains
Register domain
Are you can go ahead and do that
Free I'm some of them book
$12
Is it depends on the the domain name itself. I'll be like $39 at cetera
Turn on Spotify do when it go do that it can be useful specially if you plan on doing
Is any of the other associate cost
Is can you use for to play around with a domain name
I'm ghetto your Android 50
E3 what's your register the domain name you'll see it in your purse designs
I'm so I could Hillary cloud gurus.com
If I click in here we always have an NS record
And a start of authority record
What we would want
Want to do is create a recordset
In here you'd have it as an alias you leave this blank because you weren't hella Cloud gurus.com to resolve
To your S3 bucket
If you click in here
Basically
You can take a little while to load you have to be patient
Like a couple of minutes some
What times to show you your
Website employees I just wanted to point this out and we go at has loaded now so it says no targets available when you might be
You thinking we'll hang on we got in this tree pocket that setup is a website why can't I use the S3 web
Sign in
Why isn't it showing it
Cyclical
And that's because I didn't cool my bucket hello Cloud bruised it needs to have
What's the same name as you
D&S night
I believe it or not somebody actually owns Heller Cloud yours as a bucket and it's not me so I can't go ahead and dimming
Pinstripe this
For you
Number if you do want to create your own service you know website that's using a domain name
Make sure that when you go to register the domain name that
S3 bucket name
Is also available
Because if it's not
What you want be able
To use
832 canoe
Chew your
Pocket knife
Sweat something just tonight for the
So what you think about what it is that
You just built
And
You think about
Overhead required to maintaining this will
You're not going to need a database administrator to go in
United performance optimization
What database you're not going to need a network administrator
Windows system
Linux system
I'm to keep your site up
I'm literally all you need to focus on
Kind and
Through using
3 through using Lambda 3
Using API Gateway
Play Old scale
Semantically you don't need to worry about
Auto scaling groups Unite
Can you to worry about
Am I anything like that
I'm literally all you worried about
Hi say it is that's the true power of settlers that's why several is
Applications of
Future because you get
Rid of old
Overhead
Get rid of all the administration of running
I'm your application
Shouldn't say setlist is going to be big in the future still very new
You must understand that things like API Gateway
Lambda
Really big
Can You released
As a service
Land was released
Does a service
A train
E15
I'm so it is still a relatively new in the world of tech
Stop it in the neck
Next five or ten years almost all
Applications
You can think of will be
Re-engineer
To be
Isalus
Architecture because quite simply is cheaper that's less overhead you don't
You have to worry about
I'm hiring a whole bunch of
Different people
To unite Romeo systems
Who you need to worry about
What is now
Developments
I'm so it is really really exciting time it's definitely
Great time to start getting into civilis we have a whole bunch of civilist courses on
Turn it now website
And we are working on
Pacific Coast
Teach people how to
Kite
In a civilist
Play inside without using soda stock
So that is it for me you've done really really well to get this far congratulations on building your first serve
Website