Slides for my talk: Build an Alexa skill with .NET Core and AWS Lambda
This project contains a simple Hello World skill for Alexa. It's written in C# using the Alexa.NET library and intended to be deployed as a Lambda function.
Follow these steps to try it out yourself:
Sign in to developer.amazon.com and click on Alexa. Create a new skill using the Alexa Skills Kit.
The skill name and invocation phrase can be anything you want. Use the intent schema and sample utterances from this repo for the interaction model.
First, clone and build the project:
git clone [email protected]:nbarbettini/AlexaHelloWorld.git
cd AlexaHelloWorld
dotnet restore
dotnet build
Then, use dotnet lambda
to deploy the function:
cd src
dotnet lambda deploy-function -pcfg true
The script will prompt you to select an IAM role (pick New Role) and a policy (pick the BasicExecutionRole policy). When it's done propagating, you should see New Lambda function created
.
Log into the Lambda console and open the new function you deployed. Add a trigger from Alexa Skills kit, and copy the function ARN from the top right of the page.
Switch back to the Alexa Developer console and select the option to use Lambda as the service endpoint for the skill. Paste the ARN of your Lambda function.
Send the say hello world
utterance with the Service Simulator. You should see a response from your Lambda function:
If you used the same email address for the developer console as you did when you logged into Alexa on your device, you can test the skill live on your device, too!