-1

I have AWS Lambda Function(index.js) written in Node.js which has external dependency on other npm packages, when i try test the lambda function i have to zip the file and the node modules which is time consuming. Please help in finding a way to execute the function locally.

Thanks

Anu Abraham
  • 171
  • 1
  • 2
  • 12

3 Answers3

2

https://www.youtube.com/watch?v=71cd5XerKss this link will help you to execute lambda function from local system

Anu Abraham
  • 171
  • 1
  • 2
  • 12
1

I can see the advantages of local testing. Take a look at these open source projects:

  1. lambda-local: test Lambda functions on your local machine with sample event data
  2. emulambda: a Python wrapper that emulates the AWS Lambda API locally

Also see this Stack Overflow post: How to test aws lambda functions locally.

jarmod
  • 71,565
  • 16
  • 115
  • 122
0

Our command-line tool, bst proxy, does exactly what you are looking for: https://bespoken.tools/blog/2016/08/24/introducing-bst-proxy-for-alexa-skill-development

It will make your lambda code accessible via URL, which you can then test with yourself or use with a real Alexa device. To use it, you install bst with npm:

sh
npm install bespoken-tools -g

And then run it:

bst proxy lambda index.js

You can then use the URL that is printed out to test away.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
John Kelvie
  • 858
  • 1
  • 7
  • 16