In this section, we will explore what more we can do using the Serverless Framework.
Going beyond the basics
Using npm packages
When you use the Serverless Framework to deploy your Lambda function, it creates a ZIP file with everything that is inside your project folder. If you need to use a module that is not a Node.js core module or the AWS SDK, you just need to use Node's default workflow to add dependencies.
Take a look at the following steps:
- Create a package.json file to store your project dependencies and use npm install <your-module> --save to download your required module.
- With the node_modules folder inside your project directory, the ZIP file will be deployed to AWS with the necessary dependencies.
- In...