Alexa-Hosted Skills and the ASK CLI

Dabble Lab has published another great tutorial video showing how to use the ASK CLI with Alexa-hosted skills. You will learn how to create a skill from your local machine and deploy it to the remote Git repository that Alexa provides for its users. You will also learn how to deal with merge conflicts with edits made locally as well as in the hosted IDE (Integrated Development Environment) that is available in the Alexa Developer Console.

One interesting note, however, is that it looks like Amazon Alexa does not allow users to access the repository that it hosts for us. You can concatenate the host and path values that are inside the .ask/config file to create a URL where the hosted code lives.

However, once you are there, an authentication modal pops up. You would think that you could use the username and password parameters in the .ask/config file and then get access. I found that these credentials do not work as you would expect; instead, we receive a 403 status code from the server with some XML:

<AccessDeniedException>
  <Message>Invalid request</Message>
</AccessDeniedException>

This usually means that we are missing some credentials or headers or that we cannot access this from a web browser.

On the Amazon Developer forums, a user posted a question back in March that still remains unanswered: https://forums.developer.amazon.com/questions/202024/alexa-hosted-sets-up-a-codecommit-repository.html. I will keep an eye on this thread and see if it ever gets answered. In general, the Alexa Developer forums have a lot of hanging questions that don’t get answered. Hopefully, the Amazon Alexa team gets around to this and helps us make our skills even better.

You may be asking why I would want to have access to the CodeCommit repository. The simple answer is that I would like to use a CI/CD (continuous integration/continuous deployment) server like Jenkins to increase the code quality and velocity of my projects. With Jenkins, you can create a pipeline or project that will run tests to ensure that your users never have to experience buggy code out in production.

Anyway, make sure to watch the video and learn more about the ASK CLI in regards to an Alexa-hosted skill. Dabble Lab has been putting out some great content, make sure to like and subscribe to their channel to stay up to date on the latest Alexa development tips, tricks, and tutorials.

Until next time, happy coding!