Introduction to AWS SAM CLI Serverless 4


Foo Bar


aws lambda api gateway,aws lambda function,aws lambda tutorial,aws lambda tutorial for beginners,serverless aws,serverless framework,serverless tutorial,serverless web application,aws sam,aws sam tutorial,aws sam introduction,aws sam how to get started,aws sam local,aws lambda,aws api gateway,lambda foobar,aws sample projects,serverless hello world,serverless computing aws,aws sam cli,aws sam cli tutorial,aws sam cli deploy,aws sam cli lambda

hello word and welcome to another episode of fubar in today's video we are going to learn about some key that is kind of a tool but will help you to work on your sound projects so if you're interested to watching more condor or several SQL competing or so for engineer practices in general subscribe to my channel in red button below i post videos every tuesday so let's get started so this is the last video of September on the Sam series but this doesn't mean that is the last video on the series more medias are going to come because there's so many interesting topics to cover about some now that I've been working with it for a while I'm kind of excited to show you those parts and remember to let me know in the comments which parts you want to watch more than others so I can start with those videos so for now this is the last video and what we are going to do is take a look at the some fly that is a tool that will help you to develop your some applications so it will give you different um kind of functionalities to create a server list application very easy test locally your API gay voice your lambdas to check the logs to package your project and to deploy your project to production and things like that and it has many many many other features that we will see in next episodes so the idea of that some flight is that it will help you to develop your applications faster so for example if you can do local testing of your lambdas or your API gateways you don't need to deploy and you can first iterate locally before putting these lambdas on the cloud also with some clean you're able to debug your functions and you're able to check the logs million other things that I think they're really really interesting so in this video I will just show you how to create an application and do very small things but I think this is really great started for like a next set of four or five videos so I hope you're very interested in this now let's go to the code and get started so in order to have alw some in working you have to install the some clean you need to have docker into a Python and you need to have the AWS clean I have everything in my computer so I can move to the next step and that is to install some the instructions in the web page do you really make it for me so I have a Mac and I follow the instructions I leave you in the screen that is pip install the stash user the stash upgrade setup tools then I run pip install the stash user is set underscores at top then PEEP installed - das user - that's upgrade AWS some cream and then I find my Python user base so basically where is my python install and i get that and i add that to my part and i put it in my bash profile so i leave you in the screen all the steps so you can follow them so the steps that were in the indian tation really didn't do it for me but maybe they do it for you so you can go and get started with this so to verify that you have installed it correctly you can done conversion that's just and then you will give you the version so what is to get started first thing we can do is create a new product project and that is some mini tests at runtime and the example it has Python but if we put nodejs you create a no J's project for us so we can open it with Adam and it's inside sum up so let's open that with Adam and see what is in there there is a readme so that's good so we can go directly there and we can see that there is this the files there is an explanation of what these files were generated for us so the instruction file is the readme hello world is where the lambda function code is app.js is to learn the function code nodejs is the dependency files test the unit tests and there's an example and then we have the some template that is outside and there you can find in the template GML one function and it has the one API that is in the path hello get and it has one environment over all per value there it kind of show you how to thinks but I think it's kind of weird and but the cool thing is that it shows you where in the github to find the information about this so you can go and check and then it has the up Jes and the method is there and I know it's just very weird example is checking the IP for an URL and I don't know this is really weird example for a hello world for a starters maybe I would put something simpler so yeah and the test handler has an example on a unit test so for me this was not very helpful so let's move to the next thing let's go to usage so there we can see things that we can do with the some click I can invoke functions locally we can run automated tests for your lambdas function locally we can actually write sample events we can run API Gabriel locally we can develop applications we can fetch tail and filter functions looks and we can validate some templates and we deploy and package to lambda so I will lose some of these things in this video and our face will come in future video so I will show you how to run your API game locally I will show you how to fetch the looks I will show you how to validate some template and how to package and deploy to lambda but I think the testing and debugging deserves their own special video so I will not get into it now so let's see how to run API gave a locally some local start API Taron super simple this starts a local server in our machine you need to have the curse running for this so don't forget that oops error maybe we should install this application first I will cancel my server I will quit it and I will run NPM install of my application first and then we can start a server again good so now let's see hello good so one thing that you can do after you have it start the server you can change anything in your hand large areas or in your code and it will update automatically without you needing to refresh the server so that's really cool and if you change something in your template yeah Mel you need to start on server again but it happens very fast so that's very cool the next thing we can do is to validate the some template and for that we run some validate that's just template and the name of the template that in this case is template demo and this does very weird thing it validates everything does has template on it and it gives a lot of errors in weird places so I still don't know what it's doing I know that some clay is on a better but it does weird things the next thing we want to do is the package and deploy this into lambda so we just run some package and basically it's exactly the same and when we do the AWS package no magic there so it just changed some to AWS it doesn't help you much and then we can either run AWS Confirmation deploy as we have done or then we can run some deploy and it has the same things that the AWS CloudFormation deploy has so you just say the CloudFormation word it doesn't really help you much so it does exactly the same it applauds it to is free and then it deploys the file that you put in s3 into cloud formation and it creates stocks for you and i can go and check the stock and we can see in the stock we have the function and we have the API we can get the from the stages we can get the order and we can code this API good the next thing we want to do is we're going to get the logs so we are going to use that some logs the name of the function and then the name of the stack and that will bring us the logs in the console that's pretty handy and like that functionality a lot with solace framework and you can also tell the logs so whenever you have new things coming they will just appear and I think that's super handy and I like that feature a lot it's always convenient to have it the last thing we are going to do is to delete the stock I could not find something for the didn't stock so I'm using the AWS clip for it and that's it this was the video for today I hope you liked it if you did give a big thumbs up and if you have anything you want to see from some don't forget it to let me know in the comments what are those topics I really want to keep on making videos out some I'm really excited and learn starting to learn it and I hope you enjoy this series as much as I did making it around here there are other videos from my channel for you to watch so go ahead and click and if not I see you in the next episode of fubar