How to use nodejs request module inside AWS Lamda Edge function

18 Views Asked by At

I am developing a Lamda@Edge function and I want to use nodejs request module inside my function code.
I added the dependency in code like this
const reqObj = require('request')

But when I test the function I get error saying not able to find request module.
I know there are options like using layers or uploading a zip package for function but both options are not working for Lamda@Edge function because
  • Layers are not support for Edge functions
  • With zip package the size is exceeding the allowed size for Edge function although I have just zipp request module along with default nodejs modules.

Is there any way I can use request module or any other module to make http call which is available by default in AWS Lamda runtime?

0

There are 0 best solutions below