반응형
블로그 이미지
개발자로서 현장에서 일하면서 새로 접하는 기술들이나 알게된 정보 등을 정리하기 위한 블로그입니다. 운 좋게 미국에서 큰 회사들의 프로젝트에서 컬설턴트로 일하고 있어서 새로운 기술들을 접할 기회가 많이 있습니다. 미국의 IT 프로젝트에서 사용되는 툴들에 대해 많은 분들과 정보를 공유하고 싶습니다.
솔웅

최근에 받은 트랙백

글 보관함


Here I am going to develop an Alexa skill for my own, customized based on 3 articles below.  


1. Fact Skill Tutorial

2. Fact Skill Blog

3. Section 2 of Alexa - A Free Introduction in Cloud Guru


Alexa will answer about the place(s) where I lived.


You can get the source codes of Alexa - A Free Introduction here.

https://github.com/ACloudGuru/alexacourse


I am going to modify index.js file of 1_spaceGeek.


* Modify var FACTS


* Modify AMAZON.HelpIntent


* Modify handleNewFactRequest() function


* zip the AlexaSkill.js and index.js as placeLived.zip



We are now starting to develop 'Amazon Skill' in earnest.

Amazon Skill development can be divided into two parts: skill service and skill interface.







* Skill Service



first access to aws.amazon.com to develop Skill Service.




1. Create a Role


IAM -> Roles -> Create New Role 



Select AWS Lambda.

Select AWSLambdaBasicExecutionRole and Click on Next Step button.




Enter any name for the Role and Click on Create Role button.




Now you have created a new role.




Now I am going to create a Lambda function.


Click on the cube image on top left to go to landing page of AWS services. and Click on Lambda -> Create function button.



Click on Author from scratch button.




Select Alexa Skills Kit for the Lambda



Click on Next button.



Enter Name and Description. And then select Upload a .ZIP file from Code entry type dropdown menu.




Upload the placeLived.zip file.

Next step is Select Choose an existing role from Role dropdown menu.

And select the created Role (placeLivedRole) from Existing role dropdown menu.



And then Click on Next button -> Create function button.



I've created a Lambda function for my skill.


Now it's done for Skill Service development.

I am going to develop the Skill Interface part.

The ARN information will be using when develop the Skill Interface.





* Skill Interface


To develop Skill Interface, Go to developer.amazon.com.


Go to ALEXA tab and Select Get Started button in Alexa Skills Kit.




Click on Add a New Skill button.





Enter Name and Invocation and Click on Next button.




Copy and paste this code to Intent Schema.

(This code is in IntentSchema.json of the source files.)


{

  "intents": [

    {

      "intent": "GetNewFactIntent"

    },

    {

      "intent": "AMAZON.HelpIntent"

    },

    {

      "intent": "AMAZON.StopIntent"

    },

    {

      "intent": "AMAZON.CancelIntent"

    }

  ]

 }


Enter Sample Utterances




Click on Save button. - It will build this skill.

Click on Next button once it is built.


Now I need to copy ARN from aws.amazon.com and paste it in to Global Fields in developer.amazon.com.

So I can make a connection between Skill Service and Skill Interface of mine.


Select AWS Lamda ARN -> North America and paste it into North America text field.



Click on Save and Next button.


Now it is completed.


To test, enter any utterance and click on Ask Places Lived button.













반응형

Comment