Contenu connexe
Similaire à [AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2)
Similaire à [AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2) (20)
Plus de Amazon Web Services Japan
Plus de Amazon Web Services Japan (20)
[AWSマイスターシリーズ] Amazon Elastic Compute Cloud (EC2)
- 1. AWSマイスターシリーズ
Amazon Elastic Compute Cloud
(Amazon EC2)
2013.03.13
アマゾンデータサービスジャパン株式会社
技術統括本部長 玉川 憲
ソリューションアーキテクト 安川 健太
© 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.
- 2. 今日のAgenda
Amazon EC2とは?
Amazon EC2の基本
Amazon EC2のセキュリティモデル
最新アップデート!
利用におけるTIPS
料金モデル
まとめ
2
© 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.
- 3. 今日のAgenda
Amazon EC2とは?
Amazon EC2の基本
Amazon EC2のセキュリティモデル
最新アップデート
利用におけるTIPS
料金モデル
まとめ
3
© 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.
- 4. AWSの様々なサービス
お客様のアプリケーション
デプロイと自動化
ライブラリ & SDKs IDEプラグイン Web管理画面 モニタリング AWS Elastic デプロイ&
認証
Java, PHP, .NET, Eclipse Management Amazon Beanstalk
AWS IAM アドミン
Python, Ruby Visual Studio Console CloudWatch AWS CloudFromation
AWS OpsWorks
メッセージ
メール配信 ワークフロー管理
Amazon SNS
Amazon SES Amazon SWF
Amazon SQS
アプリケーション
サービス
コンテンツ配信 分散処理 キャッシング
Amazon CloudFront Elastic MapReduce Amazon Elasticache
ストレージ データベース
コンピュータ処理 Amazon RDS
Amazon S3
Amazon EC2 Amazon DynamoDB
Amazon EBS
Auto Scale Amazon SimpleDB
AWS StorageGateway Amazon RedShift
インフラストラクチャ
ネットワーク & ルーティング サービス
Amazon VPC / Amazon Elastic Load Balancer / Amazon Route 53 /AWS Direct Connect
AWS グローバルインフラ
Region AZ
世界に拡がるリージョン, アベイラビリティゾーン, エッジロケーション
4
4 © 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.
- 5. Amazon EC2のイメージ
コマンドライン
/ SDK利用
Webコンソール
API
仮想サーバ(Amazon EC2)
Windows CentOS Oracle DB(Linux)
ターミナル ( スタンダード) (ハイCPU) (ハイメモリ)
SSH公開鍵
認証
仮想デスクトップ
マシンイメージ
AMI 仮想外部ディスク
(AMI)から
起動
保存 (Amazon EBS)
Amazon S3
データセンター
5
© 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.
- 6. リージョンとエッジロケーション
リージョン
エッジローケーション
オレゴン
GovCloud
東京
ダブリン
バージニア
カリフォルニア
シドニー
シンガポール
サンパウロ
世界8(+1)カ所のリージョン(地域)
39のエッジロケーション を即座に利用可能
http://aws.amazon.com/jp/about-aws/globalinfrastructure/
- 8. EC2は非常に汎用的なプラットフォーム
全社 & 部門 Oracle, SAP, Microsoft, Dassault
アプリケーション 顧客の業務アプリケーション
E-コマース
コンシューマー & ウェブサイト
ウェブアプリケーション ゲーム
ファイル同期 & 共有サービス
コンシューマー向けWebサイトのログ解析
HPC & ビッグデータ ゲノム配列解析
大規模バッチプロセス
オンプレミスデータのバックアップ
バックアップ & テープの代わりにアーカイブに利用
ディザスタリカバリー ディザスタリカバリー
- 9. 典型的Webアーキテクチャ(他のサービスとの組み合わせ)
Amazon Route 53
CloudFront
(ドメイン名割り当て)
(コンテンツ
配信)
東京リージョン
ELB
(ロードバランサ)
AZ-1a AZ-1c
EC2 EC2 S3
静的コンテンツ
自動同期
RDSマスタ RDSスレーブ
- 10. Virtual Private Cloud (VPC)とEC2
ユーザごとの
プライベート領域で
インスタンスを利用可!
Amazon Virtual Private
Cloud (VPC)環境
AWSパブリック
クラウド環境
今後の標準環境
VPC for Everyone! これまでの標準環境
- 11. 今日のAgenda
Amazon EC2とは?
Amazon EC2の基本
• 触ってみよう!
• 基本コンセプト
Amazon EC2のセキュリティモデル
最新アップデート
利用におけるTIPS
料金モデル
まとめ
14
© 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.
- 12. マネジメントコンソールからログイン
作成したアカウントのメールアドレス・パスワードでログイン
• https://console.aws.amazon.com/ec2/home
15
© 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.
- 13. AWSサービスの選択
Webコンソールでコントロールするサービスを選ぶ
16
© 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.
- 14. リージョン選択
日本にいながら、世界中のどのリージョンも選択できる
XXXX
17
© 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.
- 15. AMI選択
任意のAMIを選ぶことで、
好みの環境 (OS、ミドルウェア、アプリ、データ) を選択できる
18
© 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.
- 16. 台数、インスタンスタイプ、
アベイラビリティゾーンの指定
19
© 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.
- 17. EBSの設定
20
© 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.
- 18. Key Pair選択
いわゆる公開鍵方式でサーバーにアクセスする。
初回時は、秘密鍵を、手元にダウンロードする
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.
- 19. Security Groups選択
いわゆるファイアウォールの設定
作っておいたグループをサーバーに割り当てる
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.
- 20. 起動完了
起動完了画面を確認し、起動ウィザードを終了
23
© 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.
- 21. 起動したインスタンスの情報確認
XXXXX
パブリックDNS名
24
© 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.
- 22. ターミナルでアクセス
パブリックDNS名
秘密鍵
ログインの際のアカウント名は、
AMIによって違うので注意
例) Amazon Linux -> ec2-user
その他Linuxの多く -> root
25
© 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.
- 23. 今日のAgenda
Amazon EC2とは?
Amazon EC2の基本
• 触ってみよう!
• 基本コンセプト
Amazon EC2のセキュリティモデル
最新アップデート
利用におけるTIPS
料金モデル
まとめ
26
© 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.
- 24. Amazon Machine Image (AMI)
AMIはインスタンス作成に使用するイメージテンプレート
AWS公式AMIや、サードパーティもAMIを提供
• https://aws.amazon.com/amis/
• https://aws.amazon.com/marketplace/
選択したAMIから起動する
EC2インスタンスから、任意のタイミングで
カスタムAMIを作成できる
launch
Amazon
Machine Amazon EC2インスタンス
Image (AMI)
27
© 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.
- 25. AMIとインスタンス、AZの関係
Availability Zone-1a Availability Zone-1b
AMIからインスタンスを
起動 インスタンス
カスタムAMIを使って、イ
ンスタンスを複数台起動
AMI カスタム
AMI
Amazon S3
カスタムAMIを作成
必要に応じて共有設定
28
© 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.
- 26. AMIの取得/AMIからの起動
29
Copyright © 2011 Amazon Web Services
© 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.
- 27. EC2インスタンスのライフサイクル
起動したインスタンスは3つの状態を持つ
• Running : 実行中、課金される
• Stopped : 停止中、課金されない
• Terminated: 終了。Stop/Startはできない。
Amazon EC2インスタンス
launch Running
Terminate
Amazon
Machine
Stop Start Terminated
Image (AMI)
Terminate
Stopped
30
© 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.
- 28. EC2インスタンスの停止と終了
31
© 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.
- 29. EC2インスタンスのタイプ変更
Stop(停止)していると、いつでもタイプ(スペック)を変更できる
32
© 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.
- 30. Amazon Elastic Block Store (EBS)
Region EBSとは、EC2に仮想外付けされる
Availability Zone - a Availability Zone - b ブロックレベルのストレージサービス
EC2 EC2 サイズは1GB単位で~1TBまで
サイズ/期間(/IO)で課金される
各EC2インスタンスで、複数EBSを使える
EBS EBS EBS EBS EBS
詳細
データは永続的に保存される
いつでもバックアップ(スナップショット)
スナップショットから、EBSを作成可能
EBS (他のAZに作成できる)
スナップ
ショット Provisioned IOPSでIOパフォーマンス指定
• 2013年3月時点で、最大2000IOPS
Amazon S3
他のEC2インスタンスに付け替え可能
33
© 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.
- 31. EBSボリュームのアタッチ
EC2インスタンスと、同じ
ゾーンに作ることを注意。
スナップショットから複製
も可能。
34
Copyright © 2011 Amazon Web Services
© 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.
- 32. EC2インスタンスのアドレス
全てのインスタンスが下記を持つ
Private IPアドレス
Private DNS名(*.internal)
Public DNS名 (*.amazonaws.com)
public IPアドレスをオプションで付けられる
Elastic IP Addresses (EIP)と呼ぶ
稼働しているEC2インスタンスに、瞬時に付け外しが可能
インスタンスにアサインしているときは料金はかからない
35
© 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.
- 33. EIPの割り当て
36
© 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.
- 34. EIPの使いどころ
通常のケースはEIPは必要なく、
EC2のPublic DNS名を用いて、CNAMEで名前変換を行う
Route 53(名前解決サービス)で、Public DNSを用いる
固定IPアドレスが必要なときに限りEIPを用いる
メールサーバー、監視サーバー等
メールサーバの送信制限解除、逆引き申請が必要な場合
は下記から申請を行う
https://aws-portal.amazon.com/gp/aws/html-forms-
controller/contactus/ec2-email-limit-rdns-request
37
© 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.
- 35. Amazon EC2の関連サービス/関連情報
監視、負荷分散、自動スケール
→CloudWatch、ELB、AutoScaling
閉域網での利用、仮想ネットワーキング
→Amazon VPC (Virtual Private Cloud)
① 社内ネットワークからVPN接続
② ルーティング、イントラIPアドレス、仮想NIC、等々
占有サーバ →Amazon Dedicated Instance
専用線接続 →Amazon Direct Connect
Windows →Windowsインスタンス
スパコン →HPCインスタンス
アクセス管理 →IAM (Identity and Access Management)
料金関係 →Consolidated Billing
昨年の資料集 http://aws.amazon.com/jp/aws-meister/
38
© 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.
- 36. 今日のAgenda
Amazon EC2とは?
Amazon EC2を触ってみる
Amazon EC2のセキュリティモデル
最新アップデート
利用におけるTIPS
料金モデル
まとめ
39
© 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.
- 37. AWSのセキュリティの考え方
シェアード・レスポンシビリティ・モデル(責任共有モデル)
Webサイト/アプリケーション
これまでと同様の Your
Apps
セキュリティを
お客様、SI様で実現可能
第三者認証
インフラ SOC 1/SSAE 16/ISAE 3402,
よりハイレベルの
ISO 27001, PCI DSS, HIPAA, ITAR,
FISMA Moderate, FIPS 140-2
ファシリティ
セキュリティをAWSが提供 DC、電源、ネットワーク冗長化
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.
- 38. EC2の責任共有モデル
ユーザーが Amazon EC2
Large
Small
Small
責任を持って …
インスタンス
管理する
AWSが
責任を持って ハイバーバイザー
管理する
物理ホスト
ファイアウォール
物理インタフェース
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.
- 39. ファイアウォールを実現するSecurity Group
ポート25
インスタンスへのトラフィックを (SMTP)
制限するファイアウォール機能
デフォルトで全トラフィック閉 Security Group
必要な受信アクセスに対してアク ポート80
セスルールを定義する (HTTP)
• プロトコル( TCP/UDP) ポート22
• 宛先ポート (SSH)
• アクセス元IP / Security Group
EC2
ルールをひとまとめにした
インスタンス
テンプレートを
Security Groupと呼ぶ
EC2ファイアウォール
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.
- 40. Security Groupの使い方
インスタンスの用途に応じたSecurity Groupを用意する
• Webサーバ用、DBサーバ用、メールサーバ用等
アクセス元にSecurity Groupも設定して限定可能
sg-1234
sg-abcd
Webサーバ sg-abcd
sg-1234 22: 0.0.0.0/0
3306: sg-1234
22: 0.0.0.0/0 DBサーバ
80: 0.0.0.0/0
25: sg-1234
Webサーバ
sg-xyz
sg-1234
Webサーバ
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.
- 41. セキュリティ証明書
③APIへのアクセス
②Webコンソール
→アクセスキー /
へのアクセス
X.509証明書 / IAM
①EC2インスタン →パスワード認証 /
スへのアクセス 多要素認証 / IAM
→鍵認証
コマンドライン
/ SDK利用
Webコンソール
REST
/ SOAP
API
仮想サーバ(Amazon EC2)
Windows
ターミナル ( スタンダード)
SSH公開鍵
認証
仮想デスクトップ
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.
- 42. Key Pair(キーペア)を用いた鍵認証
鍵認証は、ユーザ名・パスワードの認証よりも安全な認証方式
公開鍵
①キーペア作成
ダウンロード
された秘密鍵
②インスタンス起動時に
公開鍵をコピー
③公開鍵・秘密鍵の
ペアが合致すると
ログイン可能
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.
- 43. EC2のSLA
EC2の可用性が99.95%
上記に満たない場合は、Serviceクレジットを返還す
る
詳細は
http://aws.amazon.com/ec2-sla/
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.
- 44. AWSの運用への努力
各サービスの状況をWeb上でリアルタイム表示
Service Health Dashboard
http://status.aws.amazon.com/
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.
- 45. AWSセキュリティセンター
日本語のホワイトペーパー
• セキュリティ概要
• リスクとコンプライアンス
48
© 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.
- 46. 今日のAgenda
Amazon EC2とは?
Amazon EC2を触ってみる
Amazon EC2のセキュリティモデル
最新アップデート
利用におけるTIPS
料金モデル
まとめ
49
© 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.
- 47. VPC for Everyone!
2013年3月
12日発表!
--EC2-VPCがデフォルトに--
従来のインスタンス起動
• VPCか否かを選択
• デプロイ先AZ / Subnet
を選択 EC2-VPC
AWSパブリック
選択しなければ クラウド環境
EC2-Classic
EC2-Classic
EC2-VPCがデフォルト
の場合
• VPCか否かを選択
• デプロイ先AZ / Subnet
EC2-VPC
を選択 AWSパブリック
クラウド環境
常にEC2-VPC!
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.
- 48. EC2-VPCがデフォルトの場合の動作
初めてインスタンスを起動する際の動作
1. Default VPCが自動作成される
2. 各AZにDefault Subnet (public)が自動作成される
3. 選択したAZのDefault Subnetにインスタンスがデプロイされる
4. EC2インスタンスにはPublic IPアドレスがアサインされる
Public IPアドレス
インスタンスに動的割当て
されるGlobal IPアドレス Default VPC (172.31.0.0/16)
デフォルトのデプロイ先VPC
Default Subnet
AZごとに作成されるデフォ
ルトのデプロイ先サブネット
大きさは/20 (4096 IPs)
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.
- 49. VPC for Everyoneがもたらすのは
これまでと使い方が変わってし
まう?
No!
AWSを使い始めるためにVPC
を学ばないといけない?
EC2-VPCが適用されたお客様には
• VPCの進んだネットワーク機能を今までと同様の使い方で提供
いわば、EC2サービスのアップグレード!
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.
- 50. EC2-VPCの適用で可能になること
VPCでは出来て、EC2-Classicでは出来なかった全て
• 静的IPアドレス設定
• 複数IPアドレス
• 複数ネットワークインターフェース
• セキュリティグループのメンバーシップの動的変更
• セキュリティグループによるOutboundフィルタリング
• NACL
• …
VPC 自体の恩恵
• 複数Subnetの利用
• Private SubnetにPrivate接続してEC2を利用
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.
- 51. いつから誰に適用されるか
既に利用実績のあるリージョンに
ついてはこれまで通り
• EC2-ClassicとEC2-VPCの両方をサ
ポート
新規利用のリージョンに適用され
ていればEC2-VPCがデフォルトに
• シドニー、サンパウロから適用開始
• リージョンによって適用開始時期は
異なります
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.
- 52. 新EC2インスタンスタイプ – M3
EC2起動時に任意のインスタンスタイプ(スペック)を選択可能
• http://aws.amazon.com/jp/ec2/instance-types/
Hi-Mem 4XL 68.4 GB
128 26 EC2 Compute Units
8 virtual cores
$2.072/$2.280
Cluster Compute 8XL 60.5 GB
88 EC2 Compute Units
64 Hi-Mem 2XL 34.2 GB
13 EC2 Compute Units
Extra Large 30 GB
26 EC2 Compute Units
$2.40/2.97
4 virtual cores 8 virtual cores
$1.036/$1.140 $0.736/$0.920
32 Cluster Compute 4XL 23 GB
33.5 EC2 Compute Units
Memory (GB)
$1.60/1.98
Hi-Mem XL 17.1 GB
Cluster GPU 4XL 22 GB
6.5 EC2 Compute Units
16 2 virtual cores
$0.518/$0.570
M3 Extra Large 15 GB
13 EC2 Compute Units
4 virtual cores
33.5 EC2 Compute Units,
2 x NVIDIA Tesla “Fermi”
M2050 GPUs
$0.736/$0.920 $2.10/2.60
Extra Large 15 GB
8 Medium 3.75 GB
2 EC2 Compute Unit
8 EC2 Compute Units
4 virtual cores
$0.736/$0.920
1 virtual core
$0.184/0.230 Large 7.5 GB
4 EC2 Compute Units
4 2 virtual cores
$0.368/0.460
High-CPU XL 7 GB
20 EC2 Compute Units
8 virtual cores
High-CPU Med 1.7 GB $0.760/$1.140
5 EC2 Compute Units
2 virtual cores
2 Micro 613 MB
$0.190/$0.285
Up to 2 ECUs (for
short bursts)
Small 1.7 GB
$0.027/0.035
1 1 EC2 Compute Unit
1 virtual core
$0.092/0.115
55 1 2 4 8 16 32 64 128
EC2 Compute Units (ECU)
© 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.
- 53. リージョン間AMIコピー
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.
- 54. 去年からのEC2関連アップデート
EC2 ミディアムインスタンス追加
EC2 64ビット対応インスタンス2つ追加
EC2 ウェブコンソールにSSHクライアント統合
EBSボリュームの状態を監視可能に
Amazon EC2のVMをエクスポートできる機能が追加
IAM role for EC2が追加
EC2インスタンスのステータスメトリクス
Red Hat Enterprise LinuxのEC2リザーブドインスタンス
Provisioned IOPS for EBS
AWS Management Console: AWS Marketplaceにアクセスしやすく, EBSディスクの編集が可能に
2TBのSSDを持つ、ハイ I/O EC2 インスタンスの登場
Amazon EC2 リザーブドインスタンスマーケットプレイスオープン
Amazon EC2 Cluster GPUインスタンス (cg1.4xlarge)がアイルランド、VPC内で利用可能に
TCO Comparison Calculator for Web Applications リリース
Amazon EC2 第二世代スタンダートインスタンスタイプ登場
Amazon EC2 第一世代スタンダートインスタンスタイプ値下げ
Amazon EC2 スポットインスタンスの入札ステータスを取得可能に
IAM role を使ったAPIアクセスの移譲機能
EBS プロビジョンドIOPSのスループットを2000まで設定可能に
EC2にハイメモリクラスタエイトエクストララージのインスタンスタイプが追加
EC2のM3インスタンスが全リージョンで利用可能に。さらにEC2の料金とリージョン間の転送料金を値下げ。
EC2のハイメモリクラスタおよびハイI/Oインスタンスが米国西部(オレゴン)で利用可能に
Linux用CloudWatch監視スクリプトに新機能を追加
IAM Role サポート スクリプト -> CloudWatch
57
© 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.
- 55. 今日のAgenda
Amazon EC2とは?
Amazon EC2を触ってみる
Amazon EC2のセキュリティモデル
最新アップデート
利用におけるTIPS
料金モデル
まとめ
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.
- 56. 故障のための設計: Design for Failure
故障に備えた設計をしておく
すべてが故障しうると考え、システム全体での保守的設計
SPOF(単一障害点)の排除
障害からの復旧(対応品質)を重視する
EC2における故障のための設計
AMIを常にとっておく
EBSスナップショットでバックアップ
複数アベイラビリティゾーンへの分散
ELBでサーバを冗長化、Auto Scalingで自動復帰
Reserved Instanceでキャパシティ保障
他の冗長性高いサービスとの組み合わせ
S3, SimpleDB, RDS他
http://www.slideshare.net/kentamagawa/aws-7991623
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.
- 57. 定期的なバックアップ
EC2のAMIを定期的に作成する
(参考) 無停止でAMI取得
Cloudpackさんブログhttp://blog.cloudpack.jp/2011/03/aws-news-ec2-instance-no-reboot-
ami.html
データボリュームとしてのEBSの場合、EBSのスナップ
ショットを定期的に作成
スクリプトを書いて定期的なバックアップを行うことも可能
Code.rockさんブログhttp://blog.dateofrock.com/2010/03/auto-backup-amazon-ebs-with-
ruby.html
サーバーワークスさんブログhttp://blog.serverworks.co.jp/tech/2011/07/21/awssdk-for-ruby-
create-snapshot/
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.
- 58. EC2へのファイル転送は?
SCPを使う
scp pk-XXX.pem root@ec2-
XXX.amazonaws.com:/xxx
Windowsの場合は、WinSCPなど
S3経由で共有する
S3にアップロードし、EC2からwgetでアクセスする
FTPを立ち上げる
EC2側でFTPサーバーを立ち上げておく
高速に送信したい
Tsunami UDP, Aspera等のソリューション
61
© 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. VM Import / Export
複数プラットフォームのVMイメージを、
Amazon EC2に移行(インポート、エクスポート)可能
http://aws.typepad.com/aws_japan/2010/12/vm-import-
62 bring-your-vmware-images-to-the-cloud.html
© 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.
- 60. 稼働EC2インスタンスからメタデータ取得
curl http://169.254.169.254/latest/meta-data
ami-id local-hostname
ami-launch-index local-ipv4
ami-manifest-path mac
block-device-mapping/ network/
hostname placement/
instance-action profile
instance-id public-hostname
Instance-type public-ipv4
kernel-id public-keys/
reservation-id
63
© 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.
- 61. 起動時にパラメーターを渡す
起動時に16KB以内で任意のものを渡せる
ChefやPuppetなどを利用して、自己構成できるAMIに
参照 AWSマイスター CloudFormation資料
http://www.slideshare.net/kentamagawa/cloudformation-
aws5
64
© 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.
- 62. EC2コマンドラインツール & AWS SDKs
コマンドラインからEC2のAPIにアクセスできるツール
ツールをインストールし、セキュリティ証明書を配置
AWS SDKs
http://aws.amazon.com/code/
65
© 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.
- 63. マネージメントコンソールだけでなく、
APIからプログラマブルにアクセス
ec2-run-instances ami-b232d0db
--instance-count 3
--availability-zone
ap-northeast-1a Tokyo リージョン
--instance-type m1.small
ec2-run-instances ami-b232d0db
--instance-count 3
--availability-zone
ap-northeast-1b
--instance-type m1.small
66
© 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.
- 64. EC2のスケジュールイベント表示機能
EC2インスタンスが稼働しているハードかソフトにメン
テナンスが必要な場合に、情報を提供する仕組み
インスタンスリブート、システムリブート、リタイヤ
67
© 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.
- 65. EC2のステータスチェック機能
下記の2種類のチェックを自動テストで実行し、情報を提示
システムステータスチェック
EC2インスタンスに、ネットワークパケットが通るかチェック
インスタンスステータスチェック
EC2インスタンスのOSが、ネットワークパケットを受け取るかチェッ
ク
もし状況に乖離がある場合は、レポートできます
68
© 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.
- 66. AWS制限増加申請
EC2を誤って大量に作成しないよう、最大インスタンス
数の上限を20に制限しています
制限増加申請フォームで各種制限の増加を行えます
• http://aws.amazon.com/jp/contact-us/
69
© 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.
- 67. 既存EBSボリュームのサイズ変更
リージョン
アベイラビリティゾーン
例: 10GB -> 100GB変更
EC2インス
タンス
への流れ
EBSをデタッチする
EBSからS3にスナップ
ショットを作成する
EBS
EBS
(100GB)
新たなボリュームサイズを
(10GB) 指定して、EBSを作成する
EBSをアタッチする
マウントして、リサイズす
Amazon る
S3
スナップ
ショット
70
© 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.
- 68. EBSとS3
リージョン
EBSは複数EC2にアタッチ不可
アベイラビリティゾーン
単独のEC2インスタンスへのブ
EC2イン EC2イン ロックデバイスとしての使い方
スタンス スタンス
NFSのような使い方をする際は、
EC2にミドルウェアを導入
(GlusterFS等)
EBS
S3は複数のEC2からアクセス可
HTTP/ ただし、Write Once Read A Lot
HTTPS
な使い方に向いている
Amazon
S3 アップロード並列化も使える
耐久性の設計は、
バケット
99.999999999%で非常に高い
71
Copyright © 2011 Amazon Web Services
© 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.
- 69. EIP使用時の注意点
グローバルIP(EIP)を用いた場合、インターネット経由のアク
セスとなり、課金発生するケースがある
名前解決したいサーバに、固定IPを付与する
各サーバは、固定グローバルIPを元に
AWSのDNSに名前を問い合わせ
問い合わせた結果返ってくる外部DNS名でサーバにアクセスを行う
EC2内部で外部DNS名を使ってアクセスすると
、プライベートIPアドレスに変換されるため、
目的のサーバにプライベートIPでアクセスできる
72
© 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.
- 70. 今日のAgenda
Amazon EC2とは?
Amazon EC2を触ってみる
Amazon EC2のセキュリティモデル
最新アップデート
利用におけるTIPS
料金モデル
まとめ
73
© 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.
- 71. AWSの課金の仕組み
インターネット
データ転送量
ELB ELB利用料・データ処理量
大半 EC2 インスタンスタイプ別利用料
を占め
る!
EBSの利用料
EBS
S3 S3の利用料
74
© 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.
- 72. AWSでは、EC2インスタンスの稼働料金が大半
「EC2料金、EBS料金」を見積もれば大まかにはOK
多くの場合、データ転送量は5%~15%程度
ELB (1台) ¥ 19 2%
EC2 (large, 7台) ¥ 871 74%
EBS (300GB) ¥ 30 3%
RDS (マルチAZ) ¥ 165 14%
データ転送 ¥ 55 5%
その他 ¥ 30 3%
合計 ¥ 1,170
75
© 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.
- 73. Simple Monthly Calculator
Web上にある計算機を使って概算費用を計算できます
http://calculator.s3.amazonaws.com/calc5.html?lng=ja_JP
77
© 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.
- 74. 複数の価格モデル
課金モデルが選べる
通常の時間課金の
オンデマンド・インスタンス
ある程度継続してEC2を使う(1年、3年)
EC2リザーブドインスタンス
入札を利用してより安く使う
EC2スポットインスタンス
→マイスターシリーズ: RI&スポットインスタンス
78
© 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.
- 75. AWS無料試用枠
AWSでは、無料試用枠を用意しています
• http://aws.amazon.com/jp/free/
79
© 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.
- 76. 24時間・365日での日本語サポートの提供
• 日本語でのサポートをご提供しております
http://aws.amazon.com/jp/premiumsupport/
ベーシック デベロッパー ビジネス エンタープライズ
受付時間 24時間 / 365日(年中無休)
12時間
初回応答時間 セルフサービス 1時間 15分
(営業時間内)
サポート連絡先 N/A 1人 5人 無制限
チャット 不可 不可 可能 可能
TEL 不可 不可 可能 可能
専任スタッフ なし なし なし あり
AWS利用総額の AWS利用総額の
無料(AWSの利用料に 10%~ 10%~
料金(月額) 含まれる)
$49/月
※最低料金:$100/月 ※最低$15,000/月
80
- 77. ご参加ありがとう
ございました。
81
© 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.