SlideShare a Scribd company logo
1 of 62
Download to read offline
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Hidetaka Okamoto
Digitalcube / JAWS-UG
How to develop Alexa Skills Kit
based on Serverless Architecture
H i d e t a k a
O k a m o t o
• Digitalcube Co. Ltd.
• JAWS-UG Kyoto, Kobe
• WordCamp Kyoto 2017
I’ll introduce…
• Alexa Skills Kit can easy to make voice application
• AWS Lambda help you to create the Skill more easier
• Serverless Framework can manage your app code
• Node.js is good for making Alexa Skill
AGENDA
1. What is Alexa & Alexa Skills Kit ?
2. How to develop the Alexa Skill
3. How to test & deployment your Skill
What is Alexa
And Alexa Skills Kit
How to develop Alexa Skill Kit based on Serverless Architecture
Alexa is…
• The voice service that powers Amazon Echo
• Can interact with devices using voice
• Can build new voice experiences
https://developer.amazon.com/alexa
How to develop Alexa Skill Kit based on Serverless Architecture
https://developer.amazon.com/alexa-skills-kit/
Alexa Skills Kit (ASK) is…
• Can build engaging skills more easily.
• Collect APIs, tools, docs, examples.
• Can leverage Amazon’s knowledge of voice.
https://developer.amazon.com/alexa-skills-kit
Alexa Skills Kit documentations
• Webinars
• Training videos
• Developer blog
• Podcast
• Events
• and more…
https://developer.amazon.com/alexa-skills-kit/learn
Alexa Skills Kit examples
https://developer.amazon.com/alexa-skills-kit/tutorials
Published our custom Skills
https://www.amazon.com/Digitalcube-Inc-Shifter-man/dp/B07572D7N8/
Shifter man skills is …
• Talking about our service
• Speech out our blog content
• Source code is open.
• https://github.com/getshifter/alexa-shifterman
Check point
• Alexa is the voice service
• Alexa Skills Kit helps us to create App easily
• We can easy to create & deploy App by AWS
How to develop the Alexa Skill
A u d i o
C a p t u re
A u d i o
P l a y b a c k
C a l l s o m e A P I
Ta l k
s o m t h i n g
R e s p o n c e
S p e e c h t o
Te x t
Te x t t o
S p e e c h
A u d i o
C a p t u re
A u d i o
P l a y b a c k
C a l l s o m e A P I
Ta l k
s o m t h i n g
R e s p o n c e
S p e e c h t o
Te x t
Te x t t o
S p e e c h
A l e x a S k i l l s K i t
A u d i o
C a p t u re
A u d i o
P l a y b a c k
C a l l s o m e A P I
Ta l k
s o m t h i n g
R e s p o n c e
S p e e c h t o
Te x t
Te x t t o
S p e e c h
AW S L a m b d a
We b A P I
A l e x a S k i l l s K i t
AWS Lambda is great Alexa’s backend
https://aws.amazon.com/lambda/
Lambda get JSON from Alexa Skills
{
"request": {
"type": "IntentRequest",
"requestId": "",
"intent": {
"name": "AskPriceIntent",
"slots": {}
},
"locale": "en-US",
"timestamp": "2017-08-29T08:26:02Z"
},
"context": {
"System": {
"application": {
"applicationId": "amzn1.ask.skill.XXXXXXXX"
},
"user": {
…
Lambda should return valid JSON
{
"version": "string",
"response": {
"outputSpeech": {
"type": "string",
"text": "string",
"ssml": "string"
},
"card": {
"type": "string",
"image": {
"smallImageUrl": "string",
"largeImageUrl": "string"
}
…
Alexa has SDK (Node.js)
https://www.npmjs.com/package/alexa-sdk
npm init -y
npm install -S alexa-sdk
We can easy to write Alexa code
'use strict';
const Alexa = require('alexa-sdk');
const handlers = {
'LaunchRequest': function () {
this.emit(':tell', 'Hello');
},
};
module.exports.hello = (event, context, callback) => {
var alexa = Alexa.handler(event, context, callback);
alexa.registerHandlers(handlers);
alexa.execute();
};
'use strict';
const Alexa = require('alexa-sdk');
const handlers = {
'LaunchRequest': function () {
this.emit(':tell', 'Hello');
},
};
module.exports.hello = (event, context, callback) => {
var alexa = Alexa.handler(event, context, callback);
alexa.registerHandlers(handlers);
alexa.execute();
};
We can easy to write Alexa code
L o a d a l e x a - s d k
'use strict';
const Alexa = require('alexa-sdk');
const handlers = {
'LaunchRequest': function () {
this.emit(':tell', 'Hello');
},
};
module.exports.hello = (event, context, callback) => {
var alexa = Alexa.handler(event, context, callback);
alexa.registerHandlers(handlers);
alexa.execute();
};
We can easy to write Alexa code
L o a d a l e x a - s d k
D e f i n e re s p o n s e
'use strict';
const Alexa = require('alexa-sdk');
const handlers = {
'LaunchRequest': function () {
this.emit(':tell', 'Hello');
},
};
module.exports.hello = (event, context, callback) => {
var alexa = Alexa.handler(event, context, callback);
alexa.registerHandlers(handlers);
alexa.execute();
};
We can easy to write Alexa code
L o a d a l e x a - s d k
D e f i n e re s p o n s e
E x e c u t e a p p l i c a t i o n
tell or ask
alexa.emit(
‘:tell’,
‘Talk something, and end session’
);
alexa.emit(
‘:ask’,
‘Talk something, and wait user input’,
‘and ask again’
);
Can call another API (like WP API)
https://github.com/getshifter/alexa-shifterman/blob/master/index.js#L44-L67
Many Skills examples in GitHub
• https://github.com/alexa/
• “step-by-step” help us to know how to deploy
• All example has comment (How to customize)
• We can easy to create own Alexa Skills
How to develop Alexa Skill Kit based on Serverless Architecture
How to test & deployment
your Skill
Easy to create Alexa Skills, but We want to …
• Test our code in local environment
• Deploy our code automatically
• Manage our resources in AWS.
Easy to create Alexa Skills, but We want to …
• Test our code in local environment
• Deploy our code automatically
• Manage our resources in AWS.
Alexa Conversation: Tests for your Alexa skills
https://www.npmjs.com/package/alexa-conversation
npm install -g mocha
npm install --save-dev alexa-conversation
We can easy to test own Alexa code
const conversation = require('alexa-conversation');
const app = require('../index.js');
const opts = {
name: 'Alexa Shifter man',
appId: 'your-app-id',
app: app,
handler: app.hello
};
conversation(opts)
.userSays('GetNewFactIntent')
.plainResponse
.shouldContain("Here's the shifter")
.end();
We can easy to test own Alexa code
const conversation = require('alexa-conversation');
const app = require('../index.js');
const opts = {
name: 'Alexa Shifter man',
appId: 'your-app-id',
app: app,
handler: app.hello
};
conversation(opts)
.userSays('GetNewFactIntent')
.plainResponse
.shouldContain("Here's the shifter")
.end();
L o a d l i b & t e s t t a rg e t
We can easy to test own Alexa code
const conversation = require('alexa-conversation');
const app = require('../index.js');
const opts = {
name: 'Alexa Shifter man',
appId: 'your-app-id',
app: app,
handler: app.hello
};
conversation(opts)
.userSays('GetNewFactIntent')
.plainResponse
.shouldContain("Here's the shifter")
.end();
I n i t t e s t
L o a d l i b & t e s t t a rg e t
We can easy to test own Alexa code
const conversation = require('alexa-conversation');
const app = require('../index.js');
const opts = {
name: 'Alexa Shifter man',
appId: 'your-app-id',
app: app,
handler: app.hello
};
conversation(opts)
.userSays('GetNewFactIntent')
.plainResponse
.shouldContain("Here's the shifter")
.end();
I n i t t e s t
D e f i n e t e s t
L o a d l i b & t e s t t a rg e t
Running test by mocha
$ m o c h a t e s t s
E x e c u t i n g c o n v e r s a t i o n : H e l l o A l e x a Te s t
✓ F i n i s h e d e x e c u t i n g c o n v e r s a t i o n
C o n v e r s a t i o n : H e l l o A l e x a Te s t
U s e r t r i g g e r s : H e l l o I n t e n t
✓ A l e x a ' s p l a i n t e x t re s p o n s e s h o u l d c o n t a i n : H e l l o . I ' m e x a m p l e s k i l l s
f o r y o u r s e r v e r l e s s p ro j e c t s .
✓ A l e x a ' s p l a i n t e x t re s p o n s e s h o u l d c o n t a i n : P l e a s e t e l l m e y o u r
n a m e .
U s e r t r i g g e r s : N a m e I n t e n t S L O T S : { N a m e S l o t : Ts u y o s h i }
✓ A l e x a ' s p l a i n t e x t re s p o n s e s h o u l d c o n t a i n : N i c e t o m e e t y o u ,
Ts u y o s h i . E n j o y A l e x a w o r l d !
4 p a s s i n g ( 1 6 m s )
ESLint help you to check your code
https://eslint.org/
“Shifter man” is tested two way
# Check the code syntax by ESLint
$ npm run lint
# Test the conversation by alexa-conversation
$ npm test
https://github.com/getshifter/alexa-shifterman/blob/master/README.md
Easy to create Alexa Skills, but We want to …
• Test our code in local environment
• Deploy our code automatically
• Manage our resources in AWS.
Serverless Framework: create & manage app
https://serverless.com/
$ npm install -g serverless
$ serverless create -t aws-nodejs
$ serverless deploy
We can define AWS resources as YAML
service: alexa-shifter
provider:
name: aws
runtime: nodejs6.10
package:
include:
- node_modules/
functions:
hello:
handler: index.hello
events:
- alexaSkill
We can define AWS resources as YAML
service: alexa-shifter
provider:
name: aws
runtime: nodejs6.10
package:
include:
- node_modules/
functions:
hello:
handler: index.hello
events:
- alexaSkill
D e f i n e p ro v i d e r
We can define AWS resources as YAML
service: alexa-shifter
provider:
name: aws
runtime: nodejs6.10
package:
include:
- node_modules/
functions:
hello:
handler: index.hello
events:
- alexaSkill
I n c l u d e l i b r a r i e s
D e f i n e p ro v i d e r
We can define AWS resources as YAML
service: alexa-shifter
provider:
name: aws
runtime: nodejs6.10
package:
include:
- node_modules/
functions:
hello:
handler: index.hello
events:
- alexaSkill
I n c l u d e l i b r a r i e s
D e f i n e L a m b d a
D e f i n e p ro v i d e r
Easy to rollback & checking CloudWatch logs
# Rollback
$ serverless rollback --timestamp timestamp
# Tail the Lamdbda’s log
$ serverless logs -f hello -t
https://serverless.com/framework/docs/providers/aws/cli-reference/
Easy to create Alexa Skills, but We want to …
• Test our code in local environment
• Deploy our code automatically
• Manage our resources in AWS.
Serverless FW using CloudFormation
https://serverless.com/
We can define custom resources
custom:
stage: ${opt:stage, self:provider.stage}
defaultProfile: default
logRetentionInDays:
development: "14"
production: "90"
default: "3"
resources:
Resources:
HelloLogGroup:
Properties:
RetentionInDays: ${self:custom.logRetentionInDays.${self:custom.stage},
self:custom.logRetentionInDays.default}
We can define custom resources
custom:
stage: ${opt:stage, self:provider.stage}
defaultProfile: default
logRetentionInDays:
development: "14"
production: "90"
default: "3"
resources:
Resources:
HelloLogGroup:
Properties:
RetentionInDays: ${self:custom.logRetentionInDays.${self:custom.stage},
self:custom.logRetentionInDays.default}
D e f i n e p a r a m s
We can define custom resources
custom:
stage: ${opt:stage, self:provider.stage}
defaultProfile: default
logRetentionInDays:
development: "14"
production: "90"
default: "3"
resources:
Resources:
HelloLogGroup:
Properties:
RetentionInDays: ${self:custom.logRetentionInDays.${self:custom.stage},
self:custom.logRetentionInDays.default}
D e f i n e p a r a m s
U p d a t e C W L p ro p s
Easy to customize our AWS resources
https://serverless.com/framework/docs/providers/aws/guide/serverless.yml/
All examples are in our GitHub
https://github.com/getshifter/alexa-shifterman
Conclusion
• We can easy to make voice app by Alexa
• AWS help us to create & manage Alexa app
• Let’s create own Alexa Skills !
Join !
https://jaws-ug-kobe.doorkeeper.jp/events/64712
#AWSCommunityDay
Q&A

More Related Content

What's hot

Intro to Alexa skills development
Intro to Alexa skills developmentIntro to Alexa skills development
Intro to Alexa skills developmentSahil Khosla
 
Amazon Alexa - Introduction & Custom Skills
Amazon Alexa - Introduction & Custom SkillsAmazon Alexa - Introduction & Custom Skills
Amazon Alexa - Introduction & Custom SkillsAndré Maré
 
Building Voice Apps & Experiences For Amazon Echo
Building Voice Apps & Experiences For Amazon EchoBuilding Voice Apps & Experiences For Amazon Echo
Building Voice Apps & Experiences For Amazon EchoAmazon Appstore Developers
 
Introduction to building alexa skills and putting your amazon echo to work
Introduction to building alexa skills and putting your amazon echo to workIntroduction to building alexa skills and putting your amazon echo to work
Introduction to building alexa skills and putting your amazon echo to workAbe Diaz
 
Speak Up! Build an Alexa Skill for a Cause
 Speak Up! Build an Alexa Skill for a Cause Speak Up! Build an Alexa Skill for a Cause
Speak Up! Build an Alexa Skill for a CauseNikki Clark
 
Voice enable all the things with Alexa
Voice enable all the things with AlexaVoice enable all the things with Alexa
Voice enable all the things with AlexaMark Bate
 
Alexa Smart Home Skill
Alexa Smart Home SkillAlexa Smart Home Skill
Alexa Smart Home SkillJun Ichikawa
 
ALX326_Applying Alexa’s Natural Language to Your Challenges
ALX326_Applying Alexa’s Natural Language to Your ChallengesALX326_Applying Alexa’s Natural Language to Your Challenges
ALX326_Applying Alexa’s Natural Language to Your ChallengesAmazon Web Services
 
Alexa Skills Kit with Web API on Azure
Alexa Skills Kit with Web API on AzureAlexa Skills Kit with Web API on Azure
Alexa Skills Kit with Web API on AzureHeather Downing
 
Please meet Amazon Alexa and the Alexa Skills Kit
Please meet Amazon Alexa and the Alexa Skills KitPlease meet Amazon Alexa and the Alexa Skills Kit
Please meet Amazon Alexa and the Alexa Skills KitAmazon Web Services
 
Amazon Alexa Development Overview
Amazon Alexa Development OverviewAmazon Alexa Development Overview
Amazon Alexa Development OverviewJohn Brady
 
FSI300 Bringing the Brains Behind Alexa to Financial Services
FSI300 Bringing the Brains Behind Alexa to Financial ServicesFSI300 Bringing the Brains Behind Alexa to Financial Services
FSI300 Bringing the Brains Behind Alexa to Financial ServicesAmazon Web Services
 
Build an Alexa Skill Step-by-Step
Build an Alexa Skill Step-by-StepBuild an Alexa Skill Step-by-Step
Build an Alexa Skill Step-by-StepRick Wargo
 

What's hot (20)

Intro to Alexa skills development
Intro to Alexa skills developmentIntro to Alexa skills development
Intro to Alexa skills development
 
Amazon Alexa - Introduction & Custom Skills
Amazon Alexa - Introduction & Custom SkillsAmazon Alexa - Introduction & Custom Skills
Amazon Alexa - Introduction & Custom Skills
 
Alexa, nice to meet you!
Alexa, nice to meet you! Alexa, nice to meet you!
Alexa, nice to meet you!
 
Amazon Alexa Workshop
Amazon Alexa WorkshopAmazon Alexa Workshop
Amazon Alexa Workshop
 
Building Voice Apps & Experiences For Amazon Echo
Building Voice Apps & Experiences For Amazon EchoBuilding Voice Apps & Experiences For Amazon Echo
Building Voice Apps & Experiences For Amazon Echo
 
Introduction to building alexa skills and putting your amazon echo to work
Introduction to building alexa skills and putting your amazon echo to workIntroduction to building alexa skills and putting your amazon echo to work
Introduction to building alexa skills and putting your amazon echo to work
 
Amazon Alexa
Amazon AlexaAmazon Alexa
Amazon Alexa
 
Amazon Alexa and Echo
Amazon Alexa  and EchoAmazon Alexa  and Echo
Amazon Alexa and Echo
 
ALX319_It’s All in the Data
ALX319_It’s All in the DataALX319_It’s All in the Data
ALX319_It’s All in the Data
 
Speak Up! Build an Alexa Skill for a Cause
 Speak Up! Build an Alexa Skill for a Cause Speak Up! Build an Alexa Skill for a Cause
Speak Up! Build an Alexa Skill for a Cause
 
Voice enable all the things with Alexa
Voice enable all the things with AlexaVoice enable all the things with Alexa
Voice enable all the things with Alexa
 
Alexa Smart Home Skill
Alexa Smart Home SkillAlexa Smart Home Skill
Alexa Smart Home Skill
 
ALX326_Applying Alexa’s Natural Language to Your Challenges
ALX326_Applying Alexa’s Natural Language to Your ChallengesALX326_Applying Alexa’s Natural Language to Your Challenges
ALX326_Applying Alexa’s Natural Language to Your Challenges
 
Alexa Skills Kit with Web API on Azure
Alexa Skills Kit with Web API on AzureAlexa Skills Kit with Web API on Azure
Alexa Skills Kit with Web API on Azure
 
Please meet Amazon Alexa and the Alexa Skills Kit
Please meet Amazon Alexa and the Alexa Skills KitPlease meet Amazon Alexa and the Alexa Skills Kit
Please meet Amazon Alexa and the Alexa Skills Kit
 
Alexa Skills Kit
Alexa Skills KitAlexa Skills Kit
Alexa Skills Kit
 
Amazon Alexa Development Overview
Amazon Alexa Development OverviewAmazon Alexa Development Overview
Amazon Alexa Development Overview
 
Amazon Alexa and AWS Lambda
Amazon Alexa and AWS LambdaAmazon Alexa and AWS Lambda
Amazon Alexa and AWS Lambda
 
FSI300 Bringing the Brains Behind Alexa to Financial Services
FSI300 Bringing the Brains Behind Alexa to Financial ServicesFSI300 Bringing the Brains Behind Alexa to Financial Services
FSI300 Bringing the Brains Behind Alexa to Financial Services
 
Build an Alexa Skill Step-by-Step
Build an Alexa Skill Step-by-StepBuild an Alexa Skill Step-by-Step
Build an Alexa Skill Step-by-Step
 

Similar to How to develop Alexa Skill Kit based on Serverless Architecture

AWS re:Invent Recap 2016 Taiwan part 2
AWS re:Invent Recap 2016 Taiwan part 2AWS re:Invent Recap 2016 Taiwan part 2
AWS re:Invent Recap 2016 Taiwan part 2Amazon Web Services
 
Serverless WordPress & next Interface of WordPress
Serverless WordPress & next Interface of WordPressServerless WordPress & next Interface of WordPress
Serverless WordPress & next Interface of WordPressHidetaka Okamoto
 
AWS와 Alexa 음성 인식 플랫폼을 통한 비즈니스 기회::윤석찬::AWS Summit Seoul 2018
AWS와 Alexa 음성 인식 플랫폼을 통한 비즈니스 기회::윤석찬::AWS Summit Seoul 2018 AWS와 Alexa 음성 인식 플랫폼을 통한 비즈니스 기회::윤석찬::AWS Summit Seoul 2018
AWS와 Alexa 음성 인식 플랫폼을 통한 비즈니스 기회::윤석찬::AWS Summit Seoul 2018 Amazon Web Services Korea
 
Into The Box | Alexa and ColdBox Api's
Into The Box | Alexa and ColdBox Api'sInto The Box | Alexa and ColdBox Api's
Into The Box | Alexa and ColdBox Api'sOrtus Solutions, Corp
 
Open Source at AWS: Code, Contributions, Collaboration, and Communication
Open Source at AWS: Code, Contributions, Collaboration, and CommunicationOpen Source at AWS: Code, Contributions, Collaboration, and Communication
Open Source at AWS: Code, Contributions, Collaboration, and CommunicationAmazon Web Services
 
Development in the could: How do we do it(Cloud computing. Microservices. Faas)
Development in the could: How do we do it(Cloud computing. Microservices. Faas)Development in the could: How do we do it(Cloud computing. Microservices. Faas)
Development in the could: How do we do it(Cloud computing. Microservices. Faas)Preply.com
 
AWS における サーバーレスの基礎からチューニングまで
AWS における サーバーレスの基礎からチューニングまでAWS における サーバーレスの基礎からチューニングまで
AWS における サーバーレスの基礎からチューニングまで崇之 清水
 
Design and Develop Alexa Skills - Codemotion Rome 2019
Design and Develop Alexa Skills - Codemotion Rome 2019Design and Develop Alexa Skills - Codemotion Rome 2019
Design and Develop Alexa Skills - Codemotion Rome 2019Aleanan
 
Build your MVP on AWS - AWS Startup Day Johannesburg.pdf
Build your MVP on AWS - AWS Startup Day Johannesburg.pdfBuild your MVP on AWS - AWS Startup Day Johannesburg.pdf
Build your MVP on AWS - AWS Startup Day Johannesburg.pdfAmazon Web Services
 
【IVS CTO Night & Day】Amazon Container Services
【IVS CTO Night & Day】Amazon Container Services【IVS CTO Night & Day】Amazon Container Services
【IVS CTO Night & Day】Amazon Container ServicesAmazon Web Services Japan
 
Keynote - AWS Summit Milano 2018
Keynote - AWS Summit Milano 2018Keynote - AWS Summit Milano 2018
Keynote - AWS Summit Milano 2018Amazon Web Services
 
Ako prepojiť aplikáciu s Elasticsearch
Ako prepojiť aplikáciu s ElasticsearchAko prepojiť aplikáciu s Elasticsearch
Ako prepojiť aplikáciu s Elasticsearchbart-sk
 
Semplificare l'observability per progetti Serverless
Semplificare l'observability per progetti ServerlessSemplificare l'observability per progetti Serverless
Semplificare l'observability per progetti ServerlessLuciano Mammino
 
Meteor - not just for rockstars
Meteor - not just for rockstarsMeteor - not just for rockstars
Meteor - not just for rockstarsStephan Hochhaus
 
Serverless in production, an experience report (JeffConf)
Serverless in production, an experience report (JeffConf)Serverless in production, an experience report (JeffConf)
Serverless in production, an experience report (JeffConf)Yan Cui
 
Andrea Lattuada, Gabriele Petronella - Building startups on Scala
Andrea Lattuada, Gabriele Petronella - Building startups on ScalaAndrea Lattuada, Gabriele Petronella - Building startups on Scala
Andrea Lattuada, Gabriele Petronella - Building startups on ScalaScala Italy
 
Keep it simple web development stack
Keep it simple web development stackKeep it simple web development stack
Keep it simple web development stackEric Ahn
 

Similar to How to develop Alexa Skill Kit based on Serverless Architecture (20)

AWS re:Invent Recap 2016 Taiwan part 2
AWS re:Invent Recap 2016 Taiwan part 2AWS re:Invent Recap 2016 Taiwan part 2
AWS re:Invent Recap 2016 Taiwan part 2
 
Serverless WordPress & next Interface of WordPress
Serverless WordPress & next Interface of WordPressServerless WordPress & next Interface of WordPress
Serverless WordPress & next Interface of WordPress
 
AWS와 Alexa 음성 인식 플랫폼을 통한 비즈니스 기회::윤석찬::AWS Summit Seoul 2018
AWS와 Alexa 음성 인식 플랫폼을 통한 비즈니스 기회::윤석찬::AWS Summit Seoul 2018 AWS와 Alexa 음성 인식 플랫폼을 통한 비즈니스 기회::윤석찬::AWS Summit Seoul 2018
AWS와 Alexa 음성 인식 플랫폼을 통한 비즈니스 기회::윤석찬::AWS Summit Seoul 2018
 
Into The Box | Alexa and ColdBox Api's
Into The Box | Alexa and ColdBox Api'sInto The Box | Alexa and ColdBox Api's
Into The Box | Alexa and ColdBox Api's
 
Open Source at AWS: Code, Contributions, Collaboration, and Communication
Open Source at AWS: Code, Contributions, Collaboration, and CommunicationOpen Source at AWS: Code, Contributions, Collaboration, and Communication
Open Source at AWS: Code, Contributions, Collaboration, and Communication
 
Development in the could: How do we do it(Cloud computing. Microservices. Faas)
Development in the could: How do we do it(Cloud computing. Microservices. Faas)Development in the could: How do we do it(Cloud computing. Microservices. Faas)
Development in the could: How do we do it(Cloud computing. Microservices. Faas)
 
Labs_20210809.pdf
Labs_20210809.pdfLabs_20210809.pdf
Labs_20210809.pdf
 
Integration Testing in Python
Integration Testing in PythonIntegration Testing in Python
Integration Testing in Python
 
AWS における サーバーレスの基礎からチューニングまで
AWS における サーバーレスの基礎からチューニングまでAWS における サーバーレスの基礎からチューニングまで
AWS における サーバーレスの基礎からチューニングまで
 
Design and Develop Alexa Skills - Codemotion Rome 2019
Design and Develop Alexa Skills - Codemotion Rome 2019Design and Develop Alexa Skills - Codemotion Rome 2019
Design and Develop Alexa Skills - Codemotion Rome 2019
 
Build your MVP on AWS - AWS Startup Day Johannesburg.pdf
Build your MVP on AWS - AWS Startup Day Johannesburg.pdfBuild your MVP on AWS - AWS Startup Day Johannesburg.pdf
Build your MVP on AWS - AWS Startup Day Johannesburg.pdf
 
【IVS CTO Night & Day】Amazon Container Services
【IVS CTO Night & Day】Amazon Container Services【IVS CTO Night & Day】Amazon Container Services
【IVS CTO Night & Day】Amazon Container Services
 
Keynote - AWS Summit Milano 2018
Keynote - AWS Summit Milano 2018Keynote - AWS Summit Milano 2018
Keynote - AWS Summit Milano 2018
 
Ako prepojiť aplikáciu s Elasticsearch
Ako prepojiť aplikáciu s ElasticsearchAko prepojiť aplikáciu s Elasticsearch
Ako prepojiť aplikáciu s Elasticsearch
 
Semplificare l'observability per progetti Serverless
Semplificare l'observability per progetti ServerlessSemplificare l'observability per progetti Serverless
Semplificare l'observability per progetti Serverless
 
Meteor - not just for rockstars
Meteor - not just for rockstarsMeteor - not just for rockstars
Meteor - not just for rockstars
 
Serverless in production, an experience report (JeffConf)
Serverless in production, an experience report (JeffConf)Serverless in production, an experience report (JeffConf)
Serverless in production, an experience report (JeffConf)
 
Andrea Lattuada, Gabriele Petronella - Building startups on Scala
Andrea Lattuada, Gabriele Petronella - Building startups on ScalaAndrea Lattuada, Gabriele Petronella - Building startups on Scala
Andrea Lattuada, Gabriele Petronella - Building startups on Scala
 
Keep it simple web development stack
Keep it simple web development stackKeep it simple web development stack
Keep it simple web development stack
 
Refactoring Infrastructure Code
Refactoring Infrastructure CodeRefactoring Infrastructure Code
Refactoring Infrastructure Code
 

More from Hidetaka Okamoto

WordBench京都12月、WordCampUSからのWP REST APIな話
WordBench京都12月、WordCampUSからのWP REST APIな話WordBench京都12月、WordCampUSからのWP REST APIな話
WordBench京都12月、WordCampUSからのWP REST APIな話Hidetaka Okamoto
 
和歌山ITカーニバルAWSハンズオンスライド
和歌山ITカーニバルAWSハンズオンスライド和歌山ITカーニバルAWSハンズオンスライド
和歌山ITカーニバルAWSハンズオンスライドHidetaka Okamoto
 
YARAIYA! Opendata with WordPress
YARAIYA!  Opendata with WordPressYARAIYA!  Opendata with WordPress
YARAIYA! Opendata with WordPressHidetaka Okamoto
 
_s + bootstrapで始めるWordPressテーマ開発入門
_s + bootstrapで始めるWordPressテーマ開発入門_s + bootstrapで始めるWordPressテーマ開発入門
_s + bootstrapで始めるWordPressテーマ開発入門Hidetaka Okamoto
 
WordPressでデータ記事書こうぜ
WordPressでデータ記事書こうぜWordPressでデータ記事書こうぜ
WordPressでデータ記事書こうぜHidetaka Okamoto
 
WordBench京都 WordPress with Linked Open Data
WordBench京都 WordPress with Linked Open DataWordBench京都 WordPress with Linked Open Data
WordBench京都 WordPress with Linked Open DataHidetaka Okamoto
 
WordBench京都版 _sハンズオン
WordBench京都版 _sハンズオンWordBench京都版 _sハンズオン
WordBench京都版 _sハンズオンHidetaka Okamoto
 
Word pressはじめの一歩 テーマ作成ハンズオン
Word pressはじめの一歩 テーマ作成ハンズオンWord pressはじめの一歩 テーマ作成ハンズオン
Word pressはじめの一歩 テーマ作成ハンズオンHidetaka Okamoto
 
How Would You Like Component Management System
How Would You Like Component Management SystemHow Would You Like Component Management System
How Would You Like Component Management SystemHidetaka Okamoto
 
WP-APIを使ってみよう&No PHPテーマという考え方
WP-APIを使ってみよう&No PHPテーマという考え方WP-APIを使ってみよう&No PHPテーマという考え方
WP-APIを使ってみよう&No PHPテーマという考え方Hidetaka Okamoto
 
なんとなくjQueryでAjaxをつかってみる
なんとなくjQueryでAjaxをつかってみるなんとなくjQueryでAjaxをつかってみる
なんとなくjQueryでAjaxをつかってみるHidetaka Okamoto
 
WebComponentsをPolymerとgulpとyeomanでさっくり使い始めよう
WebComponentsをPolymerとgulpとyeomanでさっくり使い始めようWebComponentsをPolymerとgulpとyeomanでさっくり使い始めよう
WebComponentsをPolymerとgulpとyeomanでさっくり使い始めようHidetaka Okamoto
 
Doctrineアカンパターン
DoctrineアカンパターンDoctrineアカンパターン
DoctrineアカンパターンHidetaka Okamoto
 
やらいや!WebComponents wp-dfes03 LT
やらいや!WebComponents wp-dfes03 LTやらいや!WebComponents wp-dfes03 LT
やらいや!WebComponents wp-dfes03 LTHidetaka Okamoto
 
PHPのタイプヒンティング
PHPのタイプヒンティングPHPのタイプヒンティング
PHPのタイプヒンティングHidetaka Okamoto
 
自分用プラグインのススメ
自分用プラグインのススメ自分用プラグインのススメ
自分用プラグインのススメHidetaka Okamoto
 
LODを使ったサイトとプラグインを作ってみた話[WordBenchOsaka]
LODを使ったサイトとプラグインを作ってみた話[WordBenchOsaka]LODを使ったサイトとプラグインを作ってみた話[WordBenchOsaka]
LODを使ったサイトとプラグインを作ってみた話[WordBenchOsaka]Hidetaka Okamoto
 
びわ湖花火大会のオープンデータアプリを作ってみて
びわ湖花火大会のオープンデータアプリを作ってみてびわ湖花火大会のオープンデータアプリを作ってみて
びわ湖花火大会のオープンデータアプリを作ってみてHidetaka Okamoto
 

More from Hidetaka Okamoto (20)

WooCommerce & AWS
WooCommerce & AWSWooCommerce & AWS
WooCommerce & AWS
 
WordBench京都12月、WordCampUSからのWP REST APIな話
WordBench京都12月、WordCampUSからのWP REST APIな話WordBench京都12月、WordCampUSからのWP REST APIな話
WordBench京都12月、WordCampUSからのWP REST APIな話
 
和歌山ITカーニバルAWSハンズオンスライド
和歌山ITカーニバルAWSハンズオンスライド和歌山ITカーニバルAWSハンズオンスライド
和歌山ITカーニバルAWSハンズオンスライド
 
YARAIYA! Opendata with WordPress
YARAIYA!  Opendata with WordPressYARAIYA!  Opendata with WordPress
YARAIYA! Opendata with WordPress
 
_s + bootstrapで始めるWordPressテーマ開発入門
_s + bootstrapで始めるWordPressテーマ開発入門_s + bootstrapで始めるWordPressテーマ開発入門
_s + bootstrapで始めるWordPressテーマ開発入門
 
WordPressでデータ記事書こうぜ
WordPressでデータ記事書こうぜWordPressでデータ記事書こうぜ
WordPressでデータ記事書こうぜ
 
WordBench京都 WordPress with Linked Open Data
WordBench京都 WordPress with Linked Open DataWordBench京都 WordPress with Linked Open Data
WordBench京都 WordPress with Linked Open Data
 
WordBench京都版 _sハンズオン
WordBench京都版 _sハンズオンWordBench京都版 _sハンズオン
WordBench京都版 _sハンズオン
 
Word pressはじめの一歩 テーマ作成ハンズオン
Word pressはじめの一歩 テーマ作成ハンズオンWord pressはじめの一歩 テーマ作成ハンズオン
Word pressはじめの一歩 テーマ作成ハンズオン
 
How Would You Like Component Management System
How Would You Like Component Management SystemHow Would You Like Component Management System
How Would You Like Component Management System
 
WP-APIを使ってみよう&No PHPテーマという考え方
WP-APIを使ってみよう&No PHPテーマという考え方WP-APIを使ってみよう&No PHPテーマという考え方
WP-APIを使ってみよう&No PHPテーマという考え方
 
なんとなくjQueryでAjaxをつかってみる
なんとなくjQueryでAjaxをつかってみるなんとなくjQueryでAjaxをつかってみる
なんとなくjQueryでAjaxをつかってみる
 
WebComponentsをPolymerとgulpとyeomanでさっくり使い始めよう
WebComponentsをPolymerとgulpとyeomanでさっくり使い始めようWebComponentsをPolymerとgulpとyeomanでさっくり使い始めよう
WebComponentsをPolymerとgulpとyeomanでさっくり使い始めよう
 
Doctrineアカンパターン
DoctrineアカンパターンDoctrineアカンパターン
Doctrineアカンパターン
 
Phpのinterfaceを使う
Phpのinterfaceを使うPhpのinterfaceを使う
Phpのinterfaceを使う
 
やらいや!WebComponents wp-dfes03 LT
やらいや!WebComponents wp-dfes03 LTやらいや!WebComponents wp-dfes03 LT
やらいや!WebComponents wp-dfes03 LT
 
PHPのタイプヒンティング
PHPのタイプヒンティングPHPのタイプヒンティング
PHPのタイプヒンティング
 
自分用プラグインのススメ
自分用プラグインのススメ自分用プラグインのススメ
自分用プラグインのススメ
 
LODを使ったサイトとプラグインを作ってみた話[WordBenchOsaka]
LODを使ったサイトとプラグインを作ってみた話[WordBenchOsaka]LODを使ったサイトとプラグインを作ってみた話[WordBenchOsaka]
LODを使ったサイトとプラグインを作ってみた話[WordBenchOsaka]
 
びわ湖花火大会のオープンデータアプリを作ってみて
びわ湖花火大会のオープンデータアプリを作ってみてびわ湖花火大会のオープンデータアプリを作ってみて
びわ湖花火大会のオープンデータアプリを作ってみて
 

Recently uploaded

Power System electrical and electronics .pptx
Power System electrical and electronics .pptxPower System electrical and electronics .pptx
Power System electrical and electronics .pptxMUKULKUMAR210
 
UNIT4_ESD_wfffffggggggggggggith_ARM.pptx
UNIT4_ESD_wfffffggggggggggggith_ARM.pptxUNIT4_ESD_wfffffggggggggggggith_ARM.pptx
UNIT4_ESD_wfffffggggggggggggith_ARM.pptxrealme6igamerr
 
solar wireless electric vechicle charging system
solar wireless electric vechicle charging systemsolar wireless electric vechicle charging system
solar wireless electric vechicle charging systemgokuldongala
 
EPE3163_Hydro power stations_Unit2_Lect2.pptx
EPE3163_Hydro power stations_Unit2_Lect2.pptxEPE3163_Hydro power stations_Unit2_Lect2.pptx
EPE3163_Hydro power stations_Unit2_Lect2.pptxJoseeMusabyimana
 
دليل تجارب الاسفلت المختبرية - Asphalt Experiments Guide Laboratory
دليل تجارب الاسفلت المختبرية - Asphalt Experiments Guide Laboratoryدليل تجارب الاسفلت المختبرية - Asphalt Experiments Guide Laboratory
دليل تجارب الاسفلت المختبرية - Asphalt Experiments Guide LaboratoryBahzad5
 
Nodal seismic construction requirements.pptx
Nodal seismic construction requirements.pptxNodal seismic construction requirements.pptx
Nodal seismic construction requirements.pptxwendy cai
 
A Seminar on Electric Vehicle Software Simulation
A Seminar on Electric Vehicle Software SimulationA Seminar on Electric Vehicle Software Simulation
A Seminar on Electric Vehicle Software SimulationMohsinKhanA
 
Gender Bias in Engineer, Honors 203 Project
Gender Bias in Engineer, Honors 203 ProjectGender Bias in Engineer, Honors 203 Project
Gender Bias in Engineer, Honors 203 Projectreemakb03
 
ChatGPT-and-Generative-AI-Landscape Working of generative ai search
ChatGPT-and-Generative-AI-Landscape Working of generative ai searchChatGPT-and-Generative-AI-Landscape Working of generative ai search
ChatGPT-and-Generative-AI-Landscape Working of generative ai searchrohitcse52
 
Best-NO1 Best Rohani Amil In Lahore Kala Ilam In Lahore Kala Jadu Amil In Lah...
Best-NO1 Best Rohani Amil In Lahore Kala Ilam In Lahore Kala Jadu Amil In Lah...Best-NO1 Best Rohani Amil In Lahore Kala Ilam In Lahore Kala Jadu Amil In Lah...
Best-NO1 Best Rohani Amil In Lahore Kala Ilam In Lahore Kala Jadu Amil In Lah...Amil baba
 
Quasi-Stochastic Approximation: Algorithm Design Principles with Applications...
Quasi-Stochastic Approximation: Algorithm Design Principles with Applications...Quasi-Stochastic Approximation: Algorithm Design Principles with Applications...
Quasi-Stochastic Approximation: Algorithm Design Principles with Applications...Sean Meyn
 
Transforming Process Safety Management: Challenges, Benefits, and Transition ...
Transforming Process Safety Management: Challenges, Benefits, and Transition ...Transforming Process Safety Management: Challenges, Benefits, and Transition ...
Transforming Process Safety Management: Challenges, Benefits, and Transition ...soginsider
 
Summer training report on BUILDING CONSTRUCTION for DIPLOMA Students.pdf
Summer training report on BUILDING CONSTRUCTION for DIPLOMA Students.pdfSummer training report on BUILDING CONSTRUCTION for DIPLOMA Students.pdf
Summer training report on BUILDING CONSTRUCTION for DIPLOMA Students.pdfNaveenVerma126
 
Lecture 1: Basics of trigonometry (surveying)
Lecture 1: Basics of trigonometry (surveying)Lecture 1: Basics of trigonometry (surveying)
Lecture 1: Basics of trigonometry (surveying)Bahzad5
 
IT3401-WEB ESSENTIALS PRESENTATIONS.pptx
IT3401-WEB ESSENTIALS PRESENTATIONS.pptxIT3401-WEB ESSENTIALS PRESENTATIONS.pptx
IT3401-WEB ESSENTIALS PRESENTATIONS.pptxSAJITHABANUS
 
Technology Features of Apollo HDD Machine, Its Technical Specification with C...
Technology Features of Apollo HDD Machine, Its Technical Specification with C...Technology Features of Apollo HDD Machine, Its Technical Specification with C...
Technology Features of Apollo HDD Machine, Its Technical Specification with C...Apollo Techno Industries Pvt Ltd
 
nvidia AI-gtc 2024 partial slide deck.pptx
nvidia AI-gtc 2024 partial slide deck.pptxnvidia AI-gtc 2024 partial slide deck.pptx
nvidia AI-gtc 2024 partial slide deck.pptxjasonsedano2
 
Clutches and brkesSelect any 3 position random motion out of real world and d...
Clutches and brkesSelect any 3 position random motion out of real world and d...Clutches and brkesSelect any 3 position random motion out of real world and d...
Clutches and brkesSelect any 3 position random motion out of real world and d...sahb78428
 

Recently uploaded (20)

Power System electrical and electronics .pptx
Power System electrical and electronics .pptxPower System electrical and electronics .pptx
Power System electrical and electronics .pptx
 
UNIT4_ESD_wfffffggggggggggggith_ARM.pptx
UNIT4_ESD_wfffffggggggggggggith_ARM.pptxUNIT4_ESD_wfffffggggggggggggith_ARM.pptx
UNIT4_ESD_wfffffggggggggggggith_ARM.pptx
 
solar wireless electric vechicle charging system
solar wireless electric vechicle charging systemsolar wireless electric vechicle charging system
solar wireless electric vechicle charging system
 
EPE3163_Hydro power stations_Unit2_Lect2.pptx
EPE3163_Hydro power stations_Unit2_Lect2.pptxEPE3163_Hydro power stations_Unit2_Lect2.pptx
EPE3163_Hydro power stations_Unit2_Lect2.pptx
 
دليل تجارب الاسفلت المختبرية - Asphalt Experiments Guide Laboratory
دليل تجارب الاسفلت المختبرية - Asphalt Experiments Guide Laboratoryدليل تجارب الاسفلت المختبرية - Asphalt Experiments Guide Laboratory
دليل تجارب الاسفلت المختبرية - Asphalt Experiments Guide Laboratory
 
Nodal seismic construction requirements.pptx
Nodal seismic construction requirements.pptxNodal seismic construction requirements.pptx
Nodal seismic construction requirements.pptx
 
Présentation IIRB 2024 Marine Cordonnier.pdf
Présentation IIRB 2024 Marine Cordonnier.pdfPrésentation IIRB 2024 Marine Cordonnier.pdf
Présentation IIRB 2024 Marine Cordonnier.pdf
 
A Seminar on Electric Vehicle Software Simulation
A Seminar on Electric Vehicle Software SimulationA Seminar on Electric Vehicle Software Simulation
A Seminar on Electric Vehicle Software Simulation
 
Gender Bias in Engineer, Honors 203 Project
Gender Bias in Engineer, Honors 203 ProjectGender Bias in Engineer, Honors 203 Project
Gender Bias in Engineer, Honors 203 Project
 
ChatGPT-and-Generative-AI-Landscape Working of generative ai search
ChatGPT-and-Generative-AI-Landscape Working of generative ai searchChatGPT-and-Generative-AI-Landscape Working of generative ai search
ChatGPT-and-Generative-AI-Landscape Working of generative ai search
 
Best-NO1 Best Rohani Amil In Lahore Kala Ilam In Lahore Kala Jadu Amil In Lah...
Best-NO1 Best Rohani Amil In Lahore Kala Ilam In Lahore Kala Jadu Amil In Lah...Best-NO1 Best Rohani Amil In Lahore Kala Ilam In Lahore Kala Jadu Amil In Lah...
Best-NO1 Best Rohani Amil In Lahore Kala Ilam In Lahore Kala Jadu Amil In Lah...
 
Quasi-Stochastic Approximation: Algorithm Design Principles with Applications...
Quasi-Stochastic Approximation: Algorithm Design Principles with Applications...Quasi-Stochastic Approximation: Algorithm Design Principles with Applications...
Quasi-Stochastic Approximation: Algorithm Design Principles with Applications...
 
Transforming Process Safety Management: Challenges, Benefits, and Transition ...
Transforming Process Safety Management: Challenges, Benefits, and Transition ...Transforming Process Safety Management: Challenges, Benefits, and Transition ...
Transforming Process Safety Management: Challenges, Benefits, and Transition ...
 
Litature Review: Research Paper work for Engineering
Litature Review: Research Paper work for EngineeringLitature Review: Research Paper work for Engineering
Litature Review: Research Paper work for Engineering
 
Summer training report on BUILDING CONSTRUCTION for DIPLOMA Students.pdf
Summer training report on BUILDING CONSTRUCTION for DIPLOMA Students.pdfSummer training report on BUILDING CONSTRUCTION for DIPLOMA Students.pdf
Summer training report on BUILDING CONSTRUCTION for DIPLOMA Students.pdf
 
Lecture 1: Basics of trigonometry (surveying)
Lecture 1: Basics of trigonometry (surveying)Lecture 1: Basics of trigonometry (surveying)
Lecture 1: Basics of trigonometry (surveying)
 
IT3401-WEB ESSENTIALS PRESENTATIONS.pptx
IT3401-WEB ESSENTIALS PRESENTATIONS.pptxIT3401-WEB ESSENTIALS PRESENTATIONS.pptx
IT3401-WEB ESSENTIALS PRESENTATIONS.pptx
 
Technology Features of Apollo HDD Machine, Its Technical Specification with C...
Technology Features of Apollo HDD Machine, Its Technical Specification with C...Technology Features of Apollo HDD Machine, Its Technical Specification with C...
Technology Features of Apollo HDD Machine, Its Technical Specification with C...
 
nvidia AI-gtc 2024 partial slide deck.pptx
nvidia AI-gtc 2024 partial slide deck.pptxnvidia AI-gtc 2024 partial slide deck.pptx
nvidia AI-gtc 2024 partial slide deck.pptx
 
Clutches and brkesSelect any 3 position random motion out of real world and d...
Clutches and brkesSelect any 3 position random motion out of real world and d...Clutches and brkesSelect any 3 position random motion out of real world and d...
Clutches and brkesSelect any 3 position random motion out of real world and d...
 

How to develop Alexa Skill Kit based on Serverless Architecture

  • 1. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Hidetaka Okamoto Digitalcube / JAWS-UG How to develop Alexa Skills Kit based on Serverless Architecture
  • 2. H i d e t a k a O k a m o t o • Digitalcube Co. Ltd. • JAWS-UG Kyoto, Kobe • WordCamp Kyoto 2017
  • 3. I’ll introduce… • Alexa Skills Kit can easy to make voice application • AWS Lambda help you to create the Skill more easier • Serverless Framework can manage your app code • Node.js is good for making Alexa Skill
  • 4. AGENDA 1. What is Alexa & Alexa Skills Kit ? 2. How to develop the Alexa Skill 3. How to test & deployment your Skill
  • 5. What is Alexa And Alexa Skills Kit
  • 7. Alexa is… • The voice service that powers Amazon Echo • Can interact with devices using voice • Can build new voice experiences https://developer.amazon.com/alexa
  • 10. Alexa Skills Kit (ASK) is… • Can build engaging skills more easily. • Collect APIs, tools, docs, examples. • Can leverage Amazon’s knowledge of voice. https://developer.amazon.com/alexa-skills-kit
  • 11. Alexa Skills Kit documentations • Webinars • Training videos • Developer blog • Podcast • Events • and more… https://developer.amazon.com/alexa-skills-kit/learn
  • 12. Alexa Skills Kit examples https://developer.amazon.com/alexa-skills-kit/tutorials
  • 13. Published our custom Skills https://www.amazon.com/Digitalcube-Inc-Shifter-man/dp/B07572D7N8/
  • 14. Shifter man skills is … • Talking about our service • Speech out our blog content • Source code is open. • https://github.com/getshifter/alexa-shifterman
  • 15. Check point • Alexa is the voice service • Alexa Skills Kit helps us to create App easily • We can easy to create & deploy App by AWS
  • 16. How to develop the Alexa Skill
  • 17. A u d i o C a p t u re A u d i o P l a y b a c k C a l l s o m e A P I Ta l k s o m t h i n g R e s p o n c e S p e e c h t o Te x t Te x t t o S p e e c h
  • 18. A u d i o C a p t u re A u d i o P l a y b a c k C a l l s o m e A P I Ta l k s o m t h i n g R e s p o n c e S p e e c h t o Te x t Te x t t o S p e e c h A l e x a S k i l l s K i t
  • 19. A u d i o C a p t u re A u d i o P l a y b a c k C a l l s o m e A P I Ta l k s o m t h i n g R e s p o n c e S p e e c h t o Te x t Te x t t o S p e e c h AW S L a m b d a We b A P I A l e x a S k i l l s K i t
  • 20. AWS Lambda is great Alexa’s backend https://aws.amazon.com/lambda/
  • 21. Lambda get JSON from Alexa Skills { "request": { "type": "IntentRequest", "requestId": "", "intent": { "name": "AskPriceIntent", "slots": {} }, "locale": "en-US", "timestamp": "2017-08-29T08:26:02Z" }, "context": { "System": { "application": { "applicationId": "amzn1.ask.skill.XXXXXXXX" }, "user": { …
  • 22. Lambda should return valid JSON { "version": "string", "response": { "outputSpeech": { "type": "string", "text": "string", "ssml": "string" }, "card": { "type": "string", "image": { "smallImageUrl": "string", "largeImageUrl": "string" } …
  • 23. Alexa has SDK (Node.js) https://www.npmjs.com/package/alexa-sdk
  • 24. npm init -y npm install -S alexa-sdk
  • 25. We can easy to write Alexa code 'use strict'; const Alexa = require('alexa-sdk'); const handlers = { 'LaunchRequest': function () { this.emit(':tell', 'Hello'); }, }; module.exports.hello = (event, context, callback) => { var alexa = Alexa.handler(event, context, callback); alexa.registerHandlers(handlers); alexa.execute(); };
  • 26. 'use strict'; const Alexa = require('alexa-sdk'); const handlers = { 'LaunchRequest': function () { this.emit(':tell', 'Hello'); }, }; module.exports.hello = (event, context, callback) => { var alexa = Alexa.handler(event, context, callback); alexa.registerHandlers(handlers); alexa.execute(); }; We can easy to write Alexa code L o a d a l e x a - s d k
  • 27. 'use strict'; const Alexa = require('alexa-sdk'); const handlers = { 'LaunchRequest': function () { this.emit(':tell', 'Hello'); }, }; module.exports.hello = (event, context, callback) => { var alexa = Alexa.handler(event, context, callback); alexa.registerHandlers(handlers); alexa.execute(); }; We can easy to write Alexa code L o a d a l e x a - s d k D e f i n e re s p o n s e
  • 28. 'use strict'; const Alexa = require('alexa-sdk'); const handlers = { 'LaunchRequest': function () { this.emit(':tell', 'Hello'); }, }; module.exports.hello = (event, context, callback) => { var alexa = Alexa.handler(event, context, callback); alexa.registerHandlers(handlers); alexa.execute(); }; We can easy to write Alexa code L o a d a l e x a - s d k D e f i n e re s p o n s e E x e c u t e a p p l i c a t i o n
  • 29. tell or ask alexa.emit( ‘:tell’, ‘Talk something, and end session’ ); alexa.emit( ‘:ask’, ‘Talk something, and wait user input’, ‘and ask again’ );
  • 30. Can call another API (like WP API) https://github.com/getshifter/alexa-shifterman/blob/master/index.js#L44-L67
  • 31. Many Skills examples in GitHub • https://github.com/alexa/ • “step-by-step” help us to know how to deploy • All example has comment (How to customize) • We can easy to create own Alexa Skills
  • 33. How to test & deployment your Skill
  • 34. Easy to create Alexa Skills, but We want to … • Test our code in local environment • Deploy our code automatically • Manage our resources in AWS.
  • 35. Easy to create Alexa Skills, but We want to … • Test our code in local environment • Deploy our code automatically • Manage our resources in AWS.
  • 36. Alexa Conversation: Tests for your Alexa skills https://www.npmjs.com/package/alexa-conversation
  • 37. npm install -g mocha npm install --save-dev alexa-conversation
  • 38. We can easy to test own Alexa code const conversation = require('alexa-conversation'); const app = require('../index.js'); const opts = { name: 'Alexa Shifter man', appId: 'your-app-id', app: app, handler: app.hello }; conversation(opts) .userSays('GetNewFactIntent') .plainResponse .shouldContain("Here's the shifter") .end();
  • 39. We can easy to test own Alexa code const conversation = require('alexa-conversation'); const app = require('../index.js'); const opts = { name: 'Alexa Shifter man', appId: 'your-app-id', app: app, handler: app.hello }; conversation(opts) .userSays('GetNewFactIntent') .plainResponse .shouldContain("Here's the shifter") .end(); L o a d l i b & t e s t t a rg e t
  • 40. We can easy to test own Alexa code const conversation = require('alexa-conversation'); const app = require('../index.js'); const opts = { name: 'Alexa Shifter man', appId: 'your-app-id', app: app, handler: app.hello }; conversation(opts) .userSays('GetNewFactIntent') .plainResponse .shouldContain("Here's the shifter") .end(); I n i t t e s t L o a d l i b & t e s t t a rg e t
  • 41. We can easy to test own Alexa code const conversation = require('alexa-conversation'); const app = require('../index.js'); const opts = { name: 'Alexa Shifter man', appId: 'your-app-id', app: app, handler: app.hello }; conversation(opts) .userSays('GetNewFactIntent') .plainResponse .shouldContain("Here's the shifter") .end(); I n i t t e s t D e f i n e t e s t L o a d l i b & t e s t t a rg e t
  • 42. Running test by mocha $ m o c h a t e s t s E x e c u t i n g c o n v e r s a t i o n : H e l l o A l e x a Te s t ✓ F i n i s h e d e x e c u t i n g c o n v e r s a t i o n C o n v e r s a t i o n : H e l l o A l e x a Te s t U s e r t r i g g e r s : H e l l o I n t e n t ✓ A l e x a ' s p l a i n t e x t re s p o n s e s h o u l d c o n t a i n : H e l l o . I ' m e x a m p l e s k i l l s f o r y o u r s e r v e r l e s s p ro j e c t s . ✓ A l e x a ' s p l a i n t e x t re s p o n s e s h o u l d c o n t a i n : P l e a s e t e l l m e y o u r n a m e . U s e r t r i g g e r s : N a m e I n t e n t S L O T S : { N a m e S l o t : Ts u y o s h i } ✓ A l e x a ' s p l a i n t e x t re s p o n s e s h o u l d c o n t a i n : N i c e t o m e e t y o u , Ts u y o s h i . E n j o y A l e x a w o r l d ! 4 p a s s i n g ( 1 6 m s )
  • 43. ESLint help you to check your code https://eslint.org/
  • 44. “Shifter man” is tested two way # Check the code syntax by ESLint $ npm run lint # Test the conversation by alexa-conversation $ npm test https://github.com/getshifter/alexa-shifterman/blob/master/README.md
  • 45. Easy to create Alexa Skills, but We want to … • Test our code in local environment • Deploy our code automatically • Manage our resources in AWS.
  • 46. Serverless Framework: create & manage app https://serverless.com/
  • 47. $ npm install -g serverless $ serverless create -t aws-nodejs $ serverless deploy
  • 48. We can define AWS resources as YAML service: alexa-shifter provider: name: aws runtime: nodejs6.10 package: include: - node_modules/ functions: hello: handler: index.hello events: - alexaSkill
  • 49. We can define AWS resources as YAML service: alexa-shifter provider: name: aws runtime: nodejs6.10 package: include: - node_modules/ functions: hello: handler: index.hello events: - alexaSkill D e f i n e p ro v i d e r
  • 50. We can define AWS resources as YAML service: alexa-shifter provider: name: aws runtime: nodejs6.10 package: include: - node_modules/ functions: hello: handler: index.hello events: - alexaSkill I n c l u d e l i b r a r i e s D e f i n e p ro v i d e r
  • 51. We can define AWS resources as YAML service: alexa-shifter provider: name: aws runtime: nodejs6.10 package: include: - node_modules/ functions: hello: handler: index.hello events: - alexaSkill I n c l u d e l i b r a r i e s D e f i n e L a m b d a D e f i n e p ro v i d e r
  • 52. Easy to rollback & checking CloudWatch logs # Rollback $ serverless rollback --timestamp timestamp # Tail the Lamdbda’s log $ serverless logs -f hello -t https://serverless.com/framework/docs/providers/aws/cli-reference/
  • 53. Easy to create Alexa Skills, but We want to … • Test our code in local environment • Deploy our code automatically • Manage our resources in AWS.
  • 54. Serverless FW using CloudFormation https://serverless.com/
  • 55. We can define custom resources custom: stage: ${opt:stage, self:provider.stage} defaultProfile: default logRetentionInDays: development: "14" production: "90" default: "3" resources: Resources: HelloLogGroup: Properties: RetentionInDays: ${self:custom.logRetentionInDays.${self:custom.stage}, self:custom.logRetentionInDays.default}
  • 56. We can define custom resources custom: stage: ${opt:stage, self:provider.stage} defaultProfile: default logRetentionInDays: development: "14" production: "90" default: "3" resources: Resources: HelloLogGroup: Properties: RetentionInDays: ${self:custom.logRetentionInDays.${self:custom.stage}, self:custom.logRetentionInDays.default} D e f i n e p a r a m s
  • 57. We can define custom resources custom: stage: ${opt:stage, self:provider.stage} defaultProfile: default logRetentionInDays: development: "14" production: "90" default: "3" resources: Resources: HelloLogGroup: Properties: RetentionInDays: ${self:custom.logRetentionInDays.${self:custom.stage}, self:custom.logRetentionInDays.default} D e f i n e p a r a m s U p d a t e C W L p ro p s
  • 58. Easy to customize our AWS resources https://serverless.com/framework/docs/providers/aws/guide/serverless.yml/
  • 59. All examples are in our GitHub https://github.com/getshifter/alexa-shifterman
  • 60. Conclusion • We can easy to make voice app by Alexa • AWS help us to create & manage Alexa app • Let’s create own Alexa Skills !