‫Last thing I wanted to show you is really
‫the power of using SAM.
‫So our SAM file was quite simple.
‫Remember just YAML, a few lines of code.
‫But the CloudFormation, I want to show you
‫how complex it is.
‫If you click on the hello-world-sam
‫and you can see that there was creating
‫so many resources for you, created a few outputs,
‫or no outputs for this one, obviously,
‫because we haven't specified it.
‫Generate a bunch of events, you know,
‫you could go all the way to looking at what the template is,
‫which is, here is the original templates, okay?
‫Which was pretty simple.
‫And then the process template is, can be huge.
‫And so if we have a look, we can go ahead
‫and do other actions.
‫View/Edit in Designer,
‫and so in CloudFormation designer
‫we basically get to see how much was created by SAM.
‫And so as we can see right here, if we scroll back,
‫we see that a lot of things were created.
‫There was an API gateway, there were some permissions,
‫some Lambda function, a role, and a DynamoDB table.
‫All of this was generated automatically
‫by CloudFormation for you and the Serverless framework.
‫Obviously, it can be even more complicated
‫if you want it to, but it just gives you an idea
‫of how easy the management of your Lambda function
‫and your gateway and your APIs is using SAM.
‫And I think that's what AWS wants you to understand
‫before you prepare the exam,
‫is that SAM is really the one way to deploy
‫your Lambda function on to AWS and that it
‫automates a lot of the trouble for you,
‫and that you have to use CloudFormation
‫to do package and deploy.
‫That's it, the last thing I wanted to show you
‫is that if you go to the Lambda management console,
‫let's go back to another region,
‫I want to go to my North Virginia one region,
‫because I know in the UI it is there.
‫If I create a function, right here I go to my dashboard
‫and create a function, we can see that there's the
‫third option called the Serverless Application Repository.
‫And so this is actually a bunch of SAM templates
‫created by a lot of people and you can
‫look through and see whatever these people have created.
‫But if we go to hello-world, there must be a hello-world,
‫there is a hello-world right here.
‫And so if we go to hello-world-python we click on it,
‫we get to see the source code,
‫we get to see the template which generates this
‫and we see this is a Serverless function
‫that gets generated.
‫And there is a Transform of Serverless,
‫so this is a SAM template and so on.
‫So you're able to see a lot of different SAM templates
‫created by other people.
‫And if I go right back down,
‫there are over 350 applications in there.
‫So whatever SAM template you want to create,
‫probably you can find an example in here.
‫So I hope that was helpful,
‫I hope that was a good overview of how SAM works,
‫and I will see you in the next lecture.