More Related Content Similar to いまさら聞けない Amazon EC2
Similar to いまさら聞けない Amazon EC2 (20) More from Yasuhiro Matsuo
More from Yasuhiro Matsuo (20) いまさら聞けない Amazon EC21. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
よくわかるAmazon EC2
EC2の今さら聞けない話
2014年3月17日(7月1日改訂)
アマゾンデータサービスジャパン株式会社
ソリューションアーキテクト 松尾康博
2. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
自己紹介
• 名前
– 松尾康博
• 所属
– アマゾンデータサービスジャパン株式会社
– ソリューションアーキテクト
– 小売業、製造業、HPCのお客様を担当
• 経歴等
– 1994 九州大学 計算機センターのジョブスケジューラ改良
– 2001 SI企業にて基幹系向け分散ミドルウェアの開発・導入
– 2006 Webベンチャー(CTO)
– 2009 SI企業にて仮想化基盤の研究・調査・構築・運用
– 2011 現職
3. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
このセッションのねらい
このような疑問を解消します
EC2の種類が多くてどれを選んだらよいかわからない
どのAMIを選んだらいいかわからない
起動オプションが多すぎてわからない
4. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
Agenda
Amazon EC2の概要
インスタンスタイプの概要
AMIとインスタンスタイプ
高性能オプション
1
2
3
4
5. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
アマゾンの3つのビジネス
一般消費者様
向けサービス
セラー様向け
サービス
企業様向け
サービス
Eコマース
(Amazon.co.jp)
マーケットプレイス
物流サービス提供
(Amazon Services)
クラウド
コンピューティング
(Amazon Web Services)
6. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
いつでも、必要なだけ、安価に
発電所
工場
送電線
電
気
クラウド
インターネット
ITユーザー
コ
ン
ピ
ュ
ー
タ
7. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
グローバルなインフラ
リージョン
米国西
オレゴン
EU西 東京
シンガポール
米国西
カリフォルニア
南米
米国東
米国政府
シドニー
=AWSのサービスを利用できる
データセンター群の拠点
8. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
8
AWSの様々なサービス
8
お客様のアプリケーション
認証
AWS IAM
モニタリング
Amazon
CloudWatch
Web管理画面
Management
Console
デプロイと自動化
AWS Elastic
Beanstalk
AWS CloudFromation
AWS OpsWorks
IDEプラグイン
Eclipse
Visual Studio
ライブラリ & SDKs
Java, PHP, .NET,
Python, Ruby
デプロイ&
アドミン
コンテンツ配信
Amazon CloudFront
メッセージ
Amazon SNS
Amazon SQS
分散処理
Elastic MapReduce
メール配信
Amazon SES
キャッシング
Amazon Elasticache
ワークフロー管理
Amazon SWF
アプリケーション
サービス
コンピュータ処理
Amazon EC2
Auto Scale
ストレージ
Amazon S3
Amazon EBS
AWS StorageGateway
データベース
Amazon RDS
Amazon DynamoDB
Amazon SimpleDB
Amazon RedShift
AWS グローバルインフラ
世界に拡がるリージョン, アベイラビリティゾーン, エッジロケーションAZRegion
ネットワーク & ルーティング
Amazon VPC / Amazon Elastic Load Balancer / Amazon Route 53 /AWS Direct Connect
インフラストラクチャ
サービス
9. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
Amazon EC2(Elastic Compute Cloud)
• 数分で起動し、1時間ごとの従量課金で利用可能な仮想
マシン
• ノード追加・削除、マシンスペック変更も数分で可能
• 管理者権限(root / Administrator) で利用可能
1
任意のゾーンに
分散配置可能
リージョン
EC2
アベイラビリティゾーンBアベイラビリティゾーンA
10. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
APIで利用できるのでインフラの自動化が可能
ec2-run-instances ami-b232d0db
--instance-count 3
--availability-zone
ap-northeast-1a
--instance-type m3.medium
ec2-run-instances ami-b232d0db
--instance-count 3
--availability-zone
ap-southeast-1a
--instance-type c3.large
11. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
キャパシティ予測に関する「面倒な作業」も不要に
キャパシ
ティ 余剰なキャパシティ
待ち時間&作業効率低下
実際の需要
予測した需要
オンプレの場合 AWSの場合
実際の需要
AWS
キャパシティの調達は硬直的。
難しい需要予測に時間
をかけなければならない。
たいてい予測は、はずれる。
予測に時間をかける必要なし。
需要に合わせて柔軟に
キャパシティを調達
12. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
オンプレでは常識だった「面倒な作業」を
AWSに移行することでを減らせます
需要計画 &
設計
調達
設置、実装
保守運用 &
容量拡張
困難な需要予測、計画
数週間にも及ぶ
購買リードタイム
導入以降変更できない
制約だらけの環境
リプレースの検討
3 - 5 年毎に
サイクルの繰り返し
技術/コスト革新から
の遅れ
13. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
セキュリティも重要なポイント
堅牢な物理ファシリティの構築・運用
多くの第三者認証の取得費用・維持
セキュリティに関する情報の収集作業
インフラ部分の脆弱性や脅威に対する対応
インシデント発生時の対応体制の構築
すべて費用に含まれています
14. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
認定 & 認証評価
SOX法
ISO 27001 認定
PCI DSS Level I 認定
HIPAA 準拠アーキテクチャ
SOC 1/SSAE 16/ISAE 3402/SOC 2
FISMA Low ATO
FISMA Moderate ATO 申請中
DIACAP MAC II Sensitive 申請中
FedRAMP
サービスヘルスダッシュボード
セキュリティ責任共有モデル
Customer/SI Partner/ISV がゲストOS
レベルのセキュリティを制御(パッチ運
用や運用管理含む)
パスワード管理やロールベースのアクセ
ス権管理を含むアプリケーションレベル
のセキュリティ
侵入検知/回避システムを含むホスト
ベースのファイアウォール
データの暗号化/複合化. ハードウェアセ
キュリティモジュール
アクセス権の分離
物理セキュリティ
複数レベル、複数要素による制御されて
いるアクセス環境
管理され必要性に応じたAWS従業員によ
るアクセス(必要最小限)
管理者層による管理者権限アクセス
管理ホストへの多要素認証で、管理され
必要性に応じたアクセス
全てのアクセスのログ収集、監視、そし
てレビュー
AWS管理者は顧客VMの中、アプリケー
ションとそのデータなどにはアクセスす
る権限をもたない
AWSにおけるクラウドセキュリティ概要
VMセキュリティ
Amazonアカウントへの多要素認証によ
るアクセス
インスタンスの隔離
• ハイパバイザレベルでの顧客に
よるファイアウォールの制御
• 隣にあるインスタンスへのアク
セスは許可されていない
• 仮想ディスクの管理レイヤがア
カウントのオーナだけがスト
レージ(EBS)にアクセスするこ
とを保証する
APIコールの暗号化のためのエンドポイ
ントのSSLサポート
ネットワークセキュリティ
セキュリティグループ設定によるインス
タンス毎のファイアウォール設定が可能
トラフィックはプロトコル、サービス
ポート、ソースIPによって制限できる (
個別IPまたはindividual IP or Classless
Inter-Domain Routing (CIDR)ブロッ
ク).
Virtual Private Cloud (VPC) により、
既存エンタープライズデータセンターと
論理的に隔離された複数のAWSリソース
との間にIPSec VPNでアクセス可能
15. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
セキュリティに対する継続的投資
保守・運用にかかる費用
オンプレと比べて
少ない運用費
「面倒な作業」が不要 = 見えないコストも削減
需要計画、設計、調達費用
購入費用(使わない分も含む)
オンプレミス AWS
利用料(使った分だけ)
16. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
Virtual Private Cloud
• クラウド内に、専用のネットワークを構築
• VPN接続することで、ハイブリッドクラウド環境が構築
可能
プライベート
サブネット
VPC Subnet
パブリック
サブネット
VPC Subnet
InternetGW
オンプレミス
専用NW領域
Internet
専用線
InternetVPN
VPN GW
Region
ハイブリッドクラウド
17. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
17
既に多くの日本企業がAWSクラウドを導入
18. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
NTTドコモ様
「しゃべってコンシェル」
• 数千台のEC2インスタンスを利用!
• AWSを利用することによって大組織の中で、
リーン・スタートアップの文化を醸成!
NTTドコモ 執行役員で
研究開発推進部長の
栄藤稔氏
19. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
AWSクラウドの導入を支える
パートナーエコシステム
SI(Consulting Partner) ISV(Technology Partner)
日本電気株式会社
日本電気株式会社
http://aws.amazon.com/jp/solutions/solution-providers-japan/
20. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
Agenda
Amazon EC2の概要
インスタンスタイプの概要
AMIとインスタンスタイプ
高性能オプション
1
2
3
4
21. © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
インスタンスの様々な分類軸
• インスタンスタイプ(ファミリー・世代)
• 仮想化方式
• EBS最適化
• ネットワーク
• 価格
22. © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
EC2インスタンスタイプ
• EC2起動時に任意のインスタンスタイプ(スペック)を選択可能
– http://aws.amazon.com/jp/ec2/instance-types/
128
64
32
16
8
4
2
1
1 2 4 8 16 32 64 128
EC2 Compute Units (ECU)
Memory(GB)
Small 1.7 GB
1 EC2 Compute Unit
1 virtual core
$0.092/0.115
Micro 613 MB
Up to 2 ECUs (for
short bursts)
$0.027/0.035
Large 7.5 GB
4 EC2 Compute Units
2 virtual cores
$0.368/0.460
Extra Large 15 GB
8 EC2 Compute Units
4 virtual cores
$0.736/$0.920
High-CPU Med 1.7 GB
5 EC2 Compute Units
2 virtual cores
$0.190/$0.285
High-CPU XL 7 GB
20 EC2 Compute Units
8 virtual cores
$0.760/$1.140
Cluster GPU 4XL 22 GB
33.5 EC2 Compute Units,
2 x NVIDIA Tesla “Fermi”
M2050 GPUs
$2.10/2.60
Cluster Compute 4XL 23 GB
33.5 EC2 Compute Units
$1.60/1.98
Cluster Compute 8XL 60.5 GB
88 EC2 Compute Units
$2.40/2.97
Medium 3.75 GB
2 EC2 Compute Unit
1 virtual core
$0.184/0.230
Hi-Mem 4XL 68.4 GB
26 EC2 Compute Units
8 virtual cores
$2.072/$2.280
Hi-Mem 2XL 34.2 GB
13 EC2 Compute Units
4 virtual cores
$1.036/$1.140
Hi-Mem XL 17.1 GB
6.5 EC2 Compute Units
2 virtual cores
$0.518/$0.570
23. 2006 2007 2008 2009 2010 2011 2012 2013
m1.small
m1.xlarge
m1.large
m1.small
m2.2xlarge
m2.4xlarge
c1.medium
c1.xlarge
m1.xlarge
m1.large
m1.small
cc2.8xlarge
cc1.4xlarge
cg1.4xlarge
t1.micro
m2.xlarge
m2.2xlarge
m2.4xlarge
c1.medium
c1.xlarge
m1.xlarge
m1.large
m1.small
hs1.8xlarge
m3.xlarge
m3.2xlarge
hi1.4xlarge
m1.medium
cc2.8xlarge
cc1.4xlarge
cg1.4xlarge
t1.micro
m2.xlarge
m2.2xlarge
m2.4xlarge
c1.medium
c1.xlarge
m1.xlarge
m1.large
m1.small
cc1.4xlarge
cg1.4xlarge
t1.micro
m2.xlarge
m2.2xlarge
m2.4xlarge
c1.medium
c1.xlarge
m1.xlarge
m1.large
m1.small
c3.large
c3.xlarge
c3.2xlarge
c3.4xlarge
c3.8xlarge
i2.large
i2.xlarge
i2.2xlarge
i2.4xlarge
i2.8xlarge
g2.2xlarge
cr1.8xlarge
hs1.8xlarge
m3.xlarge
m3.2xlarge
hi1.4xlarge
m1.medium
cc2.8xlarge
cc1.4xlarge
cg1.4xlarge
t1.micro
m2.xlarge
m2.2xlarge
m2.4xlarge
c1.medium
c1.xlarge
m1.xlarge
m1.large
m1.small
c1.medium
c1.xlarge
m1.xlarge
m1.large
m1.small
インスタンスタイプの歴史
AWSを開始した2006年より、様々な用途に応じた イン
スタンスタイプを随時追加し、利用可能
(2014年4月10日時点で34タイプ)
今後も新しいインスタンスタイプを追加予定
2014
t2.micro
t2.small
t2.midium
r3.large
r3.xlarge
r3.2xlarge
r3.4xlarge
r3.8xlarge
c3.large
c3.xlarge
c3.2xlarge
c3.4xlarge
c3.8xlarge
i2.large
i2.xlarge
i2.2xlarge
i2.4xlarge
i2.8xlarge
g2.2xlarge
cr1.8xlarge
hs1.8xlarge
m3.xlarge
m3.2xlarge
hi1.4xlarge
m1.medium
cc2.8xlarge
cc1.4xlarge
cg1.4xlarge
t1.micro
m2.xlarge
m2.2xlarge
m2.4xlarge
c1.medium
c1.xlarge
m1.xlarge
m1.large
m1.small
26. インスタンスファミリー
• インスタンスタイプを用途別に
分類
– 現状6つ
– 仮想CPUコア(vCPU)あたりのメモ
リサイズ割当て比率が目安
ファミリー
汎用
General Purpose
コンピューティング最適化
Compute Optimized
メモリ最適化
Memory Optimized
ストレージ最適化
Storage Optimized
マイクロインスタンス
Micro
GPUインスタンス
GPU
34. 2006 2007 2008 2009 2010 2011 2012 2013
m1.small
m1.xlarge
m1.large
m1.small
m2.2xlarge
m2.4xlarge
c1.medium
c1.xlarge
m1.xlarge
m1.large
m1.small
cc2.8xlarge
cc1.4xlarge
cg1.4xlarge
t1.micro
m2.xlarge
m2.2xlarge
m2.4xlarge
c1.medium
c1.xlarge
m1.xlarge
m1.large
m1.small
hs1.8xlarge
m3.xlarge
m3.2xlarge
hi1.4xlarge
m1.medium
cc2.8xlarge
cc1.4xlarge
cg1.4xlarge
t1.micro
m2.xlarge
m2.2xlarge
m2.4xlarge
c1.medium
c1.xlarge
m1.xlarge
m1.large
m1.small
cc1.4xlarge
cg1.4xlarge
t1.micro
m2.xlarge
m2.2xlarge
m2.4xlarge
c1.medium
c1.xlarge
m1.xlarge
m1.large
m1.small
c3.large
c3.xlarge
c3.2xlarge
c3.4xlarge
c3.8xlarge
i2.large
i2.xlarge
i2.2xlarge
i2.4xlarge
i2.8xlarge
g2.2xlarge
cr1.8xlarge
hs1.8xlarge
m3.xlarge
m3.2xlarge
hi1.4xlarge
m1.medium
cc2.8xlarge
cc1.4xlarge
cg1.4xlarge
t1.micro
m2.xlarge
m2.2xlarge
m2.4xlarge
c1.medium
c1.xlarge
m1.xlarge
m1.large
m1.small
c1.medium
c1.xlarge
m1.xlarge
m1.large
m1.small
インスタンスタイプの歴史(再掲)
2014
t2.micro
t2.small
t2.midium
r3.large
r3.xlarge
r3.2xlarge
r3.4xlarge
r3.8xlarge
c3.large
c3.xlarge
c3.2xlarge
c3.4xlarge
c3.8xlarge
i2.large
i2.xlarge
i2.2xlarge
i2.4xlarge
i2.8xlarge
g2.2xlarge
cr1.8xlarge
hs1.8xlarge
m3.xlarge
m3.2xlarge
hi1.4xlarge
m1.medium
cc2.8xlarge
cc1.4xlarge
cg1.4xlarge
t1.micro
m2.xlarge
m2.2xlarge
m2.4xlarge
c1.medium
c1.xlarge
m1.xlarge
m1.large
m1.small
2006年: 汎用(m1)
2008年: コンピューティング最適化(c1)
2009年: メモリ最適化 (m2)
2010年: GPU(cg1),マイクロ(t1)
2012年: 次世代汎用(M3)
2013年: 次世代コンピューティング(C3)、次世代スト
レージ(I2)、次世代GPU(G2)
2014年: 次世代メモリ最適化(r3)、次世代マイクロ(T2)
36. 世代と性能・価格
• 新世代を推奨
– 同一ファミリーの世代間では、新世代ほどスペックが良い場合
が多い
– 最近の世代は物理CPU型式も明示し、CPU性能が読みやすい
Size ECUs vCPUs
Memory
(GiB)
物理CPU
Network
Performance
Price
m3.medium 3 1 3.75
Intel Xeon
E5-2670
Moderate $0.171/h
m1.medium 2 1 3.75 Intel Xeon Moderate $0.175/h
※2014年3月17日時点。価格は東京リージョン
http://aws.amazon.com/jp/ec2/pricing/
例) 汎用ファミリー のmedium スペック比較
38. インスタンスサイズ
• 同一ファミリー・世代の中では、スペックは単
純に倍
– vCPUとメモリの比率は一定
– 料金もほぼ単純に倍
Size ECUs vCPUs
Memory
(GiB)
物理CPU
Network
Performance
Price
m3.medium 3 1 3.75
Intel Xeon
E5-2670
Moderate $0.101/h
m3. large 6.5 2 7.5 Moderate $0.203/h
m3.xlarge 13 4 15 High $0.405/h
m3.2xlarge 26 8 30 High $0.810/h
※2014年7月17日時点。価格は東京リージョン
http://aws.amazon.com/jp/ec2/pricing/
例) 汎用ファミリー 第2世代 M3のスペック一覧
39. インスタンスサイズ
タイプ
M1
C1
CC2
M2
CR1
HI1
HS1
T1
CG1
新世代
M3
C3
R3
I2
T2
G2
サイズ
M,L,XL,2XL
L, XL, 2XL, 4XL, 8XL
2XL
サイズ
S, M, L, XL
M, XL
8XL
XL, 2XL, 4XL
8XL
4XL
8XL
micro
4XL
ファミリー
汎用
コンピュート
メモリ
ストレージ
マイクロ
GPU
L, XL, 2XL, 4XL, 8XL
L, XL, 2XL, 4XL, 8XL
micro,S,M
40. © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
性能
インスタンスタイプごとに定義されているスペック
仮想コア数 (vCPU)
メモリ
ECU
ネットワークパフォーマンス
EBS最適化利用
http://aws.amazon.com/jp/ec2/instance-types/
41. © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
性能指標
Elastic Compute Unit (ECU)
コモディティハードウェア群で成り立っているEC2におい
て一貫性のあるCPU能力(整数演算)をインスタンスタイ
プ・サイズ間で比較する目安として定義
新世代では物理CPU型式も開示
Size ECUs vCPUs
Memory
(GiB)
物理CPU
Network
Performance
Price
m3.medium 3 1 3.75
Intel Xeon
E5-2670
Moderate $0.101/h
m1.medium 2 1 3.75 Intel Xeon Moderate $0.122/h
※2014年7月17日時点。価格は東京リージョン
http://aws.amazon.com/jp/ec2/pricing/
例) 汎用ファミリー の新旧medium スペック比較
42. © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
性能指標
ネットワークパフォーマンス
インスタンスサイズごとに帯域の目安を定義
「非常に低」〜 低 〜 中 〜 高速 〜 10ギガビット
一般的に、大きなインスタンスサイズだと帯域が増える
拡張ネットワーキング
C3,I2,R3で利用対応
低レイテンシを実現する新しいネットワークスタック
http://aws.amazon.com/jp/ec2/faqs/#enhanced-
networking
43. © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
性能指標
EBS最適化利用
EBS用帯域を別途確保する
インスタンスサイズ・タイプによっては未対応
一般的に、大きなインスタンスサイズだと帯域が増える
• 500Mbps〜 2000Mbps
EC2
normal
Net
work
PIOPS
EBS
PIOPS
EBS
EC2
通常 EBS-Optimized-Instance
EC2
EBS-
Optimized
Net
work
PIOPS
EBS
PIOPS
EBS
EC2
ストレージエリア
ネットワーク
通常
ネットワーク
ストレージエリア
ネットワーク
通常
ネットワーク
EBS向け帯域と競合 EBS向け帯域を専用に確保
44. © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
Agenda
Amazon EC2の概要
インスタンスタイプの概要
AMIとインスタンスタイプ
高性能オプション
1
2
3
4
45. © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
Amazon Machine Image (AMI)
• AMIはインスタンス作成に使用するイメージテンプレート
• AWS公式AMIや、サードパーティもAMIを提供
– https://aws.amazon.com/amis/
– https://aws.amazon.com/marketplace/
• 選択したAMIから起動する
• EC2インスタンスから、任意のタイミングで
カスタムAMIを作成できる
launch
Amazon
Machine
Image (AMI)
Amazon EC2インスタンス
46. © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
AMIとインスタンス、AZの関係
インスタンス
Amazon S3
AMI
Availability Zone-1a Availability Zone-1b
カスタム
AMI
AMIからインスタンスを
起動
カスタムAMIを使って、イ
ンスタンスを複数台起動
カスタムAMIを作成
必要に応じて共有設定
47. © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
AMIの分類軸
ビット数
32bit と 64bit
Virtualization Type (仮想化方式)
準仮想化( Paravirtual , PV)
完全仮想化(Hardware-assisted VM, HVM)
ブートストレージ
Instance Store
EBS Backed
これらの組み合わせで、対応するインスタンスタイプが決まる
http://aws.amazon.com/amazon-linux-ami/instance-type-matrix/
48. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
Instance Storeとは
• 特徴
– EC2の物理筐体のローカルディスク
– EC2インスタンスタイプにより、サイズと個
数、HDD/SSD、が予め決まっている。
• 利点
– 無料!
– 任意のファイルシステムが利用可能
– ローカルディスクのため、ネットワークの影
響を受けにくい(レイテンシ・帯域)
• 注意
– インスタンスを停止(Stop)すると、データが
消去される
※[重要]再起動(Reboot)では消えない。
– スナップショット機能はない
– 別のEC2に付替えができない
EC2
/dev/xvdg
/dev/xvdf
揮発性
EC2へマウント
49. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
EC2インスタンスタイプによる
選択可能な Instance Store
• EC2のタイプによって、選択できるInstance Storeは以下の通り。
Instance Type Instance Store Volumes
m1.small 1 x 160 GB†
m1.medium 1 x 410 GB
m1.large 2 x 420 GB (840 GB)
m1.xlarge 4 x 420 GB (1680 GB)
m2.xlarge 1 x 420 GB
m2.2xlarge 1 x 850 GB
m2.4xlarge 2 x 840 GB (1680 GB)
m3.medium 1 x 4 GB SSD
m3.large 1 x 32 GB SSD
m3.xlarge 2 x 40 GB SSD (80 GB)
m3.2xlarge 2 x 80 GB SSD (160 GB)
t1.micro
None
(use Amazon EBS volumes)
c1.medium 1 x 350 GB†
c1.xlarge 4 x 420 GB (1680 GB)
Instance Type Instance Store Volumes
c3.large 2 x 16 GB SSD (32 GB)
c3.xlarge 2 x 40 GB SSD (80 GB)
c3.2xlarge 2 x 80 GB SSD (160 GB)
c3.4xlarge 2 x 160 GB SSD (320 GB)
c3.8xlarge 2 x 320 GB SSD (640 GB)
cc2.8xlarge 4 x 840 GB (3360 GB)
cg1.4xlarge 2 x 840 GB (1680 GB)
cr1.8xlarge 2 x 120 GB SSD (240 GB)
hi1.4xlarge 2 x 1024 GB SSD (2048 GB)
hs1.8xlarge 24 x 2048 GB (49 TB)
i2.xlarge 1 x 800 GB SSD
i2.2xlarge 2 x 800 GB SSD (1600 GB)
i2.4xlarge 4 x 800 GB SSD (3200 GB)
i2.8xlarge 8 x 800 GB SSD (6400 GB)
※2014年3月15日時点
50. © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
ブートストレージ分類
・ 通常はこちらを用いる
(2009年後半に追加)
・ EC2に停止/終了のオプ
ション有
・ 停止しても、ファイル
システムは永続する
EBS-
Backed AMI
AMI (Amazon Machine Image
EC2のコピーをとりテンプレート化
することで、再利用可能
Instance Store-
Backed AMI
• EC2開始当初からある
• EC2に停止のオプションはない
• EC2を終了するとデータは消える
51. © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
AMIと仮想化方式
2つの仮想化方式
準仮想化( Paravirtual , PV)
完全仮想化(Hardware-assisted VM, HVM)
一般的に
歴史的にLinuxは PV AMIが多い (Windowsは全てHVM)
LinuxでもHVM AMIで性能向上が見込める場合が多い
現行世代の全てのタイプで HVMが動作可能
Tips
HVM でもPVドライバ利用で性能向上
VM Import/Exportでは HVMに対応
一部のCPU拡張命令(AVX等)はHVMのみ対応
52. © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
インスタンスタイプとAMIの仮想化方式
動作する組み合わせに注意
PVのみ動作する旧世代タイプ(M1,M2,C1,T1)
HVMのみ動作する高性能タイプ( T2,CC2, CR1, I2, R3)
HVM/PV両方動作する新世代タイプ(M3,C3,Hi1,HS1)
http://aws.amazon.com/amazon-linux-ami/instance-type-matrix/
現行世代は全てのタイプでHVMが動作!
53. © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
仮想化方式
注意点
PV AMIで、CC2やI2は起動できない
HVM AMIで、M1やC1は起動できない
PV AMIとHVM AMIを変換する機能は未提供
54. © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
AMIの分類軸(再掲)
ビット数
32bit と 64bit
Virtualization Type (仮想化方式)
準仮想化( Paravirtual , PV)
完全仮想化(Hardware-assisted VM, HVM)
ブートストレージ
Instance Store
EBS Backed
これらの組み合わせで、対応するインスタンスタイプが決まる
http://aws.amazon.com/amazon-linux-ami/instance-type-matrix/
55. © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
Agenda
Amazon EC2の概要
インスタンスタイプの概要
AMIとインスタンスタイプ
高性能オプション
1
2
3
4
56. © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
高性能インスタンス(10GbE対応)
• 計算向け
– Cluster Compute 8XL (cc2.8xlarge, c3.8xlarge)
– High Memory Cluster Compute (cr1.8xlarge, r3.8xlarge)
– Cluster Compute 4XL (cc1.4xlarge)(東京リージョン未対応)
– Cluster GPU 4XL (cg1.4xlarge) (東京リージョン未対応)
• グラフィック向け
– g2.2xlarge
• 高速I/O向け
– High IO (hi1.4xlarge, i2.8xlarge)
• 大容量ストレージ
– High Storage 8XL (hs1.8xlarge)
57. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
クラスタネットワーク( Placement Group)
高性能インスタンス間の通信を高速化するための機構
I2,C3,CG1,G2,CC2,Hi1,HS1で利用可能
論理クラスターを構築するネットワークの単位
1プレイスメントグループで220ノードを収容可能
アベイラビリティゾーンを跨げない
通常のEC2と比べ、約10倍の帯域と1/10のレイテンシ
帯域 最大10Gbps
HPCインスタンス間は、JumboFrameを使用
ノンブロッキング
Full bisection の帯域
Placement Group内のインスタンス間の通信帯域
は 10Gbps full bisectionのネットワーク
Full bisection bandwidth
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html
58. © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
HPC インスタンスとその変遷
• コンピュートファミリーの最上位スペック
• 新しいCPUに対応する形で、新世代を提供
CC1 CC2.8xlarge C3.8xlarge
vCPU 16 32 32
RAM (GiB) 23 60.5 60
CPU Xeon X5570
(Nehalem)
Xeon E5-2670
(Sandy Bridge)
Xeon E5-2680v2
(Ivy Bridge)
NIC 10Gbps 10Gbps 10Gbps
Launch Date Jul, 2010 Nov, 2011 Nov, 2013
59. © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
59
G2 インスタンス
• NVIDIA GRID™ (GK104 "Kepler") GPU (Graphics Processing Unit),
1,536 CUDA cores and 4 GB of video (frame buffer) RAM.
• 2.6 GHz Intel Sandy Bridge,5 GiB of RAM, 60 GB of SSD storage.
• US East, US West (Northern California), US West (Oregon), EU
(Ireland)、東京リージョンで提供
60. © 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
GPU インスタンスの比較
Cg1.4xlarge G2.2xlarge
vCPU数 16 8
総ECU 33.5 26
RAM (GiB) 22.5 15
CPU Xeon X5570
(Nehalem)
Xeon E5-2670
(Sandy Bridge)
拡張命令 AVX, Turbo
GPU Tesla (Fermi) GF100
448core, 3GB
Kepler GK104
1536core, 4GB
対応機能 CUDA5.5,OpenCL1.1
,DirectCompute
→
OpenGL4.3, DirectX (9-
11),
Grid SDK
Price $2.10/h $0.65/h
61. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
I2インスタンス
Size ECUs
vCPU
s
Memory
(GiB)
Instance Storage
(GiB)
EBS-
Optimized
Network
Performance
i2.xlarge 14 4 30.5 1 x 800 (SSD) Yes Moderate
i2.2xlarge 27 8 61 2 x 800 (SSD) Yes High
i2.4xlarge 53 16 122 4 x 800 (SSD) Yes High
i2.8xlarge 104 32 244 8 x 800 (SSD) - 10 Gigabit
・高IOPSを実現するインスタンスタイプ
・高速なSSD(Instance Store)を内蔵
・ネットワークも高速(最大10Gbps)
※2014年3月15日時点
62. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
HS1 (ハイストレージ)インスタンス
Size ECUs
vCPU
s
Memory
(GiB)
Instance Storage
(GiB)
Network
Performance
hs1.8xlarge 14 35 117 24 x 2048(HDD) 10gigabit
・大容量と高速なシーケンシャルI/Oを実現
2MiB Read: 2.4GB/s
2MiB Write: 2.6GB/s
・大量のHDD(Instance Store)を24本内蔵
・高速ネットワーク(10Gbps)
※2014年3月17日時点
63. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
AWS Cloud
Availability Zone Availability Zone
サイジングの例
スケールUp/Out対応を見越した例
AWS Cloud
Availability Zone
EC2
Web
Availability Zone
EC2
Web
EC2
Web
EC2
Web
EC2
Web
EC2
Web
HVMのみ対応の高性能インスタンスに
簡単にスケールUp可能な構成
DB
(Act)
DB
(Stb)
DB
(Act)
DB
(Stb)
t2.micro(HVM)
m3.medium
(HVM)
cr1.8xlarge
(HVM)
c3.2xlarge(HVM)
66. AWS 無料利用枠(12ヵ月)
Amazon EC2 750時間/月のLinux マイクロインスタンス
• 複数インスタンスの場合も、合計750時間/月であれば無料利用枠に該当
Amazon EC2 750時間/月のWindows Server マイクロインスタンス
• 複数インスタンスの場合も、合計750時間/月であれば無料利用枠に該当
Amazon EBS
• 30 GB に加え、200万 I/O、スナップショット ストレージ 1 GB
Elastic Load Balancing
• 750時間に加え 15 GB 分のデータ処理
帯域幅「送信(アウト)」15 GB
Amazon S3 ストレージ
• 5 GBの容量、20,000 Get リクエスト、2,000 Put リクエスト
DynamoDB、SimpleDB、SWF、SQS、SNS、CloudWatch
http://aws.amazon.com/jp/free/
AWS 無料枠
70. コースフローと認定資格
役割/レベル 基礎 アソシエイト プロフェッショナル マスター
ソリューション
アーキテクト
SysOppsアドミ
ニストレーター
デベロッパー
AWS
実践
入門1
(1日)
AWS
実践
入門2
(1日)
Architecting
on AWS
(3日)
Systems
Operations
on AWS
(3日)
Developing
on AWS
(3日)
日本未提供
Advanced
Operations
on AWS
(3日)
Architecting
on AWS
Advanced
Concepts
認
定
試
験
認
定
試
験
認
定
試
験
認
定
試
験
認
定
試
験
認
定
試
験
認
定
試
験
提供コース 提供予定コース
認
定
Q2予定
コース:5月
認定:6月
コース:3月
認定:4月
AWS
実践
入門1
(1日)
AWS
実践
入門1
(1日)
オプションコース
73. © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
Editor's Notes And just like an electricity grid, where you would not wire every factory to the same power station, the AWS infrastructure is global, with multiple regions around the globe from which services are available. This means you have control over things like where you applications run, where you data is stored, and where best to serve your customers from. 非常に有名な企業様も使っています。
ロゴで表すとこんな感じです。
ちなみに日本でのお客様は20,000以上という事になっています。非常に多いお客様がいます。
新しく、システム管理者とデベロッパーコースおよび認定試験が提供されます。