Skip to content

Latest commit

 

History

History
54 lines (40 loc) · 2.36 KB

alexa-skill.md

File metadata and controls

54 lines (40 loc) · 2.36 KB

Alexa Skill

Event definition

This will enable your Lambda function to be called by an Alexa Skill kit. amzn1.ask.skill.xx-xx-xx-xx-xx is a skill ID for Alexa Skills kit. You receive a skill ID once you register and create a skill in Amazon Developer Console. After deploying, add your deployed Lambda function ARN to which this event is attached to the Service Endpoint under Configuration on Amazon Developer Console.

functions:
  mySkill:
    handler: mySkill.handler
    events:
      - alexaSkill: amzn1.ask.skill.xx-xx-xx-xx-xx

You can find detailed guides on how to create an Alexa Skill with Serverless using NodeJS here as well as in combination with Python here.

Enabling / Disabling

Note: alexaSkill events are enabled by default.

This will create and attach a alexaSkill event for the mySkill function which is disabled. If enabled it will call the mySkill function by an Alexa Skill.

functions:
  mySkill:
    handler: mySkill.handler
    events:
      - alexaSkill:
          appId: amzn1.ask.skill.xx-xx-xx-xx
          enabled: false

Backwards compatibility

Previous syntax of this event didn't require a skill ID as parameter, but according to Amazon's documentation you should restrict your lambda function to be executed only by your skill.

Omitting the skill id will make your Lambda function available for the public, allowing any other skill developer to invoke it.

(This is important, as opposing to custom HTTPS endpoints, there's no way to validate the request was sent by your skill.)