Book Image

Mastering AWS Lambda

By : Yohan Wadia, Udita Gupta
Book Image

Mastering AWS Lambda

By: Yohan Wadia, Udita Gupta

Overview of this book

AWS is recognized as one of the biggest market leaders for cloud computing and why not? It has evolved a lot since the time it started out by providing just basic services such as EC2 and S3 and today; they go all the way from IoT to Machine Learning, Image recognition, Chatbot Frameworks, and much more! One of those recent services that is also gaining a lot of traction is AWS Lambda! Although seemingly simple and easy to use, Lambda is a highly effective and scalable compute service that provides developers with a powerful platform to design and develop Serverless event-driven systems and applications. The book begins with a high-level introduction into the world of Serverless computing and its advantages and use cases, followed by a deep dive into AWS Lambda! You’ll learn what services AWS Lambda provides to developers; how to design, write, and test Lambda functions; as well as monitor and troubleshoot them. The book is designed and accompanied with a vast variety of real-world examples, use cases, and code samples that will enable you to get started on your Serverless applications quickly. By the end of the book, you will have gained all the skills required to work with AWS Lambda services!
Table of Contents (11 chapters)

Recommendations and best practices

To start off, here are a few simple recommendations when it comes to working with the Serverless Framework:

  • Use sls deploy <functioname>: Although seemingly straight forward, sls deploy and sls deploy <function_name> have a lot of difference between them and knowing what command to use when can significantly improve the time it takes to deploy your applications. For starters, running the sls deploy command redeploys the entire CloudFormation stack from the ground up, so each time you run this command, CloudFormation will tend to go through the entire resource list for your application. This can be time-consuming if you have a complex application using a lot of AWS resources. On the other hand, sls deploy <function-name> simply packages and uploads your code to a new Lambda function without changing any of the other AWS resources...