AWS Events

Have questions?

Head over to the forums to search for your questions and issues or post a new one.

Edit on github

#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.

    handler: mySkill.handler
      - 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.

    handler: mySkill.handler
      - 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.)