And welcome in today's video, we'll be discussing about it, you see him now, S.A.M. is also referred
to as Serverless application model, and it is just like an extension to cloud formation, which is
generally used for building Cerveris applications in A-levels.
Now, basically, we can make use of some to define Serverless application in simple and clear syntax.
So this is a nice little diagram from the documentation that I took all credit to them.
So this is the set.
So basically you can define Sam in Dewson as well as the format.
Now then you can use them to build templates that define your Cervalis application.
So it might be big.
It can also be Lamela function and others, and you can deploy the same template with the help of either
cloud formation.
So very simple thing.
You write your design templates based on all this on Oyamel damage based on site, and you just deployed
with the help of the chloroform issue.
Now there are two important steps that you need to remember during this process.
First one is that you create the same template.
It can be either Dewson or Yaama that defines the Lambda API Gateway or other that you need for us as
well as application.
Then once you create the same template you are uploading, deploy your application with the help of
some select.
No one important part to remember is that whenever you're deployed, so during their deployment, time
automatically translates the application specifications into the cloud formations.
And so this is the basics on what Sammis?
So let's do one thing.
Let's go to the practical aspect and look at how exactly it would work.
So I have created a directorate where I have populated all the commands that you would need to practice
this.
So it really becomes easier for us to understand.
So whenever you deploy, I remember that Sam needs to be installed.
So that is a separate package that you need to install in the ceiling.
So what I do, I'll have it on Anatomies Machine and we'll be deploying all the commands there.
So let's do one thing.
I'll just copy the first command and I have a server connected.
I go ahead and I'll execute the first command.
So basically this is going ahead and installing all the relevant packages which would be required for
them to be working technically perfect.
So now all the packages seems to be installed perfectly.
So one thing that I like to do is I'll jump to the third command, which is installed.
Basically, this is installing the either Bluestem SEAL package.
So I'll go ahead and tear the screen and install this package.
Perfect.
So my package has been installed successfully in case in case a certain amount of time you get a certain
error related to it.
So you can Branda Turkoman, the second command, in fact, which is by 27 Vanderveldt, depending upon
the Python version that you have.
So this is as an option in case it does not work.
So I just dagget as optionally so it does not confuse perfect.
So now that we have the basic things in store, we'll look into the to fight one this index dodgiest.
So this is basically a notice based Helliwell type of function.
So this is something that you generally use in your lamda.
And then it's important that we were referring to in the same is the template that wireman.
So this is a template of some.
Now if you'll see one additional parameter that you would generally not find is that transform?
So this is the transform of surveillance plane and within the cloud formation resource type, you have
Idalis serverless function.
You have a handler as a next door handler.
So this is generally referred to your handler that you're defined within the core.
And then the runtime is not just that we have already specified.
You're already also specify the memory size, which is 120 Lamby as well as the.
So these are the two important part that you will need to build your.
So let's do one thing.
I'll copy the template that women and within my so I agree to directly call, I said let me go to the
and directly I say template requirement and I copy the Cordia.
Along with that I copy one more code, which is index dodgiest, which is my function.
Let me Kopitar and I'll save this.
So now we have to face one index or do things like this template that wireman.
Now if you look into the PowerPoint presentation, the first step was creating a template which was
basically a I know yaml that defines the Lambda API or others.
Now we already have a Yamal template and we have a lambda function.
But it is referring to the next part is that we have to test, upload and apply application using Santilli.
Now, one part to remember is that whenever you deploy, it goes to the S3 bucket.
So the deployment package is stored in the S3 bucket and from there it is delivered via the cloud formation.
So let's do one thing.
I have a command that so these are the three commands that will be executing.
Now, the first Gummo that we need to execute is the creation of a three bucket.
So this is very important because once you package, because once you do the deployment, this will
be in form of package which gets stored in a stream.
So let's create a simple S3 bucket first.
So the first thing that you need to do is you'll have to basically create a sample bucket so we can
quickly do it is three.
I do it and it stands for me.
Bucket and I'll run Gabey Labs hyphen S.A.M..
So this is the S3 bucket that we want to create and it has basically created the Epilepsia as the bucket.
Now the deployment package will be stored within this specific S3 bucket.
Now the next thing that we need to do is basically we have to package the application.
So basically you do some package you have for the template file with this template.
Dot Wireman, you ready for the output template file.
But is serverless hyphen output that women and you referenced the S3 bucket where your package will
be stored.
So I quickly copied this up.
Let me paste it.
But before that I'll just quickly show you a list.
There are only two files which are available right now, so once you basically execute this Gummo.
You will see that it is uploading a package to a Strathbogie, and it has also created a sartorialist
over output, not Wireman.
So let's quickly look into the books.
So this is a separate epilepsia, Heaven-Sent, and you would see that I have a package which is already
uploaded.
So this package is uploaded through some.
Now, the next thing that you need to do is that you'll have to deploy this specific package.
So first that was that you create a package where you reference the template, go to Ironmen and the
output template, filicide type one output document.
Now, this SERVERLESS hyphen output, not Bayamon, if we quickly open this up.
So, yeah, so this is a cloud formation template.
So you're one thing that has really changed is the CORDERA.
So here you have the kuduro with specific S3 bucket and it also contains the name of the package which
is supposed to be deployed.
So basically it is like converting to a cloud formation template that is done within this specific file.
So once we have this file, the next thing that we need to do is we have to deploy the actual cloud
formation stack so you can have this command.
So as it is saying, it is asking us to execute the following command to deploy that package template
file.
However, it will be doing the recommended way, which is the same deploy one.
So you have some deploy, you have the template file server, let's have an output document.
You have this stack and you have the capabilities with this capability.
And so let me quickly run this specific command and I present.
So capability I am is quite important to remember because otherwise your function will fail to deploy.
So what it is doing is that it is creating a cloud formation stack.
So if we can go to the cloud formation.
So you see a of escape lives, I haven't seen him, haven't they?
More is being created.
So let's us quickly wait for a minute.
Perfect.
So it's successfully created a we activities.
Keep seeing my friend Daymo.
So now if we click refresh it says to create complete.
No idea.
What should happen now is that our lamda should have a function that we had designed.
So you would see that there's a cape type A, I say my friend Daymo Ivan Hollowell function.
So this is the function which God created through the cloud formations that so do remember, at least
for the example, that for some specific packaging there are two important steps that you need to do.
First is you have to package the actual file.
So this package goes to S3 and once you have the S3 package available, you do assembly plant based
on the Cervalis, have an output to identify, which comes from the first command.
So this overlays have an output requirement, basically contains a cloud formation compatible Yamal,
which contains the link, which is a conduit to the S3 package which needs to be deployed.
So this is it about the AWB stamp and this is all you need to remember for the certification exams as
well.
So this will continue to be do I hope this has been informative for you and I look forward to see you
in the next few days.