startup on aws usecases startupday ·...

79
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. "Startup on AWS" use-cases from AWS Startup Tech Community Amazon Web Services Japan | March 12, 2018 #AWSStartupJP

Upload: others

Post on 22-May-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

"Startup on AWS" use-cases from AWS Startup Tech CommunityAmazon Web Services Japan ���� | March 12, 2018

#AWSStartupJP

Page 2: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

3!1�

-

Amazon Web Services JapanSenior Solutions Architect / Manager, Solutions Architecture - Startups

/�4+ @shinodogg

2002" TIS)#�.�.2007"*�)#�.�.2013" Amazon Web Services Japan �.2017"MBA in International Business – University of Tsukuba�

2014"1'��AWS Startup Tech Community�5������6&(Startup CTO%$,�( #CTONight )0�-� 2�����J

���AWS����7 AWS �������IDE7AWS Cloud9

#AWSStartupJP

Page 3: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

AWS Startup Tech Community• AWS�����Startup��� �������• ����������������������

#AWSStartupJP

Page 4: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

AWS Startup Tech Meetup

• � #�Meetup(������!�)&�• "$�%'�Amazon ������������������

#AWSStartupJP

Page 5: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

“Startup on AWS” use-cases in Japan• ���Startup�������� �����

#AWSStartupJP

Page 6: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

“Startup on AWS” use-cases in Japan

• ���Startup�������� �����

#AWSStartupJP

Page 7: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

“Startup on AWS” use-cases in Japan

• ���Startup�� �����������������• Startup Evangelist�Mackenzie(@mkosut)������CTO�������

#AWSStartupJP

Page 8: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

������������

scouty�����

Voicy������

Speee�� ���

Enechange�����

#AWSStartupJP

Page 9: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

Enjoy “Startup on AWS” use-cases!

• &($-/E3:�C8B�A�������������������?K Ask the Speaker / Ask an Architect+0%�L

• DH�1F�7����Startup5@�;G>= ����AWS'.,0$-/!0")#*�4I�6J2� ���?K�9<����J

#AWSStartupJP

Page 10: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

アルゴリズムマネジメント株式会社 scouty 伊藤勝梧 | 2018-03-12

Page 11: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

自己紹介

伊藤 勝梧 @showwin

株式会社 scouty

リードエンジニア

2015年、京都大学で計算機科学の学士号を取得。人工知能を専攻。クラウドソーシングにおける受注履歴からのワーカーのスキル判定を研究。2015年にAWS 認定ソリューションアーキテクトに認定。Cookpad, beBit, 株式会社MMM サーバーサイドエンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。

好きなマネージドサービス:DynamoDB

最近の興味: スクラム、デザインパターン

Page 12: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

scouty について

ネット上のオープンデータ(SNS・ブログ・イベントサイトなど)から情報をクロールし、個人に関するデータを統合。ネット上に情報を公開している人すべてが対象で、従来の転職サービスのような会員登録を必要としません。

人々のつぶやき・経歴・投稿・所属会社・転職履歴などの様々なデータを機械学習の力で解析し、個人の退職タイミングと退職確率を予測。その人に最適な企業をマッチングし、スカウトを送ります。

オープンデータをクロール 機械学習によるマッチング

Page 13: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

Page 14: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

scouty crawler のインフラ構成図

AmazonDynamoDB

Amazon ECS

Amazon ECS

Amazon ECS

Amazon ECS

AmazonSQS

Elastic Load Balancing*

AWS Lambda

Amazon CloudWatch

AmazonRDS Aurora ( MySQL 5.7)

Amazon ElastiCache

sns-activity watcher

workerscrapy(crawler)

メインサービス

クロールした生データのdiff

整形されたデータ

event (time-based) ①

④⑤

③⑥

⑥⑥

Page 15: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

scouty の取り組む機械学習4分野

マッチング 退職率予測 クローリング スカウトメール会社と候補者のスキルマッチング 退職確率分布推定 イベント出席履歴からの居住地

判定 スカウトメール解析

会社と候補者のカルチャーマッチング ニューラルネット退職率予測 ブログ記事などの非構造化デー

タからの意味抽出 スカウトメール自動校正

マッチングの適合フィードバック

Twitterなどからの自然言語処理による判定 候補者のスキルのスコアリング スカウトメールドラフト自動

生成

イベント参加履歴やプロフィール変更履歴からの判定

ソースコードに基づくスキル判定

SNSアカウントの名寄せ(同一性判定)

スキル関連度推定

Page 16: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

機械学習系サービス開発で起こりがちな問題

• 機械学習チームが最適化しようとしている指標が、実はビジネス的には嬉しくなかった。

• アルゴリズムを作っている途中で、実は機械学習でやる必要がないことが発覚する。

• 「機械学習で何かしたい」MLエンジニアがいて、ルールベースの手法を使うことを嫌がる。

• 精度が1%上がるとどの程度嬉しいのかわからず、機能開発の優先度が決められない。

Page 17: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

scouty で起きた問題

ブログ記事

Qiita記事

上級中級初級

識別

作りたいアルゴリズム 機械学習チームの動き1.まずは、人力で記事にアノテーションをつけたものを学習してプロトタイピングすることに。

2.初級・中級・上級の判定基準を示すガイドラインをMLエンジニアが作成。

3.社内のエンジニアなどにアノテートしてもらう。

4.クラウドワーカーを使って大量にアノテートする。書き手のスキルレベル

Page 18: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

scouty で起きた問題

起きた問題1.アノテートしたら、評価基準を作ったにもかかわらず、評価者により評価がバラけた。

2.その原因が「基準が曖昧だから」なのか「そもそも記事からスキルセットを評価できないから」なのかという議論が起こる。

3.いいね!数だと 何が問題なの?という議論に発展。

4.本当に知りたいのは「上級レベルだけどいいねされていない記事」と「低級レベルだけどいいねされている記事」の検出だった、と判明。

5.その課題が緊急でないとアルゴリズムマネージャが判断し、この機能開発は延期した。

Page 19: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

scouty で起きた問題

反省点

• 顧客の課題は何か?という部分がクリアになっていなかった。

• 課題ではなくソリューション/好奇心から入ってしまった。

• 実装者ドリブンでアルゴリズムの仕様を決めてはいけない。

プロダクトの仕様/設計をエンジニアがその場でやらない事と同じように、アルゴリズムの仕様もその場でやると怪我をする。

Page 20: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

scouty の推進する「アルゴリズムマネージャ」

売上

継続率

単価1スカウトあたりのCVR

候補者の転職確度

マッチングの精度

退職率予測の精度

スキル推定の精度 UIの使いやすさ

採用工数

顧客ニーズの把握

Page 21: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

scouty の推進する「アルゴリズムマネージャ」

アルゴリズムマネージャ

そのアルゴリズム、顧客(市場)は必要としているの?メトリクス定義

マイルストン構築 事前リサーチ

技術選定

顧客にニーズ調査

オペレーション設計

ディレクション PMとのやりとり

Page 22: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

AWS Code Build / Pipeline� �����������Voicy ��� | 2018−03−12

Page 23: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

CB:I VoicyCTO

JFV; @yuji0316

1999A��SIer�TN�PS�EC ���!#-�UG�,& .5%�LX�

2016A��>�+5"/69D���Voicy� 0�5�E<�)45%��6'6��*2��5)1�������*4 ��%,& .5%�"6-(3$�5��O��

?��AWSYElastic Beanstalk

?��QRYWH=8QR

M@K7

Page 24: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

������

��� �������� ��� ����� �����

����������

��������

���

… and more

iPhone&

Android

Page 25: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

����0!

+�#��'�����������-�4"1�%$6

������ �������� .),*5�� (#�/�� &32��

Page 26: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

�����

������������ ����

��

Page 27: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

�������

��������� �

Page 28: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

�����

������

Page 29: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

�������

�����Elastic Beanstalk����

Availability Zone

Availability Zone

�� ELB EC2

EC2

RDS

RDS(Backup)

Auto Scaling group

Elastic Beanstalk container

Page 30: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

!������ �

����$# ����&�

����%�"�����

�������!������ �'

Page 31: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

���������

!�������� �"�(+������� �)�

Page 32: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

���� ��

… and more

��������������

����������

��������

���

iPhone&

Android

Page 33: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

���������

��� ������

Page 34: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

������

��������

Page 35: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

/��"(%#.,

����������

��7��

����5���������$&'#08��� 6*+ �����413�������2-�"(%#��!�!)�5���� m(_ _)m

Page 36: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

((*$,27-.

����������

��8��

����6�� ������%')$09���!7-.������514�������3/�#*&$��"�"+�6�����m(_ _)m

��� � �

Page 37: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

55:#;EI=>

����KQ

9WEB��/5�#0:)#-:���ABM� �55:#;E�A�

955:#2"3:6�,6* 08*�JN�'#)G/D?G��L�

955:#CP�,6*→0+"18 8$:6M�→(/7��O<

9'#)F@�(/7�������DHF@�(/7�� ����

9DHF@�2"3:6�master.48%�/&!3������ ����

Page 38: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

���� ���

AWS CodeBuild & AWS Code Pipeline �����������

AWS CodeBuild

AWSCodePipeline

BuildSource Deploy

AWS Elastic Beanstalk

GitHub

Page 39: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

�� �#5;*+

AWS CodeBuild & AWS Code Pipeline 2768

�>.�����9,

�%�$7� �GitHub�Elastic Beanstalk�/1

�<@������������'(7-:

�")��0&�4=� ���?3!��

AWS CodeBuild

AWS CodePipeline

Page 40: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

AWS CodeBuild

AWS CodeBuild ���(,��+�.%E

Go 1.8�5����• CodeBuild��*-&����=�Docker�.$'�3:���

• Voicy��Go�4@����)"�0 A?#0-��dep�4@���

• dep�Go 1.821�9D���3:����.$'��Go 1.7�5�������

• buildspec.yml�>6�Go 1.8��.!%0-���*-&�,.&�8C����<7

///

phases:

install:

commands:

# Install Go 1.8 & dep command

- curl -sSL -o /tmp/go.tar.gzhttps://storage.googleapis.com/golang/go1.8.5.linux-amd64.tar.gz

- tar -C /usr/local -xzf /tmp/go.tar.gz

- export GOPATH=${HOME}/go && echo ${GOPATH}

- export PATH=/usr/local/go/bin:${GOPATH}/bin:${PATH} && echo ${PATH}

- go get -u github.com/golang/dep/cmd/dep

pre_build:

commands:

# Get go packages

- mkdir -p ${GOPATH}/${SRC_DIR} && cd ${GOPATH}/${SRC_DIR}

- mv ${CODEBUILD_SRC_DIR}/* ${CODEBUILD_SRC_DIR}/.??* .

- dep ensure

///

buildspec.yml (;B)

Page 41: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

AWS CodeBuild

AWS CodeBuild ����.2��1!5,J

Docker(5+-��;H�C��• VPC8�CodeBuild�7?��Docker(5+-�/03*$IP�A���B@;H�C��

• ����dep�>D�/*&6)�:=����

• ;H�C�����9FNAT'6,"#!�7?����46+ 5%��>D���

• NAT'6,"#!�E<�IG�������;H�C�� �.2������

VPC subnet 2

VPC

VPC subnet 1 VPC NAT gateway

Internet

�����������������NAT gateway�����

����������

Code Build�Docker����

Page 42: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

AWS CodeBuild

AWS CodeBuild ����15��4"8.N

Docker)8-/��?L�H��• VPC;�CodeBuild�:D �Docker)8-/�236,%IP�F���GE?L�H��

• ����dep�CI�2,'9+�=B����

• ?L�H�����NAT(9.#$" :D����79-!8& �CI���

• NAT(9.#$"�J@ MK�������?L�H����15������

VPC subnet 2

VPC

VPC subnet 1

VPC NAT gateway

Code Build�Docker����

Internet

A<MK��Docker)8-/�>�*30,.�NAT GW :D����

Page 43: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

���

• AWS CodePipeline�I:�#'�����>������+&) E6O

• AWS CodeBuild�A3�%)"I:�9;�JGNK�=H���@8�!&*�/B 1�7��O

• Elastic Beanstalk MD������0���O

• .<�AWS CodeCommit�AWS CodeDeploy��L?�����O

• Lambda�EC2-�$ �2C�((,�F45�G�O

Page 44: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

���������������� ��

Voice Tech Company

Page 45: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

���� �� ServerlessAWS SAM Local������������� Speee���� | 2018-03-12

Page 46: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

���&�

�Speee��� Serverless "��

���� ���!����

�$�'#%���������

�Serverless���AWS Lambda���

Page 47: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

���������

�AWS Lambda��������� �

�AwS Lambda� ������

�AWS SAM Local������

Page 48: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

Agenda

�$�#�

�Speee���

�Speee�� ����%�!��

�Speee�� Production ��Serverless�!��

�"�����Serverless��

����

Page 49: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

Agenda

�$�#�

�Speee���

�Speee�� ����%�!��

�Speee�� Production ��Serverless�!��

�"�����Serverless��

����

Page 50: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

J;I+

A>,G Speee�&�� & NE3F�'���

B:1< @selmertsx

89O7 /M:?LH646 / Social Game / Speee (now!)

Rails��web�"&�(�%'NE�)C/��

TypeScript.�npm package�-����AWS Lambda

@������

5� # (���(!�: kinesis firehose*=�K2: serverless, kubernetes, TypeScriptAWSD: 1=0���5� �'�$: ∀�'�$

Page 51: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

Agenda

�$�#�

�Speee���

�Speee�� ����%�!��

�Speee�� Production ��Serverless�!��

�"�����Serverless��

����

Page 52: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

Speee����

"��!

SEO Trading Desk

�� ��������!')DC*

Native Ad

�� ���������!')IM*

���� �������!)LM*

%(�

&�!�#�

�$�!

��%

Page 53: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

Speee����

"��!

SEO Trading Desk

�� ��������!')DC*

Native Ad

�� ���������!')IM*

���� �������!)LM*

%(�

&�!�#�

�$�!

��%

.3/41,24/+-0+-!!

Page 54: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

Agenda

�$�#�

�Speee���

�Speee�� ����%�!��

�Speee�� Production ��Serverless�!��

�"�����Serverless��

����

Page 55: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

Speee����3'�$!91&*

#Speee �3'�$! .��+5�4/2�7-)(?)���

#kubernetes / serverless�86�+5����,����

#K8s � AppSync �3'/ "��� ��$�� (0%

#����AWS SAM Local �����7����

Page 56: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

Agenda

�$�#�

�Speee���

�Speee�� ����%�!��

�Speee�� Production ��Serverless�!��

�"�����Serverless��

����

Page 57: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

Kinesis Firehose + QuickSight��������

�AWS Lambda���� Athenapartition ��

���� Athena����� �� Java JDBC Driver���������

Rails App

https://speakerdeck.com/selmertsx/20171019-aws-startup-tech

Page 58: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

AWS Lambda + API Gateway SendGrid�webhook�)�(�

�SendgridWebhook�9,���Events����;$5%+

����2<

�;$+

�:/���',

���!4..

�83�1��������������&#6�"1�7-�?

�83�1�Webhook����� >����*=�������Serverless0�

Page 59: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

�� AWS Lambda"'���

�Sidekiq-,$+&*

��������������#)�(!�������

�% �� Fastly Image Optimizer ��� ��…

Repository: https://github.com/pataiji/cloudmagick

Page 60: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

Agenda

�$�#�

�Speee���

�Speee�� ����%�!��

�Speee�� Production ��Serverless�!��

�"�����Serverless��

����

Page 61: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

=- (%�Serverless�,�#�"(�$&

'Lambda��(!� Chef�Itamae��86B2�+��

'Lambda �>4��9*�:�

'AWS SAM Local�sample�SlackToken��50/���.��

'chatops��UI�,�����;��3@�?���

'71�chatops (%� SAM Local�)A,�<���

Page 62: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

+�����Serverless�����,�-)�$*bot �

%!�API Gateway�AWS Lambda�(���#.

�AWS SAM Local�Headless Chrome�Lighthouse CliLighthouse� png)��webp�&���� '����/���"����

)��,��� => https://github.com/speee/iiopt

Page 63: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

0(�%!�Serverless'��GitHub PR����bot �

-+$API Gateway$AWS Lambda$DynamoDB.2$slack github account�1&�$,*��� ��� 3)�"��%���� ��������#��#/���

���

https://github.com/selmertsx/serverless-prpolice

Page 64: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

AWS Serverless Application Repository ����������

Lambda > ����� > �� ���������������

Page 65: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

AWS Serverless Application Repository �������"�

����&#'���$�!��

������ ������������%��� ��

Page 66: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

Agenda

�$�#�

�Speee���

�Speee�� ����%�!��

�Speee�� Production ��Serverless�!��

�"�����Serverless��

����

Page 67: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

���

+Speee�����!��"� Serverless�2���!

+AWS SAM Local �@8 �I>F1&,*�C���

+(%�:6�!L

+AWS SAM Local �� Local5E�Debugger�$),'��!

+AWS Serverless Application Repository��-/#4��L

+Local<3��A��Tips�����9J�K0�?=��

+7G.�D�H�����L

+;B� ��������

Page 68: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

AWS���������������� ����� | 2018

Page 69: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

B.@'

����!�71(= �#��!���G*(=���(=�)�6���������!�A;�H

"$C-0�����9&+��)6�54����

�!����>83:���H

RubyFD�%�&• 2004/ E?�E? !�#�

,2<.rb�%�&

Page 70: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

������������

���*H �>]V��P�@+]�*%[Z�U]L/].Cs�(ctje

N��*H jqP��[Z�U]L/]�(ctje

���������*H L �:�U\PM�4 loghkbtm_'�

SIM�*H )�SIM ].Cs�(ctje

O�*H��\��\,K_�AQR]�*HX3;&<X�9=5O$#0�]DF�Q$#7E]1�Q$-]��

�>8[�*H�]2!Pnpgh

B6Y�*HY]JG�US"?

�T]�*H_�IW^aif`rd

Page 71: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

������������

X *�AWEL=:���(8��X ��!�9�,AWEL=%�<$�

AMI@WE9��(

��Z��X �[

+�ZNTX��[

PSJKOBYR

Simchange

Z�[ AWEL=%�9��

PVO>JKGWHY DFKGWHY

DYQUYKZ��,#�;0[

?WOSAWEL=:,DYQUYK8��-

X PVE@CK8"3.2�:����614���(5$�

�'%614$����'%614���(8)&

5:, AWS%�:7/�/0\

��(9��$ 9�

Page 72: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

� ��������

��/

��c��a��d

2�cV^a��d

X\SUWObZ

Simchange

AWSMPN`U

��#MPN`U

2�#MPN`U

X\SUWObZ#MPN`U

Simchange#MPN`U

QbY_bU �&-MPN`U

AWS @FMPN`UL�<?I3,!a��5F+MPN`UGE�� 8�)4[]SUe ��/�D�%DQRUL��@9KT[]SUe ��/LH>:J6C��L=KA93.#�E�0877K�.#1ET[]SUF3AWS Organization CBE )L�6;A@(��)

MPN`U�E�*a[]SUaT[]SU

��/�QRU'"E�$F AWS MPN`UE�

Page 73: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

��� ����AWS��� ����`he_qdXB��W AWS]b^qg\�.S�,

�&<

��t��r��u

@�tior��u

knfgjasm

Simchange

AWS]b^qg

cslpsg

�.�:]b^qg

A�XB�&<W#X�IUIBJ[�) GUFRPCA�&�X�&<�SXUIB56�/4QRPCAOW�%XBOrganization GUIB;,�W"=r*>LG(8SHUET!MPADTFZ]b^qg\ N[KTX�6QGB�&97Y�HI+�VX�?C

'�-03S��]b^qg$�\12

Page 74: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

�����

>2H(G�3CSOVN"�I

�!69HW

�! �CSOVNCLNQI��:C��%B'$�4=*�8H5?

&#� C&#�B</=, �CSOVNC"�I���%B�<4H5?

��

KRPJTM>C AWS "�C&#C)D,�!7;"�C��>&#�I� E0C��ALNQ&#�?7=DU ���C+�GU ���%C��C��

A@>� 8H��1.GF8-

Page 75: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

��� ����������

@CF �E?

KDNCOEC2"EBS"AMI"ELB"RDS 32P4��*;-25���OGLB=>FP5��%<��,:-85E?

AWS��5�(6@CF �E?0���4���

M Reserved InstanceM Data TransferM AHNF��

⇒��0'3$��6����4 �#���)15 AWS@CF<��

@CF �E?0"�!0'3$��5�

M � OAWS Activate GL?JIP32M ���M @CF �E?&.$/$3$KDNC

@CF �E?<��,:��7<��+"E?53$KDNC<��9,

Page 76: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

��� ����������

EC2 EBSNTQUMVQS

AMI

ENI EIP

EC2 ��?/1�:=PLJ��0ASG BAF-CPL�46IHG1C)�

EBS/AMIBA

EC2 @�8PLJ$���9HNKWUSJ��0��!C EC2 D��@��6;H

X AutoScalingGroupBADWOYNJ���7<@3E/PLD�)�F�&X DataPipeline?���%0

���%9H� X��

X EC2 J+�C WOYNE/RWY�,@'#>H5@2?3HX 5DRWY�,J�CPL��J��

�.��D(*

PL�4NKWUSJ���%7/"�

Page 77: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

���

3K]:�B@�3K]���ISF�A���• 3K]���AWS$&)�Y1�EX

3K9$&)TM�CQ�AWS�"�.)�8;• \N�`7��)-/*!,

• ���� Organization ������\NZH�[L

+(�.%��?0 AWS �"�.)�\N• 6����$&)^8'#�3K]9$&)�TM

$&)^8'#�V=�52�4U��_O• EC2 ��'#�����EBS ����V=�'#�52• Data Pipeline�CJDW• EBSR���G=�'#5�EX� � ��P<>

Page 78: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

Thank you!!!

Page 79: Startup on AWS usecases StartupDay · エンジニアを経験し、2016年11月、3人目のメンバーとしてscoutyにジョイン。 好きなマネージドサービス:DynamoDB

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

+-�&*����

Ask the Speaker(�.• ���!"�%'�,���

• Startup��"���������� ����$��� )�• AWS�#����� )�• Startup��"������� )�