Hey John.
And welcome back.
Now in the previous video we went ahead and we created a simple Halo function vigil then executed it
will return certain aspects here.
Now since this function is video that you do this icon and you will have a lot of guest users.
So if a guest user wants to go ahead and execute the function then there would be an intermediary EPA
that would be needed there whenever a user calls the EPA.
The EPA will if done forward their request to the function.
Another function that we were discussing is a very simple one.
However there can be a complex functions like a. one where the user goes ahead and he applauds a sample
fine and your function will verify if it has a virus or not.
Now irrespective of the type of function the high level architecture remains to be the same that we
are discussing here.
So in order to create this EPA will make use of a service coalesce Amazon EPA gateway.
So let's go ahead and open it up.
So I say EPA gateway.
So yeah if you look into the description it says B deploy and manage the EPA.
So it basically provides a nice to you a way in which you can go ahead and be the EPA.
So this is the new interface for the EPA gateway.
Now there are multiple EPA types which are available.
So you have the EDP EPA which was recently introduced the other web socket EPA.
You have the rest EPA and you also have an interesting EPA private vet whatever EPA that you create
that EPA will only be accessible from within the BBC.
However the one which is above that can be accessed from the Internet.
So we'll be using the first one.
Let's go ahead and click on b so we'll just click on.
Okay.
Now you're it is basically showing you these sample EPA you.
We do not really need Dec when we want to go ahead and create the EPA from scratch so we'll select a
new EPA with.
And the name you can give it as Hello void EPA and you can go ahead and click on Create EPA grade.
So now you have a dual consortia through which you can configure various aspects related to this EPA.
Now within the PPD if you remember that we were discussing about some of the common CPB methods which
people use.
So you have a get method so get method is definitely used to fit certain information.
You have the post method.
You also have put method you have delete method et cetera.
Now if you look into the actions the first thing is associated with creating the mento now which midterm
you use is very important you do not really want to use methods like delete specifically in the EPA
which are available to the internet without any authentication authorization.
So that is quite important.
So let's go ahead and create that method.
And if you look here there are various methods we take available you have get delete had options bad
post bought et cetera.
So we'll be making use of a get one and we'll click on.
Okay.
All right.
So this has gone ahead and created a matter.
Now you have the integration.
So once you have your EPA been created this EPA should integrate with what should be integrated with
Lambda functional readable service or EDP endpoint and so on.
So in our case we wanted to integrate with the Halo 1 lambda function that we have created.
So now the next thing would be to give the name of the lambda function.
Now in our case the name of lambda function was Halo void.
So let's go ahead and add that.
So I'll say hello.
So currently it shows you the function.
Now the lambda region there are multiple reasons since we have created the lambda function and not California
it's associated with the US West One.
Then you can also select the timeout method.
However we leave it to be defined right now.
Once then you can go ahead and click on C so.
It states that you are about to give EPA gave you permission to invoke your laminar function.
This is very important because your EPA that gets created at the EPA get to eliminate level it needs
to invoke the lambda function because in order for the lower message to be displayed the function needs
to be invoked.
Now in our case we had invoked a function manually with the control have ever since.
EPA will be doing that.
We have to ask the permission according otherwise if you do not really add the permission then things
will not really well.
So this is one important part to remember.
Great.
So basically now you have everything in its UAB very have a land on the left you have a lambda function
on that right.
And these are the steps that would be required.
So you can also go ahead and tested from that way.
Let us go and quickly testing.
And as the output you should see this it is called of 200 Andy body which has halo from lambda.
So this seems to be working perfectly valid.
Now once things are working what you can Gordon do you can go ahead and go to actions and you can deploy
your API so let's do that you have to set our stage name let's call it as Halo void and we'll go ahead
and do a deploy now as soon as you go ahead and do or deploy you basically get a invoke you are.
So this is the are through which you can call your EPA.
EPA will in turn invoke the lambda function lambda function after getting invoked it will send a specific
response in our case anyway.
And that response will be forwarded back to decline.
So that's the overview.
LES GORDON copy this up.
And within a new needle window I'll go ahead and I add that you are in and as expected if you see you're
getting a status code of 200 the body of halo from lambda.
So this is a simple example.
Again one example that I have seen people using is their antivirus one their users can go ahead and
upload US amplified the Orlando function will analyze that sample faith.
And in return it will tell you whether the flame is infected or profile is clean.
However as this because the oral architecture behind the scenes it remains to be seen.
So that's the high level or view on how you can go ahead and create EPA but EPA did do it.
So this will conclude this video.
I hope this video had an informative for you and I look forward to see you in the next video.