I am working through a lambda course which was done using v8.10. I am trying to use nodejs v10.x since that is what I want to use for my project in the future.
I am
Since node.js v10 aws lambda does not support importing libraries from lambda itself.
from the docs :
A deployment package is a ZIP archive that contains your function code and dependencies. You need to create a deployment package if you use the Lambda API to manage functions, or if you need to include libraries and dependencies other than the AWS SDK.
If your function depends on libraries other than the SDK for JavaScript, install them to a local directory with NPM, and include them in your deployment package. You can also include the SDK for JavaScript if you need a newer version than the one included on the runtime, or to ensure that the version doesn't change in the future.
More about AWS Lambda Deployment Package in Node.js
Update 02/05/2020:
node.js 8.10 is now deprecated, you should use node.js 10 or 12.
https://docs.aws.amazon.com/lambda/latest/dg/runtime-support-policy.html