We love the Serverless Framework, and use it with our own internal development.
However, as much as we love it, we knew at least one thing it was missing: the Bespoken proxy.
But not anymore - now with our plugin, you can develop and test your AWS Lambdas developed with Serverless locally. Send HTTP requests and responses directly to your laptop while you’re developing, no deployment required.
Why Do I Want This?
Serverless development is awesome, but it has at least one significant hurdle:
How do you debug and test your functions locally pre-deployment?
Obviously hand-crafting JSON files to send to your service locally is one solution, but this is time-consuming and only a facsimile of a real interaction.
Our plugin for the Serverless framework overcomes this problem. We create a tunnel from our server to your machine, making it accessible for testing:
How Do I Set It Up?
Install our plugin with your project via npm:
npm install serverless-plugin-bespoken --save
And add the plugin to your serverless.yml file:
plugins: - serverless-plugin-bespoken
And then, kick it off like so:
sls proxy --function myFunctionName
Watch this quick demo to see how easy it is to run the proxy, and send it a simple GET request from the browser:
That’s it - now you can develop and test locally with ease!
What Is Next?
We are looking at a deeper integration of our toolkit with Serverless, including our:
- Speak and Intend commands
- Logging and Monitoring Dashboard
- Testing and Validation tools for Alexa and Google Assistant