サーバーレス⼊⾨ハンズオン...© 2020, amazon web services, inc. or its affiliates. all...
TRANSCRIPT
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
サーバーレス⼊⾨ハンズオンAWS Lambda と AWS AI Services を組み合わせてサーバーレスの世界を体験しよう︕
⾦澤 圭アマゾン ウェブ サービス ジャパン技術統括本部 レディネス&テックソリューション本部ソリューションアーキテクト
Twitterハッシュタグ #AWSInnovate
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
ハンズオン資料はこちらよりダウンロードできます
https://go.aws/2HVusYq
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
本セッションについて対象者
§ “サーバーレス” ってたまに聞くけど、実はよく知らない..
§ “サーバーレス” ってどんなときに有⽤なの︖メリットは何︖と思われているエンジニア / アーキテクトの⽅
ゴール§ 実際に⼿を動かし、具体的なソリューションの⼀部を作っていただきながら、
45分間でサーバーレスアーキテクチャの基本を抑えていただきます§ 他のハンズオンにチャレンジしたい︕実際のプロダクト開発で試してみたい︕
といった Next Action に繋げていただく
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
本セッションについて前提条件
§ AWS アカウントをお持ちであること§ ハンズオンの作業が、同⼀ AWS アカウントの他のリソースに影響する可能性があるため、
ハンズオン⽤の AWS アカウントをご⽤意いただくことをオススメします§ ハンズオンで扱う AWS サービスの操作権限がある IAM ユーザーでログインしてください
注意事項§ ハンズオンでは AWS の各種サービスの利⽤、リソースの作成を⾏います。§ 無料枠を超えるハンズオンもございますが、
その場合はご利⽤料⾦が発⽣することをあらかじめご認識ください。§ 学習後のリソースの削除も、お客様の責任でご実施をお願いします。
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
本セッションの内容§ このセッションの狙いについて§ 本ハンズオンで構築するもののご紹介§ サーバーレス基本のキ§ ハンズオン #1
§ ハンズオン #2
§ セッションの振り返りと Next Action 案§ (Option) リソースの削除
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
このセッションの狙いについて本ハンズオンで構築するもののご紹介サーバーレス基本のキハンズオン #1ハンズオン #2セッションの振り返りと Next Action 案(Option) リソースの削除
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
本ハンズオンセッションの狙い§ 45 分でサーバーレスの基本を
クイックに学んでいただく§ 説明よりも 体験 を重視§ Next Action に繋げていただく
グループ討論
デモンストレーション
視聴覚
読書
講義
👉
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
このセッションの狙いについて本ハンズオンで構築するもののご紹介サーバーレス基本のキハンズオン #1ハンズオン #2セッションの振り返りと Next Action 案(Option) リソースの削除
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
ストーリー #1商品開発現場でのポジネガ分析
・約2,000⼈からのフィードバック・ネガティブなものを⾃動判別する仕組みを作りたい・まずは MVP* をなるはやで使えるようにしたい・できれば将来的に様々な現場に横展開したいが、
どれくらい利⽤されるかは分からない
* Minimum Viable Product: 製品を提供する上で必要最⼩限の機能
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
ハンズオン #1
§ ⾃動判別の前段階となるサーバーレスな ポジネガ分析 Web API を作成します
AWS Lambda
AmazonAPI Gateway
AmazonComprehend
0.250.00
0.000.95
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
ストーリー #2インタビュー⾳源の⽂字起こし
・100 ⼈分の⾳源データ (.mp3)
・⾃⾝で⽂字起こしするのは⾟いので仕組み化したい・⾳源はバラバラに届くが、
届いた順になるはやで⽂字起こししていきたいそのため、仕組みは常に稼働している状態にしたい
・ただし、コストは少しでも抑えたい
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
ハンズオン #2
§ ⾳声データが格納されたことをトリガーに起動するサーバーレスな ⽂字起こしパイプライン を作成します
AWS Lambda
AmazonTranscribe
AmazonS3
AmazonS3
♪
⽂
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
このセッションの狙いについて本ハンズオンで構築するもののご紹介サーバーレス基本のキハンズオン #1ハンズオン #2セッションの振り返りと Next Action 案(Option) リソースの削除
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
新しいサービスを作って世に出したい︕何をする / 考える 必要がある︖🤔
サーバーのセットアップ
ミドルウェアのセットアップ
ランタイムの設定
可⽤性を⾼める設計
繁忙期に耐えうる設計︖
そもそも繁忙期って︖︖
セキュリティパッチ当てなきゃ
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
開発者がやりたいこと
ユーザーに価値を届ける
サーバーセットアップ
ミドルウェアセットアップ
セキュリティパッチ適⽤
耐障害性の確保
開発者がやらないといけないこと
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
サーバーレスアーキテクチャの特徴
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
サーバーレスアーキテクチャの特徴
サーバーのセットアップ
ミドルウェアのセットアップ
可⽤性を⾼める設計
セキュリティパッチ当てなきゃ
▶
▶
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
サーバーレスアーキテクチャの特徴
コスト最適な設計なの︖
繁忙期に耐えうる設計︖
そもそも繁忙期って︖︖
▶
▶
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
ストーリー #1商品開発現場でのポジネガ分析
・約2,000⼈からのフィードバック・ネガティブなものを⾃動判別する仕組みを作りたい・まずは MVP* をなるはやで使えるように したい・できれば将来的に様々な現場に横展開したいが、
どれくらい利⽤されるかは分からない
再掲
* Minimum Viable Product: 製品を提供する上で必要最⼩限の機能
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
ストーリー #2インタビュー⾳源の⽂字起こし
・100 ⼈分の⾳源データ (.mp3)
・⾃⾝で⽂字起こしするのは⾟いので仕組み化したい・⾳源はバラバラに届くが、
届いた順になるはやで⽂字起こししていきたいそのため、仕組みは常に稼働している状態にしたい
・ただし、コストは少しでも抑えたい
再掲
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS におけるサーバーレスサービスの代表例
AWS Lambda
§ サーバーのプロビジョニング・管理なしでプログラムを実⾏ できるサービス
§ プログラム実⾏のための準備、スケーリングなどは Lambda 側で実施開発者は コードを書くことに集中 できる
§ 料⾦体系はリクエストベース
Amazon API Gateway
§ サーバーのプロビジョニング・管理なしでAPI を作成・管理 できるサービス
§ 可⽤性の担保、スケーリングなどのAPI 管理で必要なことはサービス側に任せ、開発者は ビジネスの差別化に繋がる作業に集中 できる
§ REST API と Web Socket に対応
§ 料⾦体系はリクエストベース
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
本ハンズオンセッションで登場するサービス
Amazon Simple Storage Service (Amazon S3)§ 99.999999999% の耐久性を持つ オブジェクトストレージサービス§ 容量無制限、安価なストレージ、様々な AWS サービスと連携
Amazon Transcribe§ ⾳声をテキストに変換する ⽂字起こし サービス§ 2019年11⽉に⽇本語対応
Amazon Comprehend§ 機械学習を使⽤した ⾃然⾔語処理 サービス§ キーフレーズやエンティティ抽出、感情分析など
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
このセッションの狙いについて本ハンズオンで構築するもののご紹介サーバーレス基本のキハンズオン #1ハンズオン #2セッションの振り返りと Next Action 案(Option) リソースの削除
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
ストーリー #1商品開発現場でのポジネガ分析
・約2,000⼈からのフィードバック・ネガティブなものを⾃動判別する仕組みを作りたい・まずは MVP* をなるはやで使えるように したい・できれば将来的に様々な現場に横展開したいが、
どれくらい利⽤されるかは分からない
再掲
* Minimum Viable Product: 製品を提供する上で必要最⼩限の機能
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
ハンズオン #1
§ ⾃動判別の前段階となるサーバーレスな ポジネガ分析 Web API を作成します
AWS Lambda
AmazonAPI Gateway
AmazonComprehend
0.250.00
0.000.95
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
ハンズオン #1 - 1/3
§ Lambda 関数を作成する§ いわゆる “Hello World” してみる
AWS Lambda
AmazonAPI Gateway
AmazonComprehend
0.250.00
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
ハンズオン #1 - 2/3
§ IAM ロール* を修正し、Lambda 関数から Comprehend を操作する権限を付与
§ ポジネガ分析するように Lambda 関数を修正する
AWS Lambda
AmazonAPI Gateway
AmazonComprehend
0.250.00
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
ハンズオン #1 - 3/3
§ API Gateway を使い、Web API 化する§ ブラウザから Web API を叩けることを確認する
AWS Lambda
AmazonAPI Gateway
AmazonComprehend
0.250.00
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
このセッションの狙いについて本ハンズオンで構築するもののご紹介サーバーレス基本のキハンズオン #1ハンズオン #2セッションの振り返りと Next Action 案(Option) リソースの削除
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
ストーリー #2インタビュー⾳源の⽂字起こし
・100 ⼈分の⾳源データ (.mp3)
・⾃⾝で⽂字起こしするのは⾟いので仕組み化したい・⾳源はバラバラに届くが、
届いた順になるはやで⽂字起こししていきたいそのため、仕組みは常に稼働している状態にしたい
・ただし、コストは少しでも抑えたい
再掲
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
ハンズオン #2
§ ⾳声データが格納されたことをトリガーに起動するサーバーレスな ⽂字起こしパイプライン を作成します
AWS Lambda
AmazonTranscribe
AmazonS3
AmazonS3
♪
⽂
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
ハンズオン #2 - 1/3
§ S3 バケットを作成する “yourname-innovate-input”
§ S3 バケットへのファイルアップロードをトリガーに起動するLambda関数を作成する
AWS Lambda
AmazonTranscribe
AmazonS3
AmazonS3
♪
⽂
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
ハンズオン #2 - 2/3
§ Transcribe 単体での動作を確認します§ ⽂字起こし結果を出⼒するための S3 バケットを作成します
“yourname-innovate-output”
AWS Lambda
AmazonTranscribe
AmazonS3
AmazonS3
♪
⽂
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
ハンズオン #2 - 3/3
§ IAM ロールを修正し、Lambda 関数から Transcribe と S3 に関する権限を付与
§ Transcribe を呼び出すように Lambda 関数を修正する
AWS Lambda
AmazonTranscribe
AmazonS3
AmazonS3
♪
⽂
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
このセッションの狙いについて本ハンズオンで構築するもののご紹介サーバーレス基本のキハンズオン #1ハンズオン #2セッションの振り返りと Next Action 案(Option) リソースの削除
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
セッションの振り返り§ サーバーレスアーキテクチャの特徴§ AWS におけるサーバーレスサービスの代表例§ ハンズオン #1 - サーバーレスな ポジネガ分析 Web API の構築§ ハンズオン #2 – サーバーレスな ⽂字起こしパイプライン の作成
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
サーバーレスアーキテクチャの特徴 再掲
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS におけるサーバーレスサービスの代表例
AWS Lambda
§ サーバーのプロビジョニング・管理なしでプログラムを実⾏ できるサービス
§ プログラム実⾏のための準備、スケーリングなどは Lambda 側で実施開発者は コードを書くことに集中 できる
§ 料⾦体系はリクエストベース
Amazon API Gateway
§ サーバーのプロビジョニング・管理なしでAPI を作成・管理 できるサービス
§ 可⽤性の担保、スケーリングなどのAPI 管理で必要なことはサービス側に任せ、開発者は ビジネスの差別化に繋がる作業に集中 できる
§ 料⾦体系はリクエストベース
再掲
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
ストーリー #1商品開発現場でのポジネガ分析
・約2,000⼈からのフィードバック・ネガティブなものを⾃動判別する仕組みを作りたい・まずは MVP* をなるはやで使えるように したい・できれば将来的に様々な現場に横展開したいが、
どれくらい利⽤されるかは分からない
再掲
* Minimum Viable Product: 製品を提供する上で必要最⼩限の機能
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
ハンズオン #1
§ ⾃動判別の前段階となるサーバーレスな ポジネガ分析 Web API を作成します
AWS Lambda
AmazonAPI Gateway
AmazonComprehend
0.250.00
0.000.95
再掲
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
ストーリー #2インタビュー⾳源の⽂字起こし
・100 ⼈分の⾳源データ (.mp3)
・⾃⾝で⽂字起こしするのは⾟いので仕組み化したい・⾳源はバラバラに届くが、
届いた順になるはやで⽂字起こししていきたいそのため、仕組みは常に稼働している状態にしたい
・ただし、コストは少しでも抑えたい
再掲
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
ハンズオン #2
§ ⾳声データが格納されたことをトリガーに起動するサーバーレスな ⽂字起こしパイプライン を作成します
AWS Lambda
AmazonTranscribe
AmazonS3
AmazonS3
♪
⽂
再掲
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Next Action 案§ 各サービスの説明を詳細に聞き、深い知識の獲得 を狙う§ 本ハンズオンセッションで構築した構成に +α する開発 を⾏う
§ ポジネガ分析の結果を DynamoDB に格納する§ Transcribe で⽂字起こしをしたあとに、
そのテキスト情報を Input に感情分析を⾏う
§ 学んだことを周りの⼈に教える 勉強会を開催 する
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
本ハンズオンセッションの狙い§ 45 分でサーバーレスの基本を
クイックに学んでいただく§ 説明よりも 体験 を重視§ Next Action に繋げていただく
グループ討論
デモンストレーション
視聴覚
読書
講義
👉
再掲
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Next Action 案§ 各サービスの説明を詳細に聞き、深い知識の獲得 を狙う§ 本ハンズオンセッションで構築した構成に +α する開発 を⾏う
§ ポジネガ分析の結果を DynamoDB に格納する§ Transcribe で⽂字起こしをしたあとに、
そのテキスト情報を Input に感情分析を⾏う
§ 学んだことを周りの⼈に教える 勉強会を開催 する
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS Hands-on for Beginners のご紹介§ オンデマンド形式 で視聴できる ハンズオンシリーズ§ テーマごとに 1~2時間 の動画コンテンツ§ 10本前後の細かい動画から構成されており、
スキマ時間での学習 にもお役⽴ていただけます
§ “AWS ハンズオン” で検索 or 下のリンクからご視聴ください︕https://aws.amazon.com/jp/aws-jp-introduction/aws-jp-webinar-hands-on/
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
お役⽴ちリンク
AWS Innovate サーバーレスセッション・[S-18] 30 分で理解する︕SaaS と AWS のサーバーレスなつなぎ⽅・[S-19] アクセスの急増に耐え得るサーバーレスアプリケーションを作る⽅法
AWS Hands-on for Beginners シリーズの活⽤⽅法の紹介記事https://aws.amazon.com/jp/blogs/news/aws-hands-on-for-beginners-03/
AWS Hands-on for Beginners シリーズhttps://aws.amazon.com/jp/aws-jp-introduction/aws-jp-webinar-hands-on/
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
このセッションの狙いについて本ハンズオンで構築するもののご紹介サーバーレス基本のキハンズオン #1ハンズオン #2セッションの振り返りと Next Action 案(Option) リソースの削除
Thank you!
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
https://aws.amazon.com/jp/contact-us/
アンケートへのご協⼒
よろしくお願いします︕