In this article, we are going to learn to deploy serverless applications to the AWS Cloud using the AWS SAM CLI. This article is a part of the three-article series “Develop and Deploy Serverless Applications with AWS SAM CLI”. If you have some idea about how to develop and test your serverless applications locally using the AWS SAM CLI, then you might proceed with this article. However, if you want to learn more about developing and running your code locally, I would strongly recommend reading the previous articles of this series, Getting started with the AWS SAM CLI and Set up a local serverless environment using the AWS SAM CLI, which explains in detail the various configurations required to start and run the serverless functions on your local.
Although you might be following all the articles in the series from the beginning, I would like to take a moment and just revise a few of the key points that are extremely important for deploying the functions to the AWS Cloud, and we will be using those for this tutorial.
First of all, we have learned about the AWS SAM CLI and the workflow that the SAM uses to develop and deploy serverless applications to the cloud. We have seen what the benefits are of using the SAM CLI as opposed to developing our code directly on the AWS Lambda using the online code editor provided by the AWS Management Console.
In the second part of the series, we have learned how to set up a local development environment of a serverless application using Visual Studio Code and how to create AWS Lambda Functions using the pre-built templates provided by the AWS SAM. We have also learned to add our own lambda functions in the template and configure the YAML file that we will use to create the deployment package. Finally, I have demonstrated how to run and test the lambda function locally both by triggering the function individually as well as by simulating the API Gateway in the local machine.
#aws #serverless