Friday, May 13, 2016

Last Thing to Do Before Publishing An Alexa Skill Hosted In Lambda

If you develop a skill for Amazon'z Echo and use the AWS Lambda service to host your skill, there is something you should do before you submit your skill for certification.

Publish a New Version and update your skill to use that version.

You'll notice that the ARN changes for this new version.  This is the ARN that you'll want to update your Skill to use.  The reason that you should use this version, is because it is Read-Only and matches the code that you've spent all the time developing and debugging.

I also suggest giving this version an alias.  You'll notice that assigning an alias also changes the ARN, so I recommend using that alias ARN in your skill.

The main reason for a versioned ARN is to make it easier to work on the next version, without accidentally breaking your current live version.

You may notice that if you find a bug after you publish your skill this way, there is no way to change that code since it is in a read only version.  You can only update the $LATEST version.  But that isn't the one that your Alexa skill is referencing.  But, if you aliased your version and pointed your skill to use the alias named ARN, then you can:
  1. Publish a new version of the fixed $LATEST code
  2. Remove the alias from the old version
  3. Assign the new version that alias name
  4. Set the Event Source to Alexa Skills Kit (that setting doesn't seem to copy with new versions/aliases)
Now your skill is referencing the new bug-fixed version.

No comments:

Post a Comment