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. よよよよよ Amazon EC2 EC2 よよよよよよよよよ 2014 年 3 年 17 年 (7 年 1 年年年 ) 年年年年年年年年年年年年年年年年年年年 年年年年年年年年年年年年年 年年年年

いまさら聞けない Amazon EC2

Embed Size (px)

DESCRIPTION

よくわかるAmazon EC2セミナーにて使用した資料です。

Citation preview

Page 1: いまさら聞けない Amazon EC2

© 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 日改訂 )

アマゾンデータサービスジャパン株式会社

ソリューションアーキテクト 松尾康博

Page 2: いまさら聞けない Amazon EC2

© 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 現職

Page 3: いまさら聞けない Amazon EC2

© 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 を選んだらいいかわからない起動オプションが多すぎてわからない

Page 4: いまさら聞けない Amazon EC2

© 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 とインスタンスタイプ

高性能オプション

123

Agenda

4

Page 5: いまさら聞けない Amazon EC2

© 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 )

Page 6: いまさら聞けない Amazon EC2

© 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 ユーザー

コンピュー

Page 7: いまさら聞けない Amazon EC2

© 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 のサービスを利用できる データセンター群の拠点

Page 8: いまさら聞けない Amazon EC2

© 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 CloudFromationAWS OpsWorks

IDE プラグインEclipse

Visual Studio

ライブラリ & SDKs

Java, PHP, .NET, Python, Ruby

デプロイ&アドミン

コンテンツ配信Amazon CloudFront

メッセージAmazon SNSAmazon SQS

分散処理Elastic MapReduce

メール配信 Amazon SES

キャッシングAmazon Elasticache

ワークフロー管理Amazon SWF

アプリケーションサービス

コンピュータ処理 Amazon EC2

Auto Scale

ストレージ Amazon S3Amazon EBS

AWS StorageGateway

データベースAmazon RDS

Amazon DynamoDBAmazon SimpleDBAmazon RedShift

AWS グローバルインフラ   世界に拡がるリージョン , アベイラビリティゾーン , エッジロケーションAZRegion

ネットワーク & ルーティングAmazon VPC / Amazon Elastic Load Balancer / Amazon Route 53 /AWS Direct Connect

インフラストラクチャサービス

Page 9: いまさら聞けない Amazon EC2

© 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

Page 10: いまさら聞けない Amazon EC2

© 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

Page 11: いまさら聞けない Amazon EC2

© 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

キャパシティの調達は硬直的。難しい需要予測に時間をかけなければならない。たいてい予測は、はずれる。

予測に時間をかける必要なし。需要に合わせて柔軟にキャパシティを調達

Page 12: いまさら聞けない Amazon EC2

© 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 年毎にサイクルの繰り返

し技術 / コスト革新からの遅れ

Page 13: いまさら聞けない Amazon EC2

© 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.

セキュリティも重要なポイント

堅牢な物理ファシリティの構築・運用多くの第三者認証の取得費用・維持セキュリティに関する情報の収集作業インフラ部分の脆弱性や脅威に対する対応インシデント発生時の対応体制の構築

すべて費用に含まれています

Page 14: いまさら聞けない Amazon EC2

© 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 2FISMA 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 でアクセス可能

Page 15: いまさら聞けない Amazon EC2

© 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

利用料 (使った分だけ )

Page 16: いまさら聞けない Amazon EC2

© 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

専用線

InternetVPNVPN GW

Region

ハイブリッドクラウド

Page 17: いまさら聞けない Amazon EC2

© 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 クラウドを導入

Page 18: いまさら聞けない Amazon EC2

© 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 ドコモ 執行役員で研究開発推進部長の栄藤稔氏

Page 19: いまさら聞けない Amazon EC2

© 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/

Page 20: いまさら聞けない Amazon EC2

© 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 とインスタンスタイプ

高性能オプション

123

Agenda

4

Page 21: いまさら聞けない Amazon EC2

© 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最適化• ネットワーク• 価格

Page 22: いまさら聞けない Amazon EC2

© 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)

Mem

ory

(G

B)

Small 1.7 GB1 EC2 Compute Unit1 virtual core$0.092/0.115

Micro 613 MB Up to 2 ECUs (for short bursts)$0.027/0.035

Large 7.5 GB4 EC2 Compute Units 2 virtual cores$0.368/0.460

Extra Large 15 GB 8 EC2 Compute Units4 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 Units8 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 GB2 EC2 Compute Unit1 virtual core$0.184/0.230

Hi-Mem 4XL 68.4 GB26 EC2 Compute Units 8 virtual cores $2.072/$2.280

Hi-Mem 2XL 34.2 GB13 EC2 Compute Units4 virtual cores $1.036/$1.140

Hi-Mem XL 17.1 GB6.5 EC2 Compute Units 2 virtual cores $0.518/$0.570

Page 23: いまさら聞けない Amazon EC2

2006 2007 2008 2009 2010 2011 2012 2013m1.small

m1.xlargem1.largem1.small

m2.2xlargem2.4xlargec1.mediumc1.xlargem1.xlargem1.largem1.small

cc2.8xlargecc1.4xlargecg1.4xlarge

t1.microm2.xlargem2.2xlargem2.4xlargec1.mediumc1.xlargem1.xlargem1.largem1.small

hs1.8xlargem3.xlarge

m3.2xlargehi1.4xlargem1.mediumcc2.8xlargecc1.4xlargecg1.4xlarge

t1.microm2.xlarge

m2.2xlargem2.4xlargec1.mediumc1.xlargem1.xlargem1.largem1.small

cc1.4xlargecg1.4xlarge

t1.microm2.xlarge

m2.2xlargem2.4xlargec1.mediumc1.xlargem1.xlargem1.largem1.small

c3.largec3.xlarge c3.2xlargec3.4xlargec3.8xlarge

i2.largei2.xlarge

i2.2xlarge i2.4xlargei2.8xlargeg2.2xlargecr1.8xlargehs1.8xlargem3.xlarge

m3.2xlargehi1.4xlargem1.mediumcc2.8xlargecc1.4xlargecg1.4xlarge

t1.microm2.xlarge

m2.2xlargem2.4xlargec1.mediumc1.xlargem1.xlargem1.largem1.small

c1.mediumc1.xlargem1.xlargem1.largem1.small

インスタンスタイプの歴史

AWS を開始した 2006 年より、様々な用途に応じた インスタンスタイプを随時追加し、利用可能(2014 年 4 月 10 日時点で 34 タイプ )

今後も新しいインスタンスタイプを追加予定

2014

t2.microt2.small

t2.midiumr3.large

r3.xlarger3.2xlarger3.4xlarger3.8xlargec3.large

c3.xlarge c3.2xlargec3.4xlargec3.8xlarge

i2.largei2.xlarge

i2.2xlarge i2.4xlargei2.8xlargeg2.2xlargecr1.8xlargehs1.8xlargem3.xlarge

m3.2xlargehi1.4xlargem1.mediumcc2.8xlargecc1.4xlargecg1.4xlarge

t1.microm2.xlarge

m2.2xlargem2.4xlargec1.mediumc1.xlargem1.xlargem1.largem1.small

Page 24: いまさら聞けない Amazon EC2

インスタンスタイプの整理

インスタンスファミリー

世代

インスタンスサイズ

C 3 . 8xlarge

インスタンスファミリー 世代 サイ

Page 25: いまさら聞けない Amazon EC2

インスタンスタイプの整理

インスタンスファミリー

世代

インスタンスサイズ

C 3 . 8xlarge

インスタンスファミリー 世代 サイ

Page 26: いまさら聞けない Amazon EC2

インスタンスファミリー• インスタンスタイプを用途別に

分類– 現状 6 つ– 仮想 CPU コア (vCPU)あたりのメ

モリサイズ割当て比率が目安

ファミリー

汎用General Purpose

コンピューティング最適化Compute Optimized

メモリ最適化Memory Optimized

ストレージ最適化Storage Optimized

マイクロインスタンスMicro

GPU インスタンスGPU

Page 27: いまさら聞けない Amazon EC2

インスタンスファミリー

汎用• バランスの取れた仮想コア (vCPU) と

メモリの割合• 一般的な用途に最適

– 小中規模 DB サーバ– 小中規模ファイルサーバ– 業務用サーバ– キャッシュサーバ

ファミリー

汎用General Purpose

コンピューティング最適化Compute Optimized

メモリ最適化Memory Optimized

ストレージ最適化Storage Optimized

マイクロインスタンスMicro

GPU インスタンスGPU

Page 28: いまさら聞けない Amazon EC2

インスタンスファミリー

コンピューティング最適化• メモリに対する vCPU の割合が高い• CPU 性能 / 価格 が最も良い• 計算的な用途に最適

– Web/ アプリケーションサーバ ( 業務処理 )– バッチ処理– 分散処理– 高性能価格技術計算 ( HPC)

ファミリー

汎用General Purpose

コンピューティング最適化Compute Optimized

メモリ最適化Memory Optimized

ストレージ最適化Storage Optimized

マイクロインスタンスMicro

GPU インスタンスGPU

Page 29: いまさら聞けない Amazon EC2

インスタンスファミリー

メモリ最適化• vCPUあたりのメモリの割合が高い• メモリ GiB単価が最も安い• メモリを多用する用途に最適

– 大規模 DB サーバ– 大規模インメモリデータベース– 大規模メモリキャッシュ– メモリを多用する分析処理 (ゲノム分析等 )

ファミリー

汎用General Purpose

コンピューティング最適化Compute Optimized

メモリ最適化Memory Optimized

ストレージ最適化Storage Optimized

マイクロインスタンスMicro

GPU インスタンスGPU

Page 30: いまさら聞けない Amazon EC2

インスタンスファミリー

ストレージ最適化• 高速・大容量のストレージを備える• 高いディスク I/O 要件に最適

– 大規模大容量 DB サーバ– 大規模 NoSQL– 大規模データウェアハウス– 大規模分散バッチ環境– 大規模クラスタファイルシステム

ファミリー

汎用General Purpose

コンピューティング最適化Compute Optimized

メモリ最適化Memory Optimized

ストレージ最適化Storage Optimized

マイクロインスタンスMicro

GPU インスタンスGPU

Page 31: いまさら聞けない Amazon EC2

インスタンスファミリー

マイクロインスタンス• 低スペックだが非常に低コストなタイ

プ– 無料枠で利用可能

• 性能が不要な要件に最適– 動作確認用– 通常は CPU 性能が不要なアプリケーション

ファミリー

汎用General Purpose

コンピューティング最適化Compute Optimized

メモリ最適化Memory Optimized

ストレージ最適化Storage Optimized

マイクロインスタンスMicro

GPU インスタンスGPU

Page 32: いまさら聞けない Amazon EC2

インスタンスファミリー

GPU インスタンス• グラフィックカードもしくは汎用

GPU カードを備える高性能なファミリー

• 並列計算や高速グラフィック要件に最適

– 科学・金融・レンダリング処理 (GPGPU)– ゲームストリーミング– 3D 画像ストリーミング

ファミリー

汎用General Purpose

コンピューティング最適化Compute Optimized

メモリ最適化Memory Optimized

ストレージ最適化Storage Optimized

マイクロインスタンスMicro

GPU インスタンスGPU

Page 33: いまさら聞けない Amazon EC2

インスタンスタイプの整理

インスタンスファミリー

世代

インスタンスサイズ

C 3 . 8xlarge

インスタンスファミリー 世代 サイ

Page 34: いまさら聞けない Amazon EC2

2006 2007 2008 2009 2010 2011 2012 2013m1.small

m1.xlargem1.largem1.small

m2.2xlargem2.4xlargec1.mediumc1.xlargem1.xlargem1.largem1.small

cc2.8xlargecc1.4xlargecg1.4xlarge

t1.microm2.xlargem2.2xlargem2.4xlargec1.mediumc1.xlargem1.xlargem1.largem1.small

hs1.8xlargem3.xlarge

m3.2xlargehi1.4xlargem1.mediumcc2.8xlargecc1.4xlargecg1.4xlarge

t1.microm2.xlarge

m2.2xlargem2.4xlargec1.mediumc1.xlargem1.xlargem1.largem1.small

cc1.4xlargecg1.4xlarge

t1.microm2.xlarge

m2.2xlargem2.4xlargec1.mediumc1.xlargem1.xlargem1.largem1.small

c3.largec3.xlarge c3.2xlargec3.4xlargec3.8xlarge

i2.largei2.xlarge

i2.2xlarge i2.4xlargei2.8xlargeg2.2xlargecr1.8xlargehs1.8xlargem3.xlarge

m3.2xlargehi1.4xlargem1.mediumcc2.8xlargecc1.4xlargecg1.4xlarge

t1.microm2.xlarge

m2.2xlargem2.4xlargec1.mediumc1.xlargem1.xlargem1.largem1.small

c1.mediumc1.xlargem1.xlargem1.largem1.small

インスタンスタイプの歴史 (再掲 )

2014

t2.microt2.small

t2.midiumr3.large

r3.xlarger3.2xlarger3.4xlarger3.8xlargec3.large

c3.xlarge c3.2xlargec3.4xlargec3.8xlarge

i2.largei2.xlarge

i2.2xlarge i2.4xlargei2.8xlargeg2.2xlargecr1.8xlargehs1.8xlargem3.xlarge

m3.2xlargehi1.4xlargem1.mediumcc2.8xlargecc1.4xlargecg1.4xlarge

t1.microm2.xlarge

m2.2xlargem2.4xlargec1.mediumc1.xlargem1.xlargem1.largem1.small

2006 年 : 汎用 (m1)

2008 年 : コンピューティング最適化 (c1)

2009 年 : メモリ最適化 (m2)

2010 年 : GPU(cg1), マイクロ (t1)

2012 年 : 次世代汎用 (M3)

2013 年 : 次世代コンピューティング (C3) 、次世代ストレージ (I2) 、次世代 GPU(G2)

2014 年 : 次世代メモリ最適化 (r3) 、次世代マイクロ (T2)

Page 35: いまさら聞けない Amazon EC2

インスタンスファミリーと世代ファミリー

汎用General Purpose

コンピューティング最適化Compute Optimized

メモリ最適化Memory Optimized

ストレージ最適化Storage Optimized

マイクロインスタンスMicro

GPU インスタンスGPU

旧世代 現行世代

M1 M3

C1CC2 C3

M2CR1 R3

HI1 I2HS1

T1 T2

CG1 G2

Page 36: いまさら聞けない Amazon EC2

世代と性能・価格• 新世代を推奨

– 同一ファミリーの世代間では、新世代ほどスペックが良い場合が多い

– 最近の世代は物理 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 スペック比較

Page 37: いまさら聞けない Amazon EC2

インスタンスタイプの整理

インスタンスファミリー

世代

インスタンスサイズ

C 3 . 8xlarge

インスタンスファミリー 世代 サイ

Page 38: いまさら聞けない Amazon EC2

インスタンスサイズ

• 同一ファミリー・世代の中では、スペックは単純に倍– 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 のスペック一覧

Page 39: いまさら聞けない Amazon EC2

インスタンスサイズ

タイプ

M1

C1CC2

M2CR1

HI1HS1

T1

CG1

新世代

M3

C3

R3

I2

T2

G2

サイズ

M,L,XL,2XL

L, XL, 2XL, 4XL, 8XL

2XL

サイズ

S, M, L, XL

M, XL8XL

XL, 2XL, 4XL8XL

4XL8XL

micro

4XL

ファミリー

汎用

コンピュート

メモリ

ストレージ

マイクロ

GPU

L, XL, 2XL, 4XL, 8XL

L, XL, 2XL, 4XL, 8XL

micro,S,M

Page 40: いまさら聞けない Amazon EC2

© 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/ 

Page 41: いまさら聞けない Amazon EC2

© 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 スペック比較

Page 42: いまさら聞けない Amazon EC2

© 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

Page 43: いまさら聞けない Amazon EC2

© 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

EC2normal

Network

PIOPSEBS

PIOPSEBS

EC2

通常 EBS-Optimized-Instance

EC2EBS-

OptimizedNet

work

PIOPSEBS

PIOPSEBS

EC2

ストレージエリアネットワーク

通常ネットワーク

ストレージエリアネットワーク

通常ネットワーク

EBS 向け帯域と競合 EBS 向け帯域を専用に確保

Page 44: いまさら聞けない Amazon EC2

© 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 とインスタンスタイプ

高性能オプション

123

Agenda

4

Page 45: いまさら聞けない Amazon EC2

© 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

AmazonMachineImage (AMI)

Amazon EC2 インスタンス

Page 46: いまさら聞けない Amazon EC2

© 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 を作成必要に応じて共有設定

Page 47: いまさら聞けない Amazon EC2

© 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/ 

 

Page 48: いまさら聞けない Amazon EC2

© 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へマウント

Page 49: いまさら聞けない Amazon EC2

© 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 GBm1.large 2 x 420 GB (840 GB)m1.xlarge 4 x 420 GB (1680 GB)m2.xlarge 1 x 420 GBm2.2xlarge 1 x 850 GBm2.4xlarge 2 x 840 GB (1680 GB)m3.medium 1 x 4 GB SSDm3.large 1 x 32 GB SSDm3.xlarge 2 x 40 GB SSD (80 GB)m3.2xlarge 2 x 80 GB SSD (160 GB)

t1.microNone (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 日時点

Page 50: いまさら聞けない Amazon EC2

© 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 ImageEC2 のコピーをとりテンプレート化

することで、再利用可能

Instance Store-Backed AMI

• EC2 開始当初からある

• EC2 に停止のオプションはない

• EC2 を終了するとデータは消える

Page 51: いまさら聞けない Amazon EC2

© 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 のみ対応

Page 52: いまさら聞けない Amazon EC2

© 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 が動作! 

Page 53: いまさら聞けない Amazon EC2

© 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 を変換する機能は未提供

Page 54: いまさら聞けない Amazon EC2

© 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/ 

 

Page 55: いまさら聞けない Amazon EC2

© 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 とインスタンスタイプ

高性能オプション

123

Agenda

4

Page 56: いまさら聞けない Amazon EC2

© 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)

Page 57: いまさら聞けない Amazon EC2

© 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 のレイテンシ帯域 最大 10GbpsHPC インスタンス間は、 JumboFrame を使用ノンブロッキング

Full bisection の帯域Placement Group内のインスタンス間の通信帯域は 10Gbps full bisection のネットワーク

Full bisection bandwidth

http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html

Page 58: いまさら聞けない Amazon EC2

© 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

Page 59: いまさら聞けない Amazon EC2

© 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) 、東京リージョンで提供

Page 60: いまさら聞けない Amazon EC2

© 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) GF100448core, 3GB

Kepler GK1041536core, 4GB

対応機能 CUDA5.5,OpenCL1.1,DirectCompute

→OpenGL4.3, DirectX (9-11),Grid SDK

Price $2.10/h $0.65/h

Page 61: いまさら聞けない Amazon EC2

© 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 vCPUs

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 日時点

Page 62: いまさら聞けない Amazon EC2

© 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 vCPUs

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 日時点

Page 63: いまさら聞けない Amazon EC2

© 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)

Page 64: いまさら聞けない Amazon EC2

まとめ

負荷特性に応じたインスタンス選択を最新インスタンス世代がお薦め仮想化方式も気配 りを高性能要件についてはネットワークにも注目

SSD

Page 65: いまさら聞けない Amazon EC2

まずはお試しください

アカウント開設ガイドhttp://aws.amazon.com/jp/register-flow/

AWS 課金体系と見積についてhttp://aws.amazon.com/jp/how-to-understand-pricing/

AWS アカウント 開設

AWS 見積もり

Page 66: いまさら聞けない Amazon EC2

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 無料枠

Page 67: いまさら聞けない Amazon EC2

定期開催セミナー・ハンズオンも多数取り揃えております。

Page 68: いまさら聞けない Amazon EC2

定期開催セミナー・ハンズオン

イベントセミナー情報一覧http://aws.amazon.com/jp/event_schedule/

• オフラインセミナー• はじめての AWS

• オンラインセミナー• はじめての AWS• AWS でコスト削減できる理由• はじめてのリザーブドインスタンス

• AWS体験ハンズオン• アカウント開設+ 仮想サーバー Amazon EC2編• Amazon S3編• セキュアウェブサービス基盤構築編

Page 69: いまさら聞けない Amazon EC2

AWS Training

自習(ハンズオン)を行うことで、AWS サービスに慣れ、さらに新しい知識を吸収し、 AWS 経験値を上げる。

自信を持って AWS上で設計、開発、運用ができるようになる AWS知識やスキルを習得する。(集合研修)

AWS の知識レベルの証明

Page 70: いまさら聞けない Amazon EC2

コースフローと認定資格役割/レベル 基礎 アソシエイト

 プロフェッショナル

マスター

ソリューションアーキテクト

SysOpps アドミニストレーター

デベロッパー

AWS実践

入門1( 1日)

AWS実践

入門2( 1日)

Architecting on AWS( 3 日)

Systems Operations

on AWS( 3 日)

Developingon AWS( 3 日)

日本未提供Advanced Operations

on AWS( 3 日)

Architectingon AWS

Advanced Concepts

認定試験

認定試験

認定試験

認定試験

認定試験

認定試験

認定試験

提供コース 提供予定コース 認定

Q2 予定

:コース 5 月認定: 6

:コース 3 月認定: 4

AWS実践

入門1( 1日)

AWS実践

入門1( 1日)

オプションコース

Page 71: いまさら聞けない Amazon EC2

サービスに対する疑問や質問、お見積りの相談などありましたら、お気 軽にお問いあわせください。

Page 72: いまさら聞けない Amazon EC2

お見積のご相談もお待ちしております。お気 軽にお問いあわせください。

http://aws.amazon.com/jp/contact-us/aws-sales/

お問い合わせ先

Page 73: いまさら聞けない Amazon EC2

© 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.