More Related Content
Similar to 【IVS CTO Night & Day】Serverless & Mobile Updates (20)
More from Amazon Web Services Japan (20)
【IVS CTO Night & Day】Serverless & Mobile Updates
- 2. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
A m azo n W e b Se r v i c e s J ap an
- 6. AWS Serverless Repositoryを発表(プレビュー)
• サーバレスアプリの公開、共有が容易に
• 公開範囲を社内向けに限定することも可能
• Lambdaのコンソールからリポジトリに公開さ
れたアプリケーションを選択して利⽤可能
• 公開可能なアプリはServerless Application
Model(SAM)形式で、ソース⾃体はGitHubなど
に配置することもできる
• アプリケーションにはSPDXライセンス識別⼦
を付与する必要がある
- 8. AWS Lambda でトラフィックの移⾏と AWS
CodeDeploy を使⽤した段階的デプロイをサポート
• 事前に割り当てた割合に応じて、2つのバー
ジョン間でのトラフィックを制御することが可
能に
• また、CodeDeployと組み合わせることで、
Lambda Funcitionのロールアウトの管理がで
きるように
• https://forums.aws.amazon.com/ann.jspa?annID=5240
- 11. Amazon API Gatewayが
カナリアリリースをサポート
• API Gatewayに対して「緩やかな」デプロ
イを実⾏可能に
• 新バージョンのAPIが処理するリクエスト
の割合、および該当リクエストのみで有効
なStage変数を指定できる
• この設定が有効になると、CloudWatch
LogsのロググループとCloudWatchメトリ
クスが追加され、新バージョンの効果測定
を⾏える
• 東京を含む各リージョンで利⽤可能
NEWOLD
90% 10%
- 12. その他 API Gateway update
• API Gateway のバックエンド待ちタイムアウト設定
– API Integration(統合API)のタイムアウトのカスタマイズ設定が
可能に。50ms – 29sまでの範囲での設定が可能。
https://forums.aws.amazon.com/ann.jspa?annID=5231
• アクセスログに詳細ログの⽣成が可能に
– すでに提供済みのログの追加機能。この機能を通じて、CLF
(Common Log Format)、JSON、XML、およびCSVなどのさ
まざまな形式でアクセスログを⽣成可能
https://forums.aws.amazon.com/ann.jspa?annID=5230
- 21. Step Functions state machineの
updateが可能に
• これまでは、⼀度⽣成した state machineに変更
を加えることが出来ず新規に再作成する必要が
あったが、これにより既存のstate machineの
updateが可能となる
– ログや実⾏結果など単⼀のARN、ログ情報を継続して利⽤可能
– 更新前を含む90⽇間の実⾏結果が保持される
– https://forums.aws.amazon.com/ann.jspa?annID=5139
- 24. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
How does GraphQL work?
{
"id": "1",
"name": "Get Milk",
“priority": "1"
},
{
"id": “2",
"name": “Go to gym",
“priority": “5"
},…
type Query {
getTodos: [Todo]
}
type Todo {
id: ID!
name: String
description: String
priority: Int
duedate: String
}
query {
getTodos {
id
name
priority
}
}
Model data with
application schema
Client requests what it
needs
Only that data is
returned
- 25. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
What are the GraphQL benefits?
Rapid prototyping and iteration
Introspection
Co-location of data requirements & application views
- Implementations aren’t encoded in the server
Data behavior control
- Batching, request/response and real-time
Bandwidth optimization (N+1 problem)
- 26. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Can you do … with GraphQL?
Realtime? YES
Batching? YES
Pagination? YES
Relations? YES
Aggregations? YES
Search? YES
Offline? YES
- 27. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Service Cost per month
• Free Tier lasts for first 12 months
• Don’t forget to add Data Transfer + Database
• Always review the AWS Pricing Page for latest pricing
Free Tier Standard Cost
Queries 250,000 $4 / million
Real-time Updates 250,000 $2 / million
Real-time Connection-minutes 600,000 $0.08 / million
* US Pricing, as of December 1, 2017
- 28. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Pricing Example (all numbers per month)
• Chat application with 2,500 users
• Average user connects for 1,500 minutes
• Sends 1,000 and Receives 1,000 messages
• 2.5M queries and 2.5M real-time updates
AppSync Query 2.5M x $4/million = $10.00
AppSync Real-time 2.5M x $2/million = $5.00
AppSync Minutes 2,500 x 1,500 x $0.08/million = $0.30
Data Transfer 1KB x 2.5M = 2.4GB x $0.09 = $0.21
DynamoDB Database Free Tier (as long as store < 25Gb)
Total $15.51