[レポート]SRV315 Alexaスキルを作成するワークショップに参加してきました #reinvent

AWS re:Invent 2018のセッションレポートをラスベガスからお届けします。
2018.11.28

この記事は公開されてから1年以上経過しています。情報が古い可能性がありますので、ご注意ください。

セッション概要

【Title】
SRV315 - Alexa, Ask Jarvis to Create a Serverless App for Me

【Description】

Today, we can build and deploy a serverless application in minutes without having to write a line of code using pre-built AWS CloudFormation templates, or services such as the AWS Serverless Application Repository. But can we push the limits even more? In this workshop, we use the Serverless Application Repository combined with Amazon Alexa to create Iron Man's Jarvis look-a-like skill. You learn hands-on with Alexa, Amazon Lex, Amazon SageMaker, and the AWS Serverless Application Repository.

和訳

AWS CloudFormationテンプレートやAWS Serverless Application Repositoryなどのサービスを使用してコードラインを記述することなく、数分でサーバーレスアプリケーションを構築および展開できます。 しかし、我々は限界をさらに押し込むことができますか? このワークショップでは、Amazon Alexaと組み合わされたServerless Application Repositoryを使用して、Iron ManのJarvis look-a-likeスキルを作成します。 Alexa、Amazon Lex、Amazon SageMaker、AWS Serverless Application Repositoryで実践的なことを学びます。

ゴール

サーバーレスアプリケーションを作成するために必要なすべてのインテントを備えたAlexaスキルを作成すること。

使用するサービス

ワークショップの内容

 githubのコードをクローンします。

  • Alexaスキル
    • カスタムスキルの作成
    • カスタムインテントの作成
  • サービスの作成
    • サーバーレスアプリケーションの検索用メソッドを作成
    • サーバーレスアプリケーションのGETメソッドを作成
    • サーバーレスアプリケーションを作成、デプロイするメソッドを作成
  • Comprehend
    • comprehend-repository
  • DynamoDB(オプション)
  • アプリとスキルの接続
    • SAMテンプレートの作成
    • サービスをAlexa IntentとComprehendに接続する
    • Serverless App Repositoryに接続する
    • DynamoDBに接続する(オプション)

Alexaスキル

Alexa Developer Consoleでカスタムスキルを作成します。 バケットの作成

aws s3 mb s3://srv315-oka-backet

SAMのパッケージ化

sam package \
   --template-file template.yaml \
   --s3-bucket srv315-oka-backet \
   --output-template-file output.yaml

SAMデプロイ

sam deploy \
  --template-file output.yaml \
  --stack-name srv315-oka-stack \
  --capabilities CAPABILITY_IAM \
  --parameter-overrides AlexaAppId=srv315-oka-alexaapp \
  --region eu-west-1

まとめ・感想

このワークショップでは3人ずつのモブプロ体制で開発する形式でした。(行ってから知った)
私は英語全く喋れないんですが、開発してると知っている単語ばかり出て来るので意外とコミュケーションは取る事が出来たんですが、時間が足りず最後はタイムアップとなってしまいました。 まだ他にも予約しているワークショップがあるのでまた順次公開していきたいと思います!