Video Transcript

Hey, this is Steve with Dabble Lab.  In this video, I’m going to show you how you can really speed up your Alexa Skill Development process using a proxy that will let you make changes to your code locally and test them even if you’re wanting to test with your Echo device without needing to deploy your code each time.  And this is a proxy service and tool set from Bespoken and you can learn more about it and get it from

Actually to get it, it’s just an npm module, so you’ve got to install that first.  I’ve got it installed.  But what you would do is you would do npm install and you want to install it globally and it’s bespoken-tools, like that.  And you probably want to use pseudo.  I needed to just because permissions need to be set to install some stuff but you can give it a try.  Once it’s installed then you’ll use the bst command to work with it.  So this is where we’re going to start.

But what we’re going to do is first we’re going to create a brand new Alexa Skill Project and we’re going to use the Alexa Skills Kit-CLI and we’ll call this bespoken-hello.  We call bespoken-hello.  And so now we have our new skill project.  So if I go over here, here is my Bespoken-hello.  And when you used the ASK-CLI, it’s going to configure it to deploy your local code to AWS by default and we’re going to change that up.

So the way the Bespoken proxy works is they provide you with a URL that is going to proxy through their service back to your local machine.  And so to make that happen, we are going to — what are we going to do here?  Okay.  We’ll go back over here and let me copy this path and go here.  All right.  And then from your code folder where your index file is, you can just run the Bespoken Proxy Service and that is bst proxy and then lambda and then your index file.

So just like that, so bst proxy lambda index.js and let’s see when it responds back so the proxy service is running now and it’s pointing to my local code here.  And I’ve got my public URL that is what I’m going to use to configure my skill and then I’ve got also a URL here for looking at the logs, like, full request.  I’m going to copy that first and go over here and just open up the log with that.  Got it.

And then I’m going to come back over here and I’m going to need this URL here, but I’ve got to make a copy of changes in the default skill project setup.  So when this is setup, my skill here is setup as I was mentioning before to use your local code and to deploy your local code.  So we’re going to, we’re going to change that up.  We’re going to change it up so that the end point uses a URI rather than the source directory, so we’ll change this to URI.  And then also because this URI is not Lambda, we are also going to have to reference the URL to the proxy.  So we’ll go back over here and change the sub here to our proxy URL.

And the other thing that we need to do is reference the SSL certificate type that’s used and I’m going to copy and paste this, but this is what you need here.  So you also need to add this SSL certificate type is wildcard and then you can save that up.  And then there’s one more change in the default skill project and that is in the config file here.  So this whole merge here, emerging the skill manifest APIs, we can get rid of this altogether.  We don’t need that.

All right.  With those changes, I’m ready to deploy.  So now I can — just from here, deploy this using the ASK-CLI.  So I’ll need a new tab and then I can go ask deploy, like that.  And this should deploy it to the Alexa Service or the Alexa Portal, the developer portal and we’ll go check that out in a second.  And it’s building the interaction model right now.

It’s not going to deploy the Lambda, of course, because we changed that up but we’ll, that’s — actually I’m going to pause and come back when this is done because this might take a minute.  So it’s done deploying right now and you can see the message I got back says that no Lambda Function needed to be deployed because I’m using the proxy in the URL there.

So now let’s go check out the developer portal and see what we have here.  So here’s the new skill that was deployed.  This bespoken-hello and invocation name is hello world because I didn’t change that.  That’s the default with the skill project that’s created, but I do need to enable it here for testing.  And let’s see, let’s test it.

Let’s see if we get a response back.  So we get this response back and I’m going to test this also with my Echo.

Steve:  So, Alexa, open hello world.  Alexa, open hello world.

Alexa:  Hello world.

So I have my hello world working.  Now at this point because it’s working through the proxy, if I go in here and make a change to my code, you’ll see I won’t need to redeploy it.  So that’s what I’m doing here.  Let’s make a simple change.  We will change this to say, “Hello world, this is a change that I did not have to deploy.”  So now if I say,

Steve:  Alexa, open hello world.

Alexa:  Hello.

Steve:  Alexa, open hello world.

Alexa:  Hello world.  This is a change that I did not have to deploy.

So there I go.  You can see, now running through the proxy and I can go ahead and code up my skill here without needing to run my ask deploy command every single time to push the code out.  And then what you would do at this point, once you’re done coding is, change your configuration back to deploy your Lambda.  There’s also in the BST tools there’s an option to deploy your Lambda code as well, so you could use that or you could just use the Alexa Skills Kit-CLI to deploy as well.

So that is it.  That is building and testing locally using a proxy service and Bespoken tools.  Hopefully this was helpful.  If it was, please like the video and subscribe to the Dabble Lab channel.  If you have any comments or questions, you can leave those and I’ll reply just as soon as I can.  Thanks so much.