2016.12.7
株式会社セクションナイン 吉田真吾
Anchors Aweigh !!
吉田真吾
n バックグラウンド
証券システム基盤開発
p 基盤開発、Oracleチューニングなど
エバンジェリスト
p 講演年間113回(2013年実績)
p AWS設計・構築・移行(2014-2015)
n 現在のしごと
(株) セクションナイン 代表取締役社長
p AWSコンサルティング〜実装まで
(株) Cloud Payment
p 技術顧問
n 実績等
p AWSウルトラクイズ
初代チャンピオン (2012年)
p AWS Samurai 2014
p AWSエキスパート養成読本 執筆
p AWS認定全資格(5種類)保持
p Oracle Database 11g認定 (OCP,
Performance Tuning)保持
The Moment 💕
Elastic
Beanstalk
Applications
Environment
Prod
The Moment 💕
Elastic
Beanstalk
Applications
Environment
Environment
Prod
Dev
The Moment 💕
Elastic
Beanstalk
Applications
Environment
Environment
Prod
Dev
Swap URL
The Moment 💕
Elastic
Beanstalk
Applications
Environment
Environment
Prod
Dev
The Moment 💕
Elastic
Beanstalk
Applications
Environment
Environment
Prod
Dev
_⼈⼈⼈⼈⼈⼈⼈⼈⼈⼈⼈⼈_
> なんてダイナミック! <
 ̄Y^Y^Y^Y^Y^Y^Y^Y^Y^Y^Y ̄
Lambdaはあらゆるアーキテクチャにおける
実行環境つきのコンポーネントになる
May the FaaS be with us!
AWS re:Invent 2016 感想
サーバーレス関連アップデート
• AWS Lambda が環境変数をサポート
• AWS Serverless Application Model (SAM) リリース
• [New] AWS Greengrass
• [New] AWS Snowball Edge
• [New] AWS Step Functions
• [New] Lambda@Edge
• Amazon Kinesis Firehose が Lambda に対応(予定)
• AWS Lambda が C# をサポート
• AWS Lambda Dead Letter Queue
AWS Serverless Application Model (SAM)
• サーバーレスアプリケーション全体
を CloudFormation テンプレートで
管理できる
• Lambda、API Gateway、
DynamoDB がサポートされている
• 個人的には今後チーム開発はこれが
もっともやりやすく(Serverless
FrameworkやChaliceより)なるん
じゃないかと想定
https://github.com/awslabs/serverless-application-model
AWS Serverless Application Model (SAM)
functions
app-spec
(template)
functions.zip
Lambda
bucket
DynamoDB
stack
CloudFormation
API
Gateway
SAM
https://github.com/awslabs/serverless-application-model
AWS Serverless Application Model (SAM)
functions
app-spec
(template)
functions.zip
Lambda
bucket
DynamoDB
stack
CloudFormation
API
Gateway
SAM
http://yoshidashingo.hatenablog.com/entry/2016/12/05/024120
Why NOT CodeBuild ??
machine:
timezone: Asia/Tokyo
dependencies:
override:
- sudo pip install awscli
post:
- aws configure set region $REGION
test:
override:
- echo "Nothing to do here”
deployment:
production:
branch: master
commands:
- zip app.zip index.js
- aws cloudformation package --template-file app-spec.yml --output-template-file app-spec.deploy --s3-bucket $S3_BUCKET_NAME
- aws cloudformation deploy --template-file app-spec.deploy --stack-name $STACK_NAME --capabilities CAPABILITY_IAM
circle.yml
環境変数がないとお話にならない…
Lambda goes everywhere!!
Snowball Edge
Greengrass
AWS IoT
Greengrass
Core
IoT SDK
Gateway
edge
location
edge
location
Origin
Lambda@Edge Step Functions
https://twitter.com/AWSreInvent/status/803686734571651074
AWS Lambda Dead Letter Queues (DLQ)
• 非同期でLambda
Functionを呼び出す場合
のリトライはデフォルト
で2回(計3回)
• SQSあるいはSNSトピッ
クにエラーイベントを送
信することで、メール通
知やリトライの継続など
を制御できるように
https://aws.amazon.com/jp/blogs/compute/robust-serverless-application-design-with-aws-lambda-dlq/
Amazon Lightsail
• みんな大好きVPS
• ミドルウェアセット
アップ済みも選択可能
• WordPress、Nginx、
Node.jsなど
https://aws.amazon.com/jp/blogs/news/amazon-lightsail-the-power-of-aws-the-simplicity-of-a-vps/
• 3クリックで起動
• ポート(Security Groups
相当)編集可能
Amazon Lightsail
• 今のところUS-EASTのみ
https://aws.amazon.com/jp/blogs/news/amazon-lightsail-the-power-of-aws-the-simplicity-of-a-vps/
• ブラウザで簡単にSSH
(クライアントからも可)
Amazon Lightsail
https://aws.amazon.com/jp/blogs/news/amazon-lightsail-the-power-of-aws-the-simplicity-of-a-vps/
Amazon Lightsail
https://aws.amazon.com/jp/blogs/news/amazon-lightsail-the-power-of-aws-the-simplicity-of-a-vps/
Amazon Lightsail
https://aws.amazon.com/jp/blogs/news/amazon-lightsail-the-power-of-aws-the-simplicity-of-a-vps/
https://aws.amazon.com/jp/blogs/news/amazon-lightsail-the-power-of-aws-the-simplicity-of-a-vps/
Amazon Lightsail
https://aws.amazon.com/jp/blogs/news/amazon-lightsail-the-power-of-aws-the-simplicity-of-a-vps/
$ ab -c 100 -n 10000 http://54.86.210.133/
Server Software: nginx/1.10.2
Server Hostname: 54.86.210.133
Server Port: 80
Document Path: /
Document Length: 3966 bytes
Concurrency Level: 100
Time taken for tests: 200.566 seconds
Complete requests: 10000
Failed requests: 0
Total transferred: 42520000 bytes
HTML transferred: 39660000 bytes
Requests per second: 49.86 [#/sec] (mean)
Time per request: 2005.659 [ms] (mean)
Time per request: 20.057 [ms] (mean, across all concurrent requests)
Transfer rate: 207.03 [Kbytes/sec] received
:
:
でも結構弱そう
そういえば…
http://www.slideshare.net/AmazonWebServices/aws-reinvent-2016-building-and-growing-a-successful-aws-user-group-dcs203
次世代のヒーローをみつけて
育てるのがコミュニティの役目
Anchors Aweigh!! - re:Invent報告@re:Port 2016

Anchors Aweigh!! - re:Invent報告@re:Port 2016