You can't add modules from Lambda's console. You will have to use a package manager (like npm or yarn) and install the dependencies you need. This means declaring them in package.json and running npm/yarn install before uploading your function to AWS Lambda. A node_modules folder will be generated with all the packaged dependencies inside it. Zip it and upload it.
Your package.json should look something like this:
{
"name": "your-project",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"aws4": "^1.8.0",
"https": "^1.0.0"
}
}
If you want to make your deployment life easier, you may want to take a look into AWS SAM and the Serverless Framework.
Keep in mind that if your package is too large (and too large,for AWS's console is only 2MB 3MB according to the docs) after the dependencies are added you may lose the ability to edit the code inline through AWS's console, which means you'd have to use your own editor/IDE to edit the code before uploading it.