How can I use axios in lambda?

thedreamsaver picture thedreamsaver · Jan 20, 2018 · Viewed 12.5k times · Source

Do I have to install the axios module locally and then deploy it to lambda or is there a way to do it through the inline code editor as well in the browser?

Answer

oreoluwa picture oreoluwa · Jan 20, 2018

Lambda doesn't actually bundle your package dependencies for you, except the AWS package, so yes you'd need to install it locally, zip it together and upload to the Lambda console.