A customer enables a smart home skill in the Alexa app, links it to their account with a device cloud and discovers devices associated with that account.
Then, when Alexa hears a customer request like, "Alexa, turn the kitchen light to 50 percent", or a customer makes change to a light setting in the Alexa app, Alexa recognizes the customer intent to change a setting on a specific device. Alexa uses this information to create a message called a directive. This directive contains customer authentication information, an identifier for the device, and the new setting value. Alexa knows to send this message to the smart home skill that controls the light. As a smart home developer, you receive and parse this message in code hosted in AWS Lambda, a compute service offered by Amazon Web Services (AWS), and pass it to the specified device in your device cloud. You respond with a message called an event and indicate the request was successful or not. You have the option of sending the event synchronously from the Lambda function or asynchronously from the device cloud. Alexa uses the information in the event to respond to the customer that made the request.
In addition to supporting voice requests, the API also enables you to easily provide updates when the state of a device changes. This means customers can see an up-to-date status and control their devices from the Alexa app. For example, a customer can use the Alexa app to check the temperature of their home or turn off their lights.
To support these customer scenarios, this API has the following features: