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. AWS Black Belt Tech Webinar 2014 (旧マイスターシリーズ) Amazon Elastic Compute Cloud (Amazon EC2) 2014.04.02 アマゾンデータサービスジャパン株式会社 プリンシパルソリューションアーキテクト 荒靖宏

AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

Embed Size (px)

DESCRIPTION

AWS Black Belt Tech Webinar 2014 (旧マイスターシリーズ) Amazon Elastic Compute Cloud (Amazon EC2)

Citation preview

Page 1: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

AWS Black Belt Tech Webinar 2014(旧マイスターシリーズ)

Amazon Elastic Compute Cloud(Amazon EC2)

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

プリンシパルソリューションアーキテクトemsp 荒木靖宏

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

2

今日のAgenda

 Amazon EC2とは  Amazon EC2の基本  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

3

今日のAgenda

 Amazon EC2とは  Amazon EC2の基本  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

4

AWSの様々なサービス

4

お客様のアプリケーション

認証 AWS IAM

モニタリングAmazon

CloudWatch

Web管理理画面Management Console

デプロイと自動化AWS Elastic Beanstalk

AWS CloudFromationAWS OpsWorks

IDEプラグインEclipse

Visual Studio

ライブラリ amp SDKsJava PHP NET Python Ruby

デプロイ アドミン

コンテンツ配信Amazon CloudFront

メッセージAmazon SNSAmazon SQS

分散処理理Elastic MapReduce

メール配信 Amazon SES

キャッシングAmazon Elasticache

ワークフロー管理理Amazon SWF

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

コンピュータ処理理 Amazon EC2Auto Scale

ストレージ Amazon S3Amazon EBS

AWS StorageGateway

データベースAmazon RDS

Amazon DynamoDBAmazon SimpleDBAmazon RedShift

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

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

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

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

5

Amazon EC2仮想化されたサーバ

仮想サーバ(Amazon EC2)

Windows Linux BSD

コマンドライン SDK利利用

SSH公開鍵認証

仮想外部ディスク(Amazon EBS)

Amazon S3

マシンイメージ(AMI)から起動

仮想デスクトップ

ターミナル

AMI保存

API

Webコンソール

リージョンとエッジロケーション

カリフォルニアダブリン

シンガポール

東京

オレゴン

バージニア

サンパウロ

リージョン

エッジローケーション

GovCloud

世界8(+2)カ所のリージョン(地域) 36都市51箇所のエッジロケーションemsp を即座に利利用可能

httpawsamazoncomjpabout-‐‑‒awsglobalinfrastructureemsp 

シドニー

北北京

アベイラビリティゾーン(AZ)

bull  各リージョン内に複数のAZ(データセンター群)が存在bull  各AZはお互いに影響を受け難いように地理理的電源的ネットワーク的に分離離して設計

bull  AZ間は高速専用線で接続(リージョン間はインターネットも使用)

典型的Webアーキテクチャ(他のサービスとの組み合わせ)

東京リージョン

AZ-‐‑‒1a AZ-‐‑‒1c

EC2 EC2

RDSマスタ RDSスレーブ自動同期

ELB(ロードバランサ)

Amazon Route 53(ドメイン名割り当て)

静的コンテンツ

S3

CloudFront(コンテンツ 配信)

Virtual Private Cloud (VPC)とEC2

EC2-Classic

Amazon Virtual Private Cloud (VPC)環境

ユーザごとの IPアドレス領域で

インスタンスを利用可

全ユーザで共通の 100008のIPアドレスを使う

現在の標準環境 EC2-VPC

EC2-VPCのDefault VPC

  Default VPCでは 1  172310016が使われる 2  各AZにDefault Subnet (public)が自動作成される 3  選択したAZのDefault Subnetにインスタンスがデプロイされる 4  EC2インスタンスにはPublic IPアドレスがアサインされる

Default VPC (172310016) デフォルトのデプロイ先VPC

Default Subnet AZごとに作成されるデフォルトのデプロイ先サブネット 大きさは20 (4096 IPs)

Public IPアドレス インスタンスに動的割当て されるGlobal IPアドレス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

11

Amazon Elastic Block Store (EBS)

EBSとはEC2に仮想外付けされるブロックレベルのストレージサービス

  サイズは1GB単位で〜~1TBまで   サイズ期間(IO)で課金金される   各EC2インスタンスで複数EBSを使える詳細   データは永続的に保存される   いつでもバックアップ(スナップショット)   スナップショットからEBSを作成可能(他のAZに作成できる)

  Provisioned IOPSでIOパフォーマンス指定bull  2014年年3月時点で最大4000IOPS

  他のEC2インスタンスに付け替え可能

Region

Availability Zone - a

EBS EBS EBS

Availability Zone - b

EBS EBS

Amazon S3

EBSスナップショット

EC2 EC2

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

12

Instance StorageとEBS

EC2

Instance Storage bull  内蔵ディスク bull  EC2と不可分 bull  EC2をStopTerminateするとクリアされる bull  性能容量はインスタンスタイプごとに規定 bull  追加費用なし

EBS bull  ネットワークで接続 bull  EC2とは独立管理 bull  EC2をTerminateしてもEBSは保持可能 bull  Volumeごとに性能容量を定義可能 bull  EBSの費用が発生

物理的には ネットワーク経由

EC2に関連する主要コンポーネントリージョン

アベイラビリティゾーン

Amazon CloudWatch

Auto Scaling

Amazon Elastic Block Storage

(EBS)

Amazon Machine Image (AMI)

Elastic IP

Amazon Virtual Private Cloud

(VPC)

Elastic Load Balancer

Snapshot

Amazon Elastic Compute Cloud

(EC2)

Key Pairs

AWS Management Console

Security Groups

VM ImportExport

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

14

今日のAgenda

 Amazon EC2とは  Amazon EC2の基本

bull  触ってみようbull  基本コンセプト

 Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

15

マネジメントコンソールからログイン

  作成したアカウントのメールアドレスパスワードでログインbull  httpsconsoleawsamazoncomec2home emsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

16

AWSサービスの選択   Webコンソールでコントロールするサービスを選ぶ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

17

リージョン選択   日本にいながら世界中のどのリージョンも選択できる

XXXX

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

18

AMI選択   任意のAMIを選ぶことで好みの環境 (OSミドルウェアアプリデータ) を選択できる

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

19

台数インスタンスタイプアベイラビリティゾーンの指定

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

20

EBSの設定

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

21

Key Pair選択   いわゆる公開鍵方式でサーバーにアクセスする初回時は秘密鍵を手元にダウンロードする

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

22

Security Groups選択

  いわゆるファイアウォールの設定作っておいたグループをサーバーに割り当てる

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

23

起動完了了

  起動完了了画面を確認し起動ウィザードを終了了

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

24

起動したインスタンスの情報確認XXXXX

パブリックDNS名

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

25

ターミナルでアクセス

ログインの際のアカウント名はAMIによって違うので注意 例) Amazon Linux -gt ec2-user その他Linuxの多く -gt root admin等

パブリックDNS名

秘密鍵

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

26

今日のAgenda

 Amazon EC2とは  Amazon EC2の基本

bull  触ってみようbull  基本コンセプト

 Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

27

Amazon Machine Image (AMI)

  AMIはインスタンス作成に使用するイメージテンプレート   AWS公式AMIやサードパーティもAMIを提供

bull  httpsawsamazoncomamisbull  httpsawsamazoncommarketplaceemsp 

  選択したAMIから起動する   EC2インスタンスから任意のタイミングでカスタムAMIを作成できる

launch

Amazon Machine Image (AMI)

Amazon EC2インスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

28

AMIとインスタンスAZの関係

インスタンス

Amazon S3

AMI

Availability Zone-1a Availability Zone-1b

カスタム AMI

AMIからインスタンスを起動

カスタムAMIを使ってインスタンスを複数台起動

カスタムAMIを作成必要に応じて共有設定

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

29

AMIの取得AMIからの起動

Copyright copy 2011 Amazon Web Services

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

30

EC2インスタンスのライフサイクル   起動したインスタンスは3つの状態を持つ

bull  Running 実行行中課金金されるbull  Stopped 停止中課金金されないbull  Terminated 終了了StopStartはできない

Running

Terminated

Stopped

StartStop

Terminate

launch

Terminate

Amazon Machine Image (AMI)

Amazon EC2インスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

31

EC2インスタンスの停止と終了了

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

32

EC2インスタンスのタイプ変更Stop(停止)しているといつでもタイプ(スペック)を変更更できる

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

33

EBSボリュームのアタッチ

Copyright copy 2011 Amazon Web Services

EC2インスタンスと同じゾーンに作ることを注意 スナップショットから複製も可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

34

EC2インスタンスのアドレス

  全てのインスタンスが下記を持つsect  Private IPアドレス(VPC内のサブネットから割り当てる)sect  Private DNS名(internal)sect  Public DNS名 (amazonawscom)

  public IPアドレスをオプションで付けられる   固定されたPublic IP Addresses はEIPと呼ぶ

sect  稼働しているEC2インスタンスに瞬時に付け外しが可能sect  インスタンスにアサインしているときは料料金金はかからない

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

35

EIPの割り当て

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

36

EIPの使いどころ

  通常のケースはEIPは必要なくEC2のPublic DNS名を用いてCNAMEで名前変換を行行う

  Route 53(名前解決サービス)でPublic DNSを用いる

  固定IPアドレスが必要なときに限りEIPを用いる   メールサーバー監視サーバー等

  メールサーバの送信制限解除逆引き申請が必要な場合は下記から申請を行行うhttpsaws-‐‑‒portalamazoncomgpawshtml-‐‑‒forms-‐‑‒controllercontactusec2-‐‑‒email-‐‑‒limit-‐‑‒rdns-‐‑‒request

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

37

リージョン間コピー(AMIEBS)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

38

Amazon EC2の関連サービス関連情報   監視負荷分散自動スケール

rarrCloudWatchELBAutoScaling   閉域網での利利用仮想ネットワーキング

rarrAmazon VPC (Virtual Private Cloud)   ① 社内ネットワークからVPN接続   ② ルーティングイントラIPアドレス仮想NIC等々

  占有サーバ rarrAmazon Dedicated Instance   専用線接続 rarrAmazon Direct Connect   Windowsemsp emsp  rarrWindowsインスタンス   スパコンrarrHPCインスタンス   アクセス管理理emsp  rarrIAM (Identity and Access Management)   料料金金関係emsp  rarrConsolidated Billing資料料集emsp httpawsamazoncomjpaws-‐‑‒meister

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

39

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

40

AWSのセキュリティの考え方

第三者認証

SOC 1SSAE 16ISAE 3402 ISO 27001 PCI DSS HIPAA ITAR

FISMA Moderate FIPS 140-2 ファシリティ

DC電源ネットワーク冗長化

Your Apps

Webサイトアプリケーションこれまでと同様のセキュリティを

お客様SI様で実現可能

インフラよりハイレベルの

セキュリティをAWSが提供

シェアードレスポンシビリティモデル(責任共有モデル)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

41

EC2の責任共有モデル

物理インタフェース

ファイアウォール

      ハイバーバイザー

Sm

all

Larg

e

hellip

Sm

all Amazon EC2

インスタンス

物理ホスト

ユーザーが 責任を持って 管理する

AWSが 責任を持って 管理する

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

42

ファイアウォールを実現するSecurity Group

  インスタンスのINOUTトラフィックを制限するファイアウォール機能

  デフォルトIN向けは全トラフィック閉

  必要な受信アクセスに対してアクセスルールを定義する

bull  プロトコル( TCPUDP)bull  宛先ポートbull  アクセス元IP Security Group

  ルールをひとまとめにしたテンプレートを Security Groupと呼ぶ

EC2 インスタンス

ポート22(SSH)

ポート80(HTTP)

EC2ファイアウォール

Security Group

ポート25(SMTP)

ポート22(SSH)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

43

Security Groupの使い方   インスタンスの用途に応じたSecurity Groupを用意する

bull  Webサーバ用DBサーバ用メールサーバ用等   アクセス元にSecurity Groupも設定して限定可能

Webサーバ

Webサーバ

DBサーバ

sg-1234

22 00000 80 00000 25 sg-1234

sg-1234

sg-1234

sg-abcd sg-abcd

22 00000 3306 sg-1234

Webサーバ

sg-xyz

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

44

セキュリティ証明書

仮想サーバ(Amazon EC2)Windows( スタンダード)

コマンドライン SDK利利用

SSH公開鍵認証

仮想デスクトップ

ターミナル

REST SOAPAPI

Webコンソール

①EC2インスタンスへのアクセスrarr鍵認証

②Webコンソールへのアクセス

rarrパスワード認証 多要素認証 IAM

③APIへのアクセスrarrアクセスキー X509証明書 IAM

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

45

Key Pair(キーペア)を用いた鍵認証   鍵認証はユーザ名パスワードの認証よりも安全な認証方式

ダウンロードされた秘密鍵

①キーペア作成

②インスタンス起動時にemsp emsp emsp 公開鍵をコピー

公開鍵

③公開鍵秘密鍵のペアが合致するとログイン可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

46

EC2のSLA13

sect  EC2の可用性が9995 sect 上記に満たない場合はServiceクレジットを返還する

sect 詳細は sect  httpawsamazoncomec2-sla

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

47

AWSセキュリティセンター 13

 日本語のホワイトペーパー bull  セキュリティ概要 bull  リスクとコンプライアンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

48

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

49

最近追加された機能

  VM Import for Linux   IAM EC2 Resource Permissions   リザーブドインスタンスの変更更可能に   SR-‐‑‒IOVネットワークDriverネットワーク性能向上

bull  C3 I2 R3インスタンスで対応

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

50

インスタンスのさらなる追加

  一般的な目的なら M3   Compute Optimizedなら C3   Memory Optimizedなら R3(もうすぐ)   GPUが必要なら G2   IOPS重視なら I2   Disk Based Storage ならHS1

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

51

Intel Processor Features

  m3 c3 cc2 g2 cr1 i2 r3の全てが対応

  AES New Instructions (AES-‐‑‒NI)bull  c1 cg1 m2でも対応

  Advanced Vector Extensions (Intel AVX)bull  HVMでのみ対応

  Turbo Boost Technology

  詳細は httpawsamazoncomec2instance-‐‑‒types

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

52

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

53

故障のための設計 Design for Failure   故障に備えた設計をしておく

  すべてが故障しうると考えシステム全体での保守的設計   SPOF(単一障害点)の排除   障害からの復復旧(対応品質)を重視する

  EC2における故障のための設計   AMIを常にとっておく   EBSスナップショットでバックアップ   複数アベイラビリティゾーンへの分散   ELBでサーバを冗長化Auto Scalingで自動復復帰   Reserved Instanceでキャパシティ保障

  他の冗長性高いサービスとの組み合わせ   S3 SimpleDB RDS他

httpwwwslidesharenetkentamagawaaws-‐‑‒7991623

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

54

定期的なバックアップ

  EC2のAMIを定期的に作成する   (参考) 無停止でAMI取得

Cloudpackさんブログhttpblogcloudpackjp201103aws-‐‑‒news-‐‑‒ec2-‐‑‒instance-‐‑‒no-‐‑‒reboot-‐‑‒amihtml

  データボリュームとしてのEBSの場合EBSのスナップショットを定期的に作成

  スクリプトを書いて定期的なバックアップを行行うことも可能 Coderockさんブログ

httpblogdateofrockcom201003auto-‐‑‒backup-‐‑‒amazon-‐‑‒ebs-‐‑‒with-‐‑‒rubyhtml   サーバーワークスさんブログ

httpblogserverworkscojptech20110721awssdk-‐‑‒for-‐‑‒ruby-‐‑‒create-‐‑‒snapshot

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

55

Instance StorageにSSDを積んだインスタンスが増えてきた

  EC2のタイプによって選択できるInstance Storeは以下の通り

Instance Type Instance Store Volumesm1small 1 x 160 GBdaggerm1medium 1 x 410 GBm1large 2 x 420 GB (840 GB)m1xlarge 4 x 420 GB (1680 GB)m2xlarge 1 x 420 GBm22xlarge 1 x 850 GBm24xlarge 2 x 840 GB (1680 GB)m3medium 1 x 4 GB SSDm3large 1 x 32 GB SSDm3xlarge 2 x 40 GB SSD (80 GB)m32xlarge 2 x 80 GB SSD (160 GB)

t1micro None (use Amazon EBS volumes)

c1medium 1 x 350 GBdaggerc1xlarge 4 x 420 GB (1680 GB)

Instance Type Instance Store Volumes

c3large 2 x 16 GB SSD (32 GB)c3xlarge 2 x 40 GB SSD (80 GB)c32xlarge 2 x 80 GB SSD (160 GB)c34xlarge 2 x 160 GB SSD (320 GB)c38xlarge 2 x 320 GB SSD (640 GB)cc28xlarge 4 x 840 GB (3360 GB)cg14xlarge 2 x 840 GB (1680 GB)cr18xlarge 2 x 120 GB SSD (240 GB)hi14xlarge 2 x 1024 GB SSD (2048 GB)hs18xlarge 24 x 2048 GB (49 TB)i2xlarge 1 x 800 GB SSDi22xlarge 2 x 800 GB SSD (1600 GB)i24xlarge 4 x 800 GB SSD (3200 GB)i28xlarge 8 x 800 GB SSD (6400 GB)

2014年年1月29日時点

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

56

Instance Storageを使うべきなのは

 高IOPS高帯域なストレージが必要な場合

 消えても良良い一次データの置き場として使う場合

 ストレージ冗長化を準備できる場合

S3活かしたいメリット

考慮すべき制約

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

57

EC2へのファイル転送は

  SCPを使う scp pk-‐‑‒XXXpem rootec2-‐‑‒XXXamazonawscomxxx

  Windowsの場合はWinSCPなど   S3経由で共有する

  S3にアップロードしEC2からwgetでアクセスする   FTPを立立ち上げる

  EC2側でFTPサーバーを立立ち上げておく

  高速に送信したい   Tsunami UDP Aspera等のソリューション

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

58

VM Import Export

  複数プラットフォームのVMイメージをAmazon EC2に移行行(インポートエクスポート)可能

httpawstypepadcomaws_japan201012vm-‐‑‒import-‐‑‒bring-‐‑‒your-‐‑‒vmware-‐‑‒images-‐‑‒to-‐‑‒the-‐‑‒cloudhtml

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

59

稼働EC2インスタンスからメタデータ取得

  ami-‐‑‒id   ami-‐‑‒launch-‐‑‒index   ami-‐‑‒manifest-‐‑‒path   block-‐‑‒device-‐‑‒mapping   hostname   instance-‐‑‒action   instance-‐‑‒id   Instance-‐‑‒type   kernel-‐‑‒id

  local-‐‑‒hostname   local-‐‑‒ipv4   mac   network   placement   profile   public-‐‑‒hostname   public-‐‑‒ipv4   public-‐‑‒keys   reservation-‐‑‒id

curl http169254169254latestmeta-‐‑‒data

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

60

起動時にパラメーターを渡す   起動時に16KB以内で任意のものを渡せる

  ChefやPuppetなどを利利用して自己構成できるAMIに   参照emsp AWSマイスターemsp CloudFormation資料料httpwwwslidesharenetkentamagawacloudformation-‐‑‒aws5

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

61

EC2コマンドラインツール amp AWS SDKs

  コマンドラインからEC2のAPIにアクセスできるツール   ツールをインストールしセキュリティ証明書を配置

  AWS SDKs httpawsamazoncomcode

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

62

マネージメントコンソールだけでなくAPIからプログラマブルにアクセス

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1a --instance-type m1small

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1b --instance-type m1small

Tokyo リージョン

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

63

EC2のスケジュールイベント表示機能

  EC2インスタンスが稼働しているハードかソフトにメンテナンスが必要な場合に情報を提供する仕組み

  インスタンスリブートシステムリブートリタイヤ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

64

EC2のステータスチェック機能

  下記の2種類のチェックを自動テストで実行行し情報を提示   システムステータスチェック

  EC2インスタンスにネットワークパケットが通るかチェック   インスタンスステータスチェック

  EC2インスタンスのOSがネットワークパケットを受け取るかチェック

  もし状況に乖離離がある場合はレポートできます

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

65

AWS制限増加申請

  EC2を誤って大量量に作成しないよう最大インスタンス数の上限を20に制限しています

  制限増加申請フォームで各種制限の増加を行行えますbull  httpawsamazoncomjpcontact-‐‑‒usemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

66

既存EBSボリュームのサイズ変更更

  例例 10GB -‐‑‒gt 100GB変更更への流流れ   EBSをデタッチする   EBSからS3にスナップショットを作成する

  新たなボリュームサイズを指定してEBSを作成する

  EBSをアタッチする   マウントしてリサイズする

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

スナップショット

EBS (10GB)

EBS (100GB)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

67

EBSとS3

EBSは複数EC2にアタッチ不不可   単独のEC2インスタンスへのブロックデバイスとしての使い方

  NFSのような使い方をする際はEC2にミドルウェアを導入(GlusterFS等)

S3は複数のEC2からアクセス可   ただしWrite Once Read A Lotな使い方に向いている

  アップロード並列列化も使える   耐久性の設計は99999999999で非常に高い

Copyright copy 2011 Amazon Web Services

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

バケット

EBS

EC2インスタンス

HTTPHTTPS

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

68

EIP使用時の注意点

  グローバルIP(EIP)を用いた場合インターネット経由のアクセスとなり課金発生するケースがある

  名前解決したいサーバに固定IPを付与する13   各サーバは固定グローバルIPを元に

AWSのDNSに名前を問い合わせ13   問い合わせた結果返ってくる外部DNS名でサーバにアクセスを行う13   EC2内部で外部DNS名を使ってアクセスすると プライベートIPアドレスに変換されるため 目的のサーバにプライベートIPでアクセスできる13

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

69

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

70

AWSの課金金の仕組みインターネット

ELB

EC2

EBS

S3

データ転送量量

ELB利利用料料データ処理理量量

インスタンスタイプ別利利用料料

EBSの利利用料料

S3の利利用料料

大半を占める

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

71

Simple Monthly Calculator

  Web上にある計算機を使って概算費用を計算できますsect  httpcalculators3amazonawscomcalc5htmllng=ja_JP

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

72

複数の価格モデル

 課金金モデルが選べるsect 通常の時間課金金のオンデマンドインスタンス

sect ある程度度継続してEC2を使う(1年年3年年)EC2リザーブドインスタンス

sect 入札を利利用してより安く使うEC2スポットインスタンス

rarrマイスターシリーズ RIampスポットインスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

73

AWS無料料試用枠

  AWSでは無料料試用枠を用意していますbull  httpawsamazoncomjpfreeemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

74

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

75

Appendix

  参考資料料bull  Amazon Glacier Developer Guidehttpdocsamazonwebservicescomamazonglacierlatestdevintroductionhtml

bull  Amazon Glacier FAQhttpawsamazoncomjpglacierfaqs

bull  Amazon Glaceir価格httpawsamazoncomjpglacierpricing

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

76

QampA

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 2: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

2

今日のAgenda

 Amazon EC2とは  Amazon EC2の基本  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

3

今日のAgenda

 Amazon EC2とは  Amazon EC2の基本  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

4

AWSの様々なサービス

4

お客様のアプリケーション

認証 AWS IAM

モニタリングAmazon

CloudWatch

Web管理理画面Management Console

デプロイと自動化AWS Elastic Beanstalk

AWS CloudFromationAWS OpsWorks

IDEプラグインEclipse

Visual Studio

ライブラリ amp SDKsJava PHP NET Python Ruby

デプロイ アドミン

コンテンツ配信Amazon CloudFront

メッセージAmazon SNSAmazon SQS

分散処理理Elastic MapReduce

メール配信 Amazon SES

キャッシングAmazon Elasticache

ワークフロー管理理Amazon SWF

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

コンピュータ処理理 Amazon EC2Auto Scale

ストレージ Amazon S3Amazon EBS

AWS StorageGateway

データベースAmazon RDS

Amazon DynamoDBAmazon SimpleDBAmazon RedShift

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

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

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

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

5

Amazon EC2仮想化されたサーバ

仮想サーバ(Amazon EC2)

Windows Linux BSD

コマンドライン SDK利利用

SSH公開鍵認証

仮想外部ディスク(Amazon EBS)

Amazon S3

マシンイメージ(AMI)から起動

仮想デスクトップ

ターミナル

AMI保存

API

Webコンソール

リージョンとエッジロケーション

カリフォルニアダブリン

シンガポール

東京

オレゴン

バージニア

サンパウロ

リージョン

エッジローケーション

GovCloud

世界8(+2)カ所のリージョン(地域) 36都市51箇所のエッジロケーションemsp を即座に利利用可能

httpawsamazoncomjpabout-‐‑‒awsglobalinfrastructureemsp 

シドニー

北北京

アベイラビリティゾーン(AZ)

bull  各リージョン内に複数のAZ(データセンター群)が存在bull  各AZはお互いに影響を受け難いように地理理的電源的ネットワーク的に分離離して設計

bull  AZ間は高速専用線で接続(リージョン間はインターネットも使用)

典型的Webアーキテクチャ(他のサービスとの組み合わせ)

東京リージョン

AZ-‐‑‒1a AZ-‐‑‒1c

EC2 EC2

RDSマスタ RDSスレーブ自動同期

ELB(ロードバランサ)

Amazon Route 53(ドメイン名割り当て)

静的コンテンツ

S3

CloudFront(コンテンツ 配信)

Virtual Private Cloud (VPC)とEC2

EC2-Classic

Amazon Virtual Private Cloud (VPC)環境

ユーザごとの IPアドレス領域で

インスタンスを利用可

全ユーザで共通の 100008のIPアドレスを使う

現在の標準環境 EC2-VPC

EC2-VPCのDefault VPC

  Default VPCでは 1  172310016が使われる 2  各AZにDefault Subnet (public)が自動作成される 3  選択したAZのDefault Subnetにインスタンスがデプロイされる 4  EC2インスタンスにはPublic IPアドレスがアサインされる

Default VPC (172310016) デフォルトのデプロイ先VPC

Default Subnet AZごとに作成されるデフォルトのデプロイ先サブネット 大きさは20 (4096 IPs)

Public IPアドレス インスタンスに動的割当て されるGlobal IPアドレス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

11

Amazon Elastic Block Store (EBS)

EBSとはEC2に仮想外付けされるブロックレベルのストレージサービス

  サイズは1GB単位で〜~1TBまで   サイズ期間(IO)で課金金される   各EC2インスタンスで複数EBSを使える詳細   データは永続的に保存される   いつでもバックアップ(スナップショット)   スナップショットからEBSを作成可能(他のAZに作成できる)

  Provisioned IOPSでIOパフォーマンス指定bull  2014年年3月時点で最大4000IOPS

  他のEC2インスタンスに付け替え可能

Region

Availability Zone - a

EBS EBS EBS

Availability Zone - b

EBS EBS

Amazon S3

EBSスナップショット

EC2 EC2

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

12

Instance StorageとEBS

EC2

Instance Storage bull  内蔵ディスク bull  EC2と不可分 bull  EC2をStopTerminateするとクリアされる bull  性能容量はインスタンスタイプごとに規定 bull  追加費用なし

EBS bull  ネットワークで接続 bull  EC2とは独立管理 bull  EC2をTerminateしてもEBSは保持可能 bull  Volumeごとに性能容量を定義可能 bull  EBSの費用が発生

物理的には ネットワーク経由

EC2に関連する主要コンポーネントリージョン

アベイラビリティゾーン

Amazon CloudWatch

Auto Scaling

Amazon Elastic Block Storage

(EBS)

Amazon Machine Image (AMI)

Elastic IP

Amazon Virtual Private Cloud

(VPC)

Elastic Load Balancer

Snapshot

Amazon Elastic Compute Cloud

(EC2)

Key Pairs

AWS Management Console

Security Groups

VM ImportExport

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

14

今日のAgenda

 Amazon EC2とは  Amazon EC2の基本

bull  触ってみようbull  基本コンセプト

 Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

15

マネジメントコンソールからログイン

  作成したアカウントのメールアドレスパスワードでログインbull  httpsconsoleawsamazoncomec2home emsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

16

AWSサービスの選択   Webコンソールでコントロールするサービスを選ぶ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

17

リージョン選択   日本にいながら世界中のどのリージョンも選択できる

XXXX

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

18

AMI選択   任意のAMIを選ぶことで好みの環境 (OSミドルウェアアプリデータ) を選択できる

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

19

台数インスタンスタイプアベイラビリティゾーンの指定

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

20

EBSの設定

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

21

Key Pair選択   いわゆる公開鍵方式でサーバーにアクセスする初回時は秘密鍵を手元にダウンロードする

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

22

Security Groups選択

  いわゆるファイアウォールの設定作っておいたグループをサーバーに割り当てる

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

23

起動完了了

  起動完了了画面を確認し起動ウィザードを終了了

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

24

起動したインスタンスの情報確認XXXXX

パブリックDNS名

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

25

ターミナルでアクセス

ログインの際のアカウント名はAMIによって違うので注意 例) Amazon Linux -gt ec2-user その他Linuxの多く -gt root admin等

パブリックDNS名

秘密鍵

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

26

今日のAgenda

 Amazon EC2とは  Amazon EC2の基本

bull  触ってみようbull  基本コンセプト

 Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

27

Amazon Machine Image (AMI)

  AMIはインスタンス作成に使用するイメージテンプレート   AWS公式AMIやサードパーティもAMIを提供

bull  httpsawsamazoncomamisbull  httpsawsamazoncommarketplaceemsp 

  選択したAMIから起動する   EC2インスタンスから任意のタイミングでカスタムAMIを作成できる

launch

Amazon Machine Image (AMI)

Amazon EC2インスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

28

AMIとインスタンスAZの関係

インスタンス

Amazon S3

AMI

Availability Zone-1a Availability Zone-1b

カスタム AMI

AMIからインスタンスを起動

カスタムAMIを使ってインスタンスを複数台起動

カスタムAMIを作成必要に応じて共有設定

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

29

AMIの取得AMIからの起動

Copyright copy 2011 Amazon Web Services

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

30

EC2インスタンスのライフサイクル   起動したインスタンスは3つの状態を持つ

bull  Running 実行行中課金金されるbull  Stopped 停止中課金金されないbull  Terminated 終了了StopStartはできない

Running

Terminated

Stopped

StartStop

Terminate

launch

Terminate

Amazon Machine Image (AMI)

Amazon EC2インスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

31

EC2インスタンスの停止と終了了

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

32

EC2インスタンスのタイプ変更Stop(停止)しているといつでもタイプ(スペック)を変更更できる

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

33

EBSボリュームのアタッチ

Copyright copy 2011 Amazon Web Services

EC2インスタンスと同じゾーンに作ることを注意 スナップショットから複製も可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

34

EC2インスタンスのアドレス

  全てのインスタンスが下記を持つsect  Private IPアドレス(VPC内のサブネットから割り当てる)sect  Private DNS名(internal)sect  Public DNS名 (amazonawscom)

  public IPアドレスをオプションで付けられる   固定されたPublic IP Addresses はEIPと呼ぶ

sect  稼働しているEC2インスタンスに瞬時に付け外しが可能sect  インスタンスにアサインしているときは料料金金はかからない

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

35

EIPの割り当て

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

36

EIPの使いどころ

  通常のケースはEIPは必要なくEC2のPublic DNS名を用いてCNAMEで名前変換を行行う

  Route 53(名前解決サービス)でPublic DNSを用いる

  固定IPアドレスが必要なときに限りEIPを用いる   メールサーバー監視サーバー等

  メールサーバの送信制限解除逆引き申請が必要な場合は下記から申請を行行うhttpsaws-‐‑‒portalamazoncomgpawshtml-‐‑‒forms-‐‑‒controllercontactusec2-‐‑‒email-‐‑‒limit-‐‑‒rdns-‐‑‒request

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

37

リージョン間コピー(AMIEBS)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

38

Amazon EC2の関連サービス関連情報   監視負荷分散自動スケール

rarrCloudWatchELBAutoScaling   閉域網での利利用仮想ネットワーキング

rarrAmazon VPC (Virtual Private Cloud)   ① 社内ネットワークからVPN接続   ② ルーティングイントラIPアドレス仮想NIC等々

  占有サーバ rarrAmazon Dedicated Instance   専用線接続 rarrAmazon Direct Connect   Windowsemsp emsp  rarrWindowsインスタンス   スパコンrarrHPCインスタンス   アクセス管理理emsp  rarrIAM (Identity and Access Management)   料料金金関係emsp  rarrConsolidated Billing資料料集emsp httpawsamazoncomjpaws-‐‑‒meister

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

39

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

40

AWSのセキュリティの考え方

第三者認証

SOC 1SSAE 16ISAE 3402 ISO 27001 PCI DSS HIPAA ITAR

FISMA Moderate FIPS 140-2 ファシリティ

DC電源ネットワーク冗長化

Your Apps

Webサイトアプリケーションこれまでと同様のセキュリティを

お客様SI様で実現可能

インフラよりハイレベルの

セキュリティをAWSが提供

シェアードレスポンシビリティモデル(責任共有モデル)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

41

EC2の責任共有モデル

物理インタフェース

ファイアウォール

      ハイバーバイザー

Sm

all

Larg

e

hellip

Sm

all Amazon EC2

インスタンス

物理ホスト

ユーザーが 責任を持って 管理する

AWSが 責任を持って 管理する

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

42

ファイアウォールを実現するSecurity Group

  インスタンスのINOUTトラフィックを制限するファイアウォール機能

  デフォルトIN向けは全トラフィック閉

  必要な受信アクセスに対してアクセスルールを定義する

bull  プロトコル( TCPUDP)bull  宛先ポートbull  アクセス元IP Security Group

  ルールをひとまとめにしたテンプレートを Security Groupと呼ぶ

EC2 インスタンス

ポート22(SSH)

ポート80(HTTP)

EC2ファイアウォール

Security Group

ポート25(SMTP)

ポート22(SSH)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

43

Security Groupの使い方   インスタンスの用途に応じたSecurity Groupを用意する

bull  Webサーバ用DBサーバ用メールサーバ用等   アクセス元にSecurity Groupも設定して限定可能

Webサーバ

Webサーバ

DBサーバ

sg-1234

22 00000 80 00000 25 sg-1234

sg-1234

sg-1234

sg-abcd sg-abcd

22 00000 3306 sg-1234

Webサーバ

sg-xyz

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

44

セキュリティ証明書

仮想サーバ(Amazon EC2)Windows( スタンダード)

コマンドライン SDK利利用

SSH公開鍵認証

仮想デスクトップ

ターミナル

REST SOAPAPI

Webコンソール

①EC2インスタンスへのアクセスrarr鍵認証

②Webコンソールへのアクセス

rarrパスワード認証 多要素認証 IAM

③APIへのアクセスrarrアクセスキー X509証明書 IAM

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

45

Key Pair(キーペア)を用いた鍵認証   鍵認証はユーザ名パスワードの認証よりも安全な認証方式

ダウンロードされた秘密鍵

①キーペア作成

②インスタンス起動時にemsp emsp emsp 公開鍵をコピー

公開鍵

③公開鍵秘密鍵のペアが合致するとログイン可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

46

EC2のSLA13

sect  EC2の可用性が9995 sect 上記に満たない場合はServiceクレジットを返還する

sect 詳細は sect  httpawsamazoncomec2-sla

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

47

AWSセキュリティセンター 13

 日本語のホワイトペーパー bull  セキュリティ概要 bull  リスクとコンプライアンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

48

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

49

最近追加された機能

  VM Import for Linux   IAM EC2 Resource Permissions   リザーブドインスタンスの変更更可能に   SR-‐‑‒IOVネットワークDriverネットワーク性能向上

bull  C3 I2 R3インスタンスで対応

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

50

インスタンスのさらなる追加

  一般的な目的なら M3   Compute Optimizedなら C3   Memory Optimizedなら R3(もうすぐ)   GPUが必要なら G2   IOPS重視なら I2   Disk Based Storage ならHS1

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

51

Intel Processor Features

  m3 c3 cc2 g2 cr1 i2 r3の全てが対応

  AES New Instructions (AES-‐‑‒NI)bull  c1 cg1 m2でも対応

  Advanced Vector Extensions (Intel AVX)bull  HVMでのみ対応

  Turbo Boost Technology

  詳細は httpawsamazoncomec2instance-‐‑‒types

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

52

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

53

故障のための設計 Design for Failure   故障に備えた設計をしておく

  すべてが故障しうると考えシステム全体での保守的設計   SPOF(単一障害点)の排除   障害からの復復旧(対応品質)を重視する

  EC2における故障のための設計   AMIを常にとっておく   EBSスナップショットでバックアップ   複数アベイラビリティゾーンへの分散   ELBでサーバを冗長化Auto Scalingで自動復復帰   Reserved Instanceでキャパシティ保障

  他の冗長性高いサービスとの組み合わせ   S3 SimpleDB RDS他

httpwwwslidesharenetkentamagawaaws-‐‑‒7991623

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

54

定期的なバックアップ

  EC2のAMIを定期的に作成する   (参考) 無停止でAMI取得

Cloudpackさんブログhttpblogcloudpackjp201103aws-‐‑‒news-‐‑‒ec2-‐‑‒instance-‐‑‒no-‐‑‒reboot-‐‑‒amihtml

  データボリュームとしてのEBSの場合EBSのスナップショットを定期的に作成

  スクリプトを書いて定期的なバックアップを行行うことも可能 Coderockさんブログ

httpblogdateofrockcom201003auto-‐‑‒backup-‐‑‒amazon-‐‑‒ebs-‐‑‒with-‐‑‒rubyhtml   サーバーワークスさんブログ

httpblogserverworkscojptech20110721awssdk-‐‑‒for-‐‑‒ruby-‐‑‒create-‐‑‒snapshot

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

55

Instance StorageにSSDを積んだインスタンスが増えてきた

  EC2のタイプによって選択できるInstance Storeは以下の通り

Instance Type Instance Store Volumesm1small 1 x 160 GBdaggerm1medium 1 x 410 GBm1large 2 x 420 GB (840 GB)m1xlarge 4 x 420 GB (1680 GB)m2xlarge 1 x 420 GBm22xlarge 1 x 850 GBm24xlarge 2 x 840 GB (1680 GB)m3medium 1 x 4 GB SSDm3large 1 x 32 GB SSDm3xlarge 2 x 40 GB SSD (80 GB)m32xlarge 2 x 80 GB SSD (160 GB)

t1micro None (use Amazon EBS volumes)

c1medium 1 x 350 GBdaggerc1xlarge 4 x 420 GB (1680 GB)

Instance Type Instance Store Volumes

c3large 2 x 16 GB SSD (32 GB)c3xlarge 2 x 40 GB SSD (80 GB)c32xlarge 2 x 80 GB SSD (160 GB)c34xlarge 2 x 160 GB SSD (320 GB)c38xlarge 2 x 320 GB SSD (640 GB)cc28xlarge 4 x 840 GB (3360 GB)cg14xlarge 2 x 840 GB (1680 GB)cr18xlarge 2 x 120 GB SSD (240 GB)hi14xlarge 2 x 1024 GB SSD (2048 GB)hs18xlarge 24 x 2048 GB (49 TB)i2xlarge 1 x 800 GB SSDi22xlarge 2 x 800 GB SSD (1600 GB)i24xlarge 4 x 800 GB SSD (3200 GB)i28xlarge 8 x 800 GB SSD (6400 GB)

2014年年1月29日時点

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

56

Instance Storageを使うべきなのは

 高IOPS高帯域なストレージが必要な場合

 消えても良良い一次データの置き場として使う場合

 ストレージ冗長化を準備できる場合

S3活かしたいメリット

考慮すべき制約

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

57

EC2へのファイル転送は

  SCPを使う scp pk-‐‑‒XXXpem rootec2-‐‑‒XXXamazonawscomxxx

  Windowsの場合はWinSCPなど   S3経由で共有する

  S3にアップロードしEC2からwgetでアクセスする   FTPを立立ち上げる

  EC2側でFTPサーバーを立立ち上げておく

  高速に送信したい   Tsunami UDP Aspera等のソリューション

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

58

VM Import Export

  複数プラットフォームのVMイメージをAmazon EC2に移行行(インポートエクスポート)可能

httpawstypepadcomaws_japan201012vm-‐‑‒import-‐‑‒bring-‐‑‒your-‐‑‒vmware-‐‑‒images-‐‑‒to-‐‑‒the-‐‑‒cloudhtml

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

59

稼働EC2インスタンスからメタデータ取得

  ami-‐‑‒id   ami-‐‑‒launch-‐‑‒index   ami-‐‑‒manifest-‐‑‒path   block-‐‑‒device-‐‑‒mapping   hostname   instance-‐‑‒action   instance-‐‑‒id   Instance-‐‑‒type   kernel-‐‑‒id

  local-‐‑‒hostname   local-‐‑‒ipv4   mac   network   placement   profile   public-‐‑‒hostname   public-‐‑‒ipv4   public-‐‑‒keys   reservation-‐‑‒id

curl http169254169254latestmeta-‐‑‒data

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

60

起動時にパラメーターを渡す   起動時に16KB以内で任意のものを渡せる

  ChefやPuppetなどを利利用して自己構成できるAMIに   参照emsp AWSマイスターemsp CloudFormation資料料httpwwwslidesharenetkentamagawacloudformation-‐‑‒aws5

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

61

EC2コマンドラインツール amp AWS SDKs

  コマンドラインからEC2のAPIにアクセスできるツール   ツールをインストールしセキュリティ証明書を配置

  AWS SDKs httpawsamazoncomcode

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

62

マネージメントコンソールだけでなくAPIからプログラマブルにアクセス

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1a --instance-type m1small

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1b --instance-type m1small

Tokyo リージョン

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

63

EC2のスケジュールイベント表示機能

  EC2インスタンスが稼働しているハードかソフトにメンテナンスが必要な場合に情報を提供する仕組み

  インスタンスリブートシステムリブートリタイヤ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

64

EC2のステータスチェック機能

  下記の2種類のチェックを自動テストで実行行し情報を提示   システムステータスチェック

  EC2インスタンスにネットワークパケットが通るかチェック   インスタンスステータスチェック

  EC2インスタンスのOSがネットワークパケットを受け取るかチェック

  もし状況に乖離離がある場合はレポートできます

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

65

AWS制限増加申請

  EC2を誤って大量量に作成しないよう最大インスタンス数の上限を20に制限しています

  制限増加申請フォームで各種制限の増加を行行えますbull  httpawsamazoncomjpcontact-‐‑‒usemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

66

既存EBSボリュームのサイズ変更更

  例例 10GB -‐‑‒gt 100GB変更更への流流れ   EBSをデタッチする   EBSからS3にスナップショットを作成する

  新たなボリュームサイズを指定してEBSを作成する

  EBSをアタッチする   マウントしてリサイズする

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

スナップショット

EBS (10GB)

EBS (100GB)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

67

EBSとS3

EBSは複数EC2にアタッチ不不可   単独のEC2インスタンスへのブロックデバイスとしての使い方

  NFSのような使い方をする際はEC2にミドルウェアを導入(GlusterFS等)

S3は複数のEC2からアクセス可   ただしWrite Once Read A Lotな使い方に向いている

  アップロード並列列化も使える   耐久性の設計は99999999999で非常に高い

Copyright copy 2011 Amazon Web Services

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

バケット

EBS

EC2インスタンス

HTTPHTTPS

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

68

EIP使用時の注意点

  グローバルIP(EIP)を用いた場合インターネット経由のアクセスとなり課金発生するケースがある

  名前解決したいサーバに固定IPを付与する13   各サーバは固定グローバルIPを元に

AWSのDNSに名前を問い合わせ13   問い合わせた結果返ってくる外部DNS名でサーバにアクセスを行う13   EC2内部で外部DNS名を使ってアクセスすると プライベートIPアドレスに変換されるため 目的のサーバにプライベートIPでアクセスできる13

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

69

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

70

AWSの課金金の仕組みインターネット

ELB

EC2

EBS

S3

データ転送量量

ELB利利用料料データ処理理量量

インスタンスタイプ別利利用料料

EBSの利利用料料

S3の利利用料料

大半を占める

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

71

Simple Monthly Calculator

  Web上にある計算機を使って概算費用を計算できますsect  httpcalculators3amazonawscomcalc5htmllng=ja_JP

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

72

複数の価格モデル

 課金金モデルが選べるsect 通常の時間課金金のオンデマンドインスタンス

sect ある程度度継続してEC2を使う(1年年3年年)EC2リザーブドインスタンス

sect 入札を利利用してより安く使うEC2スポットインスタンス

rarrマイスターシリーズ RIampスポットインスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

73

AWS無料料試用枠

  AWSでは無料料試用枠を用意していますbull  httpawsamazoncomjpfreeemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

74

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

75

Appendix

  参考資料料bull  Amazon Glacier Developer Guidehttpdocsamazonwebservicescomamazonglacierlatestdevintroductionhtml

bull  Amazon Glacier FAQhttpawsamazoncomjpglacierfaqs

bull  Amazon Glaceir価格httpawsamazoncomjpglacierpricing

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

76

QampA

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 3: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

3

今日のAgenda

 Amazon EC2とは  Amazon EC2の基本  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

4

AWSの様々なサービス

4

お客様のアプリケーション

認証 AWS IAM

モニタリングAmazon

CloudWatch

Web管理理画面Management Console

デプロイと自動化AWS Elastic Beanstalk

AWS CloudFromationAWS OpsWorks

IDEプラグインEclipse

Visual Studio

ライブラリ amp SDKsJava PHP NET Python Ruby

デプロイ アドミン

コンテンツ配信Amazon CloudFront

メッセージAmazon SNSAmazon SQS

分散処理理Elastic MapReduce

メール配信 Amazon SES

キャッシングAmazon Elasticache

ワークフロー管理理Amazon SWF

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

コンピュータ処理理 Amazon EC2Auto Scale

ストレージ Amazon S3Amazon EBS

AWS StorageGateway

データベースAmazon RDS

Amazon DynamoDBAmazon SimpleDBAmazon RedShift

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

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

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

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

5

Amazon EC2仮想化されたサーバ

仮想サーバ(Amazon EC2)

Windows Linux BSD

コマンドライン SDK利利用

SSH公開鍵認証

仮想外部ディスク(Amazon EBS)

Amazon S3

マシンイメージ(AMI)から起動

仮想デスクトップ

ターミナル

AMI保存

API

Webコンソール

リージョンとエッジロケーション

カリフォルニアダブリン

シンガポール

東京

オレゴン

バージニア

サンパウロ

リージョン

エッジローケーション

GovCloud

世界8(+2)カ所のリージョン(地域) 36都市51箇所のエッジロケーションemsp を即座に利利用可能

httpawsamazoncomjpabout-‐‑‒awsglobalinfrastructureemsp 

シドニー

北北京

アベイラビリティゾーン(AZ)

bull  各リージョン内に複数のAZ(データセンター群)が存在bull  各AZはお互いに影響を受け難いように地理理的電源的ネットワーク的に分離離して設計

bull  AZ間は高速専用線で接続(リージョン間はインターネットも使用)

典型的Webアーキテクチャ(他のサービスとの組み合わせ)

東京リージョン

AZ-‐‑‒1a AZ-‐‑‒1c

EC2 EC2

RDSマスタ RDSスレーブ自動同期

ELB(ロードバランサ)

Amazon Route 53(ドメイン名割り当て)

静的コンテンツ

S3

CloudFront(コンテンツ 配信)

Virtual Private Cloud (VPC)とEC2

EC2-Classic

Amazon Virtual Private Cloud (VPC)環境

ユーザごとの IPアドレス領域で

インスタンスを利用可

全ユーザで共通の 100008のIPアドレスを使う

現在の標準環境 EC2-VPC

EC2-VPCのDefault VPC

  Default VPCでは 1  172310016が使われる 2  各AZにDefault Subnet (public)が自動作成される 3  選択したAZのDefault Subnetにインスタンスがデプロイされる 4  EC2インスタンスにはPublic IPアドレスがアサインされる

Default VPC (172310016) デフォルトのデプロイ先VPC

Default Subnet AZごとに作成されるデフォルトのデプロイ先サブネット 大きさは20 (4096 IPs)

Public IPアドレス インスタンスに動的割当て されるGlobal IPアドレス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

11

Amazon Elastic Block Store (EBS)

EBSとはEC2に仮想外付けされるブロックレベルのストレージサービス

  サイズは1GB単位で〜~1TBまで   サイズ期間(IO)で課金金される   各EC2インスタンスで複数EBSを使える詳細   データは永続的に保存される   いつでもバックアップ(スナップショット)   スナップショットからEBSを作成可能(他のAZに作成できる)

  Provisioned IOPSでIOパフォーマンス指定bull  2014年年3月時点で最大4000IOPS

  他のEC2インスタンスに付け替え可能

Region

Availability Zone - a

EBS EBS EBS

Availability Zone - b

EBS EBS

Amazon S3

EBSスナップショット

EC2 EC2

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

12

Instance StorageとEBS

EC2

Instance Storage bull  内蔵ディスク bull  EC2と不可分 bull  EC2をStopTerminateするとクリアされる bull  性能容量はインスタンスタイプごとに規定 bull  追加費用なし

EBS bull  ネットワークで接続 bull  EC2とは独立管理 bull  EC2をTerminateしてもEBSは保持可能 bull  Volumeごとに性能容量を定義可能 bull  EBSの費用が発生

物理的には ネットワーク経由

EC2に関連する主要コンポーネントリージョン

アベイラビリティゾーン

Amazon CloudWatch

Auto Scaling

Amazon Elastic Block Storage

(EBS)

Amazon Machine Image (AMI)

Elastic IP

Amazon Virtual Private Cloud

(VPC)

Elastic Load Balancer

Snapshot

Amazon Elastic Compute Cloud

(EC2)

Key Pairs

AWS Management Console

Security Groups

VM ImportExport

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

14

今日のAgenda

 Amazon EC2とは  Amazon EC2の基本

bull  触ってみようbull  基本コンセプト

 Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

15

マネジメントコンソールからログイン

  作成したアカウントのメールアドレスパスワードでログインbull  httpsconsoleawsamazoncomec2home emsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

16

AWSサービスの選択   Webコンソールでコントロールするサービスを選ぶ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

17

リージョン選択   日本にいながら世界中のどのリージョンも選択できる

XXXX

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

18

AMI選択   任意のAMIを選ぶことで好みの環境 (OSミドルウェアアプリデータ) を選択できる

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

19

台数インスタンスタイプアベイラビリティゾーンの指定

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

20

EBSの設定

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

21

Key Pair選択   いわゆる公開鍵方式でサーバーにアクセスする初回時は秘密鍵を手元にダウンロードする

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

22

Security Groups選択

  いわゆるファイアウォールの設定作っておいたグループをサーバーに割り当てる

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

23

起動完了了

  起動完了了画面を確認し起動ウィザードを終了了

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

24

起動したインスタンスの情報確認XXXXX

パブリックDNS名

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

25

ターミナルでアクセス

ログインの際のアカウント名はAMIによって違うので注意 例) Amazon Linux -gt ec2-user その他Linuxの多く -gt root admin等

パブリックDNS名

秘密鍵

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

26

今日のAgenda

 Amazon EC2とは  Amazon EC2の基本

bull  触ってみようbull  基本コンセプト

 Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

27

Amazon Machine Image (AMI)

  AMIはインスタンス作成に使用するイメージテンプレート   AWS公式AMIやサードパーティもAMIを提供

bull  httpsawsamazoncomamisbull  httpsawsamazoncommarketplaceemsp 

  選択したAMIから起動する   EC2インスタンスから任意のタイミングでカスタムAMIを作成できる

launch

Amazon Machine Image (AMI)

Amazon EC2インスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

28

AMIとインスタンスAZの関係

インスタンス

Amazon S3

AMI

Availability Zone-1a Availability Zone-1b

カスタム AMI

AMIからインスタンスを起動

カスタムAMIを使ってインスタンスを複数台起動

カスタムAMIを作成必要に応じて共有設定

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

29

AMIの取得AMIからの起動

Copyright copy 2011 Amazon Web Services

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

30

EC2インスタンスのライフサイクル   起動したインスタンスは3つの状態を持つ

bull  Running 実行行中課金金されるbull  Stopped 停止中課金金されないbull  Terminated 終了了StopStartはできない

Running

Terminated

Stopped

StartStop

Terminate

launch

Terminate

Amazon Machine Image (AMI)

Amazon EC2インスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

31

EC2インスタンスの停止と終了了

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

32

EC2インスタンスのタイプ変更Stop(停止)しているといつでもタイプ(スペック)を変更更できる

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

33

EBSボリュームのアタッチ

Copyright copy 2011 Amazon Web Services

EC2インスタンスと同じゾーンに作ることを注意 スナップショットから複製も可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

34

EC2インスタンスのアドレス

  全てのインスタンスが下記を持つsect  Private IPアドレス(VPC内のサブネットから割り当てる)sect  Private DNS名(internal)sect  Public DNS名 (amazonawscom)

  public IPアドレスをオプションで付けられる   固定されたPublic IP Addresses はEIPと呼ぶ

sect  稼働しているEC2インスタンスに瞬時に付け外しが可能sect  インスタンスにアサインしているときは料料金金はかからない

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

35

EIPの割り当て

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

36

EIPの使いどころ

  通常のケースはEIPは必要なくEC2のPublic DNS名を用いてCNAMEで名前変換を行行う

  Route 53(名前解決サービス)でPublic DNSを用いる

  固定IPアドレスが必要なときに限りEIPを用いる   メールサーバー監視サーバー等

  メールサーバの送信制限解除逆引き申請が必要な場合は下記から申請を行行うhttpsaws-‐‑‒portalamazoncomgpawshtml-‐‑‒forms-‐‑‒controllercontactusec2-‐‑‒email-‐‑‒limit-‐‑‒rdns-‐‑‒request

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

37

リージョン間コピー(AMIEBS)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

38

Amazon EC2の関連サービス関連情報   監視負荷分散自動スケール

rarrCloudWatchELBAutoScaling   閉域網での利利用仮想ネットワーキング

rarrAmazon VPC (Virtual Private Cloud)   ① 社内ネットワークからVPN接続   ② ルーティングイントラIPアドレス仮想NIC等々

  占有サーバ rarrAmazon Dedicated Instance   専用線接続 rarrAmazon Direct Connect   Windowsemsp emsp  rarrWindowsインスタンス   スパコンrarrHPCインスタンス   アクセス管理理emsp  rarrIAM (Identity and Access Management)   料料金金関係emsp  rarrConsolidated Billing資料料集emsp httpawsamazoncomjpaws-‐‑‒meister

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

39

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

40

AWSのセキュリティの考え方

第三者認証

SOC 1SSAE 16ISAE 3402 ISO 27001 PCI DSS HIPAA ITAR

FISMA Moderate FIPS 140-2 ファシリティ

DC電源ネットワーク冗長化

Your Apps

Webサイトアプリケーションこれまでと同様のセキュリティを

お客様SI様で実現可能

インフラよりハイレベルの

セキュリティをAWSが提供

シェアードレスポンシビリティモデル(責任共有モデル)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

41

EC2の責任共有モデル

物理インタフェース

ファイアウォール

      ハイバーバイザー

Sm

all

Larg

e

hellip

Sm

all Amazon EC2

インスタンス

物理ホスト

ユーザーが 責任を持って 管理する

AWSが 責任を持って 管理する

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

42

ファイアウォールを実現するSecurity Group

  インスタンスのINOUTトラフィックを制限するファイアウォール機能

  デフォルトIN向けは全トラフィック閉

  必要な受信アクセスに対してアクセスルールを定義する

bull  プロトコル( TCPUDP)bull  宛先ポートbull  アクセス元IP Security Group

  ルールをひとまとめにしたテンプレートを Security Groupと呼ぶ

EC2 インスタンス

ポート22(SSH)

ポート80(HTTP)

EC2ファイアウォール

Security Group

ポート25(SMTP)

ポート22(SSH)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

43

Security Groupの使い方   インスタンスの用途に応じたSecurity Groupを用意する

bull  Webサーバ用DBサーバ用メールサーバ用等   アクセス元にSecurity Groupも設定して限定可能

Webサーバ

Webサーバ

DBサーバ

sg-1234

22 00000 80 00000 25 sg-1234

sg-1234

sg-1234

sg-abcd sg-abcd

22 00000 3306 sg-1234

Webサーバ

sg-xyz

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

44

セキュリティ証明書

仮想サーバ(Amazon EC2)Windows( スタンダード)

コマンドライン SDK利利用

SSH公開鍵認証

仮想デスクトップ

ターミナル

REST SOAPAPI

Webコンソール

①EC2インスタンスへのアクセスrarr鍵認証

②Webコンソールへのアクセス

rarrパスワード認証 多要素認証 IAM

③APIへのアクセスrarrアクセスキー X509証明書 IAM

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

45

Key Pair(キーペア)を用いた鍵認証   鍵認証はユーザ名パスワードの認証よりも安全な認証方式

ダウンロードされた秘密鍵

①キーペア作成

②インスタンス起動時にemsp emsp emsp 公開鍵をコピー

公開鍵

③公開鍵秘密鍵のペアが合致するとログイン可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

46

EC2のSLA13

sect  EC2の可用性が9995 sect 上記に満たない場合はServiceクレジットを返還する

sect 詳細は sect  httpawsamazoncomec2-sla

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

47

AWSセキュリティセンター 13

 日本語のホワイトペーパー bull  セキュリティ概要 bull  リスクとコンプライアンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

48

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

49

最近追加された機能

  VM Import for Linux   IAM EC2 Resource Permissions   リザーブドインスタンスの変更更可能に   SR-‐‑‒IOVネットワークDriverネットワーク性能向上

bull  C3 I2 R3インスタンスで対応

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

50

インスタンスのさらなる追加

  一般的な目的なら M3   Compute Optimizedなら C3   Memory Optimizedなら R3(もうすぐ)   GPUが必要なら G2   IOPS重視なら I2   Disk Based Storage ならHS1

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

51

Intel Processor Features

  m3 c3 cc2 g2 cr1 i2 r3の全てが対応

  AES New Instructions (AES-‐‑‒NI)bull  c1 cg1 m2でも対応

  Advanced Vector Extensions (Intel AVX)bull  HVMでのみ対応

  Turbo Boost Technology

  詳細は httpawsamazoncomec2instance-‐‑‒types

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

52

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

53

故障のための設計 Design for Failure   故障に備えた設計をしておく

  すべてが故障しうると考えシステム全体での保守的設計   SPOF(単一障害点)の排除   障害からの復復旧(対応品質)を重視する

  EC2における故障のための設計   AMIを常にとっておく   EBSスナップショットでバックアップ   複数アベイラビリティゾーンへの分散   ELBでサーバを冗長化Auto Scalingで自動復復帰   Reserved Instanceでキャパシティ保障

  他の冗長性高いサービスとの組み合わせ   S3 SimpleDB RDS他

httpwwwslidesharenetkentamagawaaws-‐‑‒7991623

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

54

定期的なバックアップ

  EC2のAMIを定期的に作成する   (参考) 無停止でAMI取得

Cloudpackさんブログhttpblogcloudpackjp201103aws-‐‑‒news-‐‑‒ec2-‐‑‒instance-‐‑‒no-‐‑‒reboot-‐‑‒amihtml

  データボリュームとしてのEBSの場合EBSのスナップショットを定期的に作成

  スクリプトを書いて定期的なバックアップを行行うことも可能 Coderockさんブログ

httpblogdateofrockcom201003auto-‐‑‒backup-‐‑‒amazon-‐‑‒ebs-‐‑‒with-‐‑‒rubyhtml   サーバーワークスさんブログ

httpblogserverworkscojptech20110721awssdk-‐‑‒for-‐‑‒ruby-‐‑‒create-‐‑‒snapshot

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

55

Instance StorageにSSDを積んだインスタンスが増えてきた

  EC2のタイプによって選択できるInstance Storeは以下の通り

Instance Type Instance Store Volumesm1small 1 x 160 GBdaggerm1medium 1 x 410 GBm1large 2 x 420 GB (840 GB)m1xlarge 4 x 420 GB (1680 GB)m2xlarge 1 x 420 GBm22xlarge 1 x 850 GBm24xlarge 2 x 840 GB (1680 GB)m3medium 1 x 4 GB SSDm3large 1 x 32 GB SSDm3xlarge 2 x 40 GB SSD (80 GB)m32xlarge 2 x 80 GB SSD (160 GB)

t1micro None (use Amazon EBS volumes)

c1medium 1 x 350 GBdaggerc1xlarge 4 x 420 GB (1680 GB)

Instance Type Instance Store Volumes

c3large 2 x 16 GB SSD (32 GB)c3xlarge 2 x 40 GB SSD (80 GB)c32xlarge 2 x 80 GB SSD (160 GB)c34xlarge 2 x 160 GB SSD (320 GB)c38xlarge 2 x 320 GB SSD (640 GB)cc28xlarge 4 x 840 GB (3360 GB)cg14xlarge 2 x 840 GB (1680 GB)cr18xlarge 2 x 120 GB SSD (240 GB)hi14xlarge 2 x 1024 GB SSD (2048 GB)hs18xlarge 24 x 2048 GB (49 TB)i2xlarge 1 x 800 GB SSDi22xlarge 2 x 800 GB SSD (1600 GB)i24xlarge 4 x 800 GB SSD (3200 GB)i28xlarge 8 x 800 GB SSD (6400 GB)

2014年年1月29日時点

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

56

Instance Storageを使うべきなのは

 高IOPS高帯域なストレージが必要な場合

 消えても良良い一次データの置き場として使う場合

 ストレージ冗長化を準備できる場合

S3活かしたいメリット

考慮すべき制約

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

57

EC2へのファイル転送は

  SCPを使う scp pk-‐‑‒XXXpem rootec2-‐‑‒XXXamazonawscomxxx

  Windowsの場合はWinSCPなど   S3経由で共有する

  S3にアップロードしEC2からwgetでアクセスする   FTPを立立ち上げる

  EC2側でFTPサーバーを立立ち上げておく

  高速に送信したい   Tsunami UDP Aspera等のソリューション

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

58

VM Import Export

  複数プラットフォームのVMイメージをAmazon EC2に移行行(インポートエクスポート)可能

httpawstypepadcomaws_japan201012vm-‐‑‒import-‐‑‒bring-‐‑‒your-‐‑‒vmware-‐‑‒images-‐‑‒to-‐‑‒the-‐‑‒cloudhtml

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

59

稼働EC2インスタンスからメタデータ取得

  ami-‐‑‒id   ami-‐‑‒launch-‐‑‒index   ami-‐‑‒manifest-‐‑‒path   block-‐‑‒device-‐‑‒mapping   hostname   instance-‐‑‒action   instance-‐‑‒id   Instance-‐‑‒type   kernel-‐‑‒id

  local-‐‑‒hostname   local-‐‑‒ipv4   mac   network   placement   profile   public-‐‑‒hostname   public-‐‑‒ipv4   public-‐‑‒keys   reservation-‐‑‒id

curl http169254169254latestmeta-‐‑‒data

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

60

起動時にパラメーターを渡す   起動時に16KB以内で任意のものを渡せる

  ChefやPuppetなどを利利用して自己構成できるAMIに   参照emsp AWSマイスターemsp CloudFormation資料料httpwwwslidesharenetkentamagawacloudformation-‐‑‒aws5

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

61

EC2コマンドラインツール amp AWS SDKs

  コマンドラインからEC2のAPIにアクセスできるツール   ツールをインストールしセキュリティ証明書を配置

  AWS SDKs httpawsamazoncomcode

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

62

マネージメントコンソールだけでなくAPIからプログラマブルにアクセス

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1a --instance-type m1small

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1b --instance-type m1small

Tokyo リージョン

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

63

EC2のスケジュールイベント表示機能

  EC2インスタンスが稼働しているハードかソフトにメンテナンスが必要な場合に情報を提供する仕組み

  インスタンスリブートシステムリブートリタイヤ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

64

EC2のステータスチェック機能

  下記の2種類のチェックを自動テストで実行行し情報を提示   システムステータスチェック

  EC2インスタンスにネットワークパケットが通るかチェック   インスタンスステータスチェック

  EC2インスタンスのOSがネットワークパケットを受け取るかチェック

  もし状況に乖離離がある場合はレポートできます

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

65

AWS制限増加申請

  EC2を誤って大量量に作成しないよう最大インスタンス数の上限を20に制限しています

  制限増加申請フォームで各種制限の増加を行行えますbull  httpawsamazoncomjpcontact-‐‑‒usemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

66

既存EBSボリュームのサイズ変更更

  例例 10GB -‐‑‒gt 100GB変更更への流流れ   EBSをデタッチする   EBSからS3にスナップショットを作成する

  新たなボリュームサイズを指定してEBSを作成する

  EBSをアタッチする   マウントしてリサイズする

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

スナップショット

EBS (10GB)

EBS (100GB)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

67

EBSとS3

EBSは複数EC2にアタッチ不不可   単独のEC2インスタンスへのブロックデバイスとしての使い方

  NFSのような使い方をする際はEC2にミドルウェアを導入(GlusterFS等)

S3は複数のEC2からアクセス可   ただしWrite Once Read A Lotな使い方に向いている

  アップロード並列列化も使える   耐久性の設計は99999999999で非常に高い

Copyright copy 2011 Amazon Web Services

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

バケット

EBS

EC2インスタンス

HTTPHTTPS

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

68

EIP使用時の注意点

  グローバルIP(EIP)を用いた場合インターネット経由のアクセスとなり課金発生するケースがある

  名前解決したいサーバに固定IPを付与する13   各サーバは固定グローバルIPを元に

AWSのDNSに名前を問い合わせ13   問い合わせた結果返ってくる外部DNS名でサーバにアクセスを行う13   EC2内部で外部DNS名を使ってアクセスすると プライベートIPアドレスに変換されるため 目的のサーバにプライベートIPでアクセスできる13

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

69

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

70

AWSの課金金の仕組みインターネット

ELB

EC2

EBS

S3

データ転送量量

ELB利利用料料データ処理理量量

インスタンスタイプ別利利用料料

EBSの利利用料料

S3の利利用料料

大半を占める

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

71

Simple Monthly Calculator

  Web上にある計算機を使って概算費用を計算できますsect  httpcalculators3amazonawscomcalc5htmllng=ja_JP

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

72

複数の価格モデル

 課金金モデルが選べるsect 通常の時間課金金のオンデマンドインスタンス

sect ある程度度継続してEC2を使う(1年年3年年)EC2リザーブドインスタンス

sect 入札を利利用してより安く使うEC2スポットインスタンス

rarrマイスターシリーズ RIampスポットインスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

73

AWS無料料試用枠

  AWSでは無料料試用枠を用意していますbull  httpawsamazoncomjpfreeemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

74

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

75

Appendix

  参考資料料bull  Amazon Glacier Developer Guidehttpdocsamazonwebservicescomamazonglacierlatestdevintroductionhtml

bull  Amazon Glacier FAQhttpawsamazoncomjpglacierfaqs

bull  Amazon Glaceir価格httpawsamazoncomjpglacierpricing

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

76

QampA

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 4: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

4

AWSの様々なサービス

4

お客様のアプリケーション

認証 AWS IAM

モニタリングAmazon

CloudWatch

Web管理理画面Management Console

デプロイと自動化AWS Elastic Beanstalk

AWS CloudFromationAWS OpsWorks

IDEプラグインEclipse

Visual Studio

ライブラリ amp SDKsJava PHP NET Python Ruby

デプロイ アドミン

コンテンツ配信Amazon CloudFront

メッセージAmazon SNSAmazon SQS

分散処理理Elastic MapReduce

メール配信 Amazon SES

キャッシングAmazon Elasticache

ワークフロー管理理Amazon SWF

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

コンピュータ処理理 Amazon EC2Auto Scale

ストレージ Amazon S3Amazon EBS

AWS StorageGateway

データベースAmazon RDS

Amazon DynamoDBAmazon SimpleDBAmazon RedShift

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

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

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

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

5

Amazon EC2仮想化されたサーバ

仮想サーバ(Amazon EC2)

Windows Linux BSD

コマンドライン SDK利利用

SSH公開鍵認証

仮想外部ディスク(Amazon EBS)

Amazon S3

マシンイメージ(AMI)から起動

仮想デスクトップ

ターミナル

AMI保存

API

Webコンソール

リージョンとエッジロケーション

カリフォルニアダブリン

シンガポール

東京

オレゴン

バージニア

サンパウロ

リージョン

エッジローケーション

GovCloud

世界8(+2)カ所のリージョン(地域) 36都市51箇所のエッジロケーションemsp を即座に利利用可能

httpawsamazoncomjpabout-‐‑‒awsglobalinfrastructureemsp 

シドニー

北北京

アベイラビリティゾーン(AZ)

bull  各リージョン内に複数のAZ(データセンター群)が存在bull  各AZはお互いに影響を受け難いように地理理的電源的ネットワーク的に分離離して設計

bull  AZ間は高速専用線で接続(リージョン間はインターネットも使用)

典型的Webアーキテクチャ(他のサービスとの組み合わせ)

東京リージョン

AZ-‐‑‒1a AZ-‐‑‒1c

EC2 EC2

RDSマスタ RDSスレーブ自動同期

ELB(ロードバランサ)

Amazon Route 53(ドメイン名割り当て)

静的コンテンツ

S3

CloudFront(コンテンツ 配信)

Virtual Private Cloud (VPC)とEC2

EC2-Classic

Amazon Virtual Private Cloud (VPC)環境

ユーザごとの IPアドレス領域で

インスタンスを利用可

全ユーザで共通の 100008のIPアドレスを使う

現在の標準環境 EC2-VPC

EC2-VPCのDefault VPC

  Default VPCでは 1  172310016が使われる 2  各AZにDefault Subnet (public)が自動作成される 3  選択したAZのDefault Subnetにインスタンスがデプロイされる 4  EC2インスタンスにはPublic IPアドレスがアサインされる

Default VPC (172310016) デフォルトのデプロイ先VPC

Default Subnet AZごとに作成されるデフォルトのデプロイ先サブネット 大きさは20 (4096 IPs)

Public IPアドレス インスタンスに動的割当て されるGlobal IPアドレス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

11

Amazon Elastic Block Store (EBS)

EBSとはEC2に仮想外付けされるブロックレベルのストレージサービス

  サイズは1GB単位で〜~1TBまで   サイズ期間(IO)で課金金される   各EC2インスタンスで複数EBSを使える詳細   データは永続的に保存される   いつでもバックアップ(スナップショット)   スナップショットからEBSを作成可能(他のAZに作成できる)

  Provisioned IOPSでIOパフォーマンス指定bull  2014年年3月時点で最大4000IOPS

  他のEC2インスタンスに付け替え可能

Region

Availability Zone - a

EBS EBS EBS

Availability Zone - b

EBS EBS

Amazon S3

EBSスナップショット

EC2 EC2

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

12

Instance StorageとEBS

EC2

Instance Storage bull  内蔵ディスク bull  EC2と不可分 bull  EC2をStopTerminateするとクリアされる bull  性能容量はインスタンスタイプごとに規定 bull  追加費用なし

EBS bull  ネットワークで接続 bull  EC2とは独立管理 bull  EC2をTerminateしてもEBSは保持可能 bull  Volumeごとに性能容量を定義可能 bull  EBSの費用が発生

物理的には ネットワーク経由

EC2に関連する主要コンポーネントリージョン

アベイラビリティゾーン

Amazon CloudWatch

Auto Scaling

Amazon Elastic Block Storage

(EBS)

Amazon Machine Image (AMI)

Elastic IP

Amazon Virtual Private Cloud

(VPC)

Elastic Load Balancer

Snapshot

Amazon Elastic Compute Cloud

(EC2)

Key Pairs

AWS Management Console

Security Groups

VM ImportExport

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

14

今日のAgenda

 Amazon EC2とは  Amazon EC2の基本

bull  触ってみようbull  基本コンセプト

 Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

15

マネジメントコンソールからログイン

  作成したアカウントのメールアドレスパスワードでログインbull  httpsconsoleawsamazoncomec2home emsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

16

AWSサービスの選択   Webコンソールでコントロールするサービスを選ぶ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

17

リージョン選択   日本にいながら世界中のどのリージョンも選択できる

XXXX

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

18

AMI選択   任意のAMIを選ぶことで好みの環境 (OSミドルウェアアプリデータ) を選択できる

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

19

台数インスタンスタイプアベイラビリティゾーンの指定

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

20

EBSの設定

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

21

Key Pair選択   いわゆる公開鍵方式でサーバーにアクセスする初回時は秘密鍵を手元にダウンロードする

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

22

Security Groups選択

  いわゆるファイアウォールの設定作っておいたグループをサーバーに割り当てる

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

23

起動完了了

  起動完了了画面を確認し起動ウィザードを終了了

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

24

起動したインスタンスの情報確認XXXXX

パブリックDNS名

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

25

ターミナルでアクセス

ログインの際のアカウント名はAMIによって違うので注意 例) Amazon Linux -gt ec2-user その他Linuxの多く -gt root admin等

パブリックDNS名

秘密鍵

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

26

今日のAgenda

 Amazon EC2とは  Amazon EC2の基本

bull  触ってみようbull  基本コンセプト

 Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

27

Amazon Machine Image (AMI)

  AMIはインスタンス作成に使用するイメージテンプレート   AWS公式AMIやサードパーティもAMIを提供

bull  httpsawsamazoncomamisbull  httpsawsamazoncommarketplaceemsp 

  選択したAMIから起動する   EC2インスタンスから任意のタイミングでカスタムAMIを作成できる

launch

Amazon Machine Image (AMI)

Amazon EC2インスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

28

AMIとインスタンスAZの関係

インスタンス

Amazon S3

AMI

Availability Zone-1a Availability Zone-1b

カスタム AMI

AMIからインスタンスを起動

カスタムAMIを使ってインスタンスを複数台起動

カスタムAMIを作成必要に応じて共有設定

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

29

AMIの取得AMIからの起動

Copyright copy 2011 Amazon Web Services

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

30

EC2インスタンスのライフサイクル   起動したインスタンスは3つの状態を持つ

bull  Running 実行行中課金金されるbull  Stopped 停止中課金金されないbull  Terminated 終了了StopStartはできない

Running

Terminated

Stopped

StartStop

Terminate

launch

Terminate

Amazon Machine Image (AMI)

Amazon EC2インスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

31

EC2インスタンスの停止と終了了

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

32

EC2インスタンスのタイプ変更Stop(停止)しているといつでもタイプ(スペック)を変更更できる

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

33

EBSボリュームのアタッチ

Copyright copy 2011 Amazon Web Services

EC2インスタンスと同じゾーンに作ることを注意 スナップショットから複製も可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

34

EC2インスタンスのアドレス

  全てのインスタンスが下記を持つsect  Private IPアドレス(VPC内のサブネットから割り当てる)sect  Private DNS名(internal)sect  Public DNS名 (amazonawscom)

  public IPアドレスをオプションで付けられる   固定されたPublic IP Addresses はEIPと呼ぶ

sect  稼働しているEC2インスタンスに瞬時に付け外しが可能sect  インスタンスにアサインしているときは料料金金はかからない

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

35

EIPの割り当て

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

36

EIPの使いどころ

  通常のケースはEIPは必要なくEC2のPublic DNS名を用いてCNAMEで名前変換を行行う

  Route 53(名前解決サービス)でPublic DNSを用いる

  固定IPアドレスが必要なときに限りEIPを用いる   メールサーバー監視サーバー等

  メールサーバの送信制限解除逆引き申請が必要な場合は下記から申請を行行うhttpsaws-‐‑‒portalamazoncomgpawshtml-‐‑‒forms-‐‑‒controllercontactusec2-‐‑‒email-‐‑‒limit-‐‑‒rdns-‐‑‒request

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

37

リージョン間コピー(AMIEBS)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

38

Amazon EC2の関連サービス関連情報   監視負荷分散自動スケール

rarrCloudWatchELBAutoScaling   閉域網での利利用仮想ネットワーキング

rarrAmazon VPC (Virtual Private Cloud)   ① 社内ネットワークからVPN接続   ② ルーティングイントラIPアドレス仮想NIC等々

  占有サーバ rarrAmazon Dedicated Instance   専用線接続 rarrAmazon Direct Connect   Windowsemsp emsp  rarrWindowsインスタンス   スパコンrarrHPCインスタンス   アクセス管理理emsp  rarrIAM (Identity and Access Management)   料料金金関係emsp  rarrConsolidated Billing資料料集emsp httpawsamazoncomjpaws-‐‑‒meister

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

39

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

40

AWSのセキュリティの考え方

第三者認証

SOC 1SSAE 16ISAE 3402 ISO 27001 PCI DSS HIPAA ITAR

FISMA Moderate FIPS 140-2 ファシリティ

DC電源ネットワーク冗長化

Your Apps

Webサイトアプリケーションこれまでと同様のセキュリティを

お客様SI様で実現可能

インフラよりハイレベルの

セキュリティをAWSが提供

シェアードレスポンシビリティモデル(責任共有モデル)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

41

EC2の責任共有モデル

物理インタフェース

ファイアウォール

      ハイバーバイザー

Sm

all

Larg

e

hellip

Sm

all Amazon EC2

インスタンス

物理ホスト

ユーザーが 責任を持って 管理する

AWSが 責任を持って 管理する

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

42

ファイアウォールを実現するSecurity Group

  インスタンスのINOUTトラフィックを制限するファイアウォール機能

  デフォルトIN向けは全トラフィック閉

  必要な受信アクセスに対してアクセスルールを定義する

bull  プロトコル( TCPUDP)bull  宛先ポートbull  アクセス元IP Security Group

  ルールをひとまとめにしたテンプレートを Security Groupと呼ぶ

EC2 インスタンス

ポート22(SSH)

ポート80(HTTP)

EC2ファイアウォール

Security Group

ポート25(SMTP)

ポート22(SSH)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

43

Security Groupの使い方   インスタンスの用途に応じたSecurity Groupを用意する

bull  Webサーバ用DBサーバ用メールサーバ用等   アクセス元にSecurity Groupも設定して限定可能

Webサーバ

Webサーバ

DBサーバ

sg-1234

22 00000 80 00000 25 sg-1234

sg-1234

sg-1234

sg-abcd sg-abcd

22 00000 3306 sg-1234

Webサーバ

sg-xyz

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

44

セキュリティ証明書

仮想サーバ(Amazon EC2)Windows( スタンダード)

コマンドライン SDK利利用

SSH公開鍵認証

仮想デスクトップ

ターミナル

REST SOAPAPI

Webコンソール

①EC2インスタンスへのアクセスrarr鍵認証

②Webコンソールへのアクセス

rarrパスワード認証 多要素認証 IAM

③APIへのアクセスrarrアクセスキー X509証明書 IAM

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

45

Key Pair(キーペア)を用いた鍵認証   鍵認証はユーザ名パスワードの認証よりも安全な認証方式

ダウンロードされた秘密鍵

①キーペア作成

②インスタンス起動時にemsp emsp emsp 公開鍵をコピー

公開鍵

③公開鍵秘密鍵のペアが合致するとログイン可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

46

EC2のSLA13

sect  EC2の可用性が9995 sect 上記に満たない場合はServiceクレジットを返還する

sect 詳細は sect  httpawsamazoncomec2-sla

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

47

AWSセキュリティセンター 13

 日本語のホワイトペーパー bull  セキュリティ概要 bull  リスクとコンプライアンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

48

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

49

最近追加された機能

  VM Import for Linux   IAM EC2 Resource Permissions   リザーブドインスタンスの変更更可能に   SR-‐‑‒IOVネットワークDriverネットワーク性能向上

bull  C3 I2 R3インスタンスで対応

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

50

インスタンスのさらなる追加

  一般的な目的なら M3   Compute Optimizedなら C3   Memory Optimizedなら R3(もうすぐ)   GPUが必要なら G2   IOPS重視なら I2   Disk Based Storage ならHS1

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

51

Intel Processor Features

  m3 c3 cc2 g2 cr1 i2 r3の全てが対応

  AES New Instructions (AES-‐‑‒NI)bull  c1 cg1 m2でも対応

  Advanced Vector Extensions (Intel AVX)bull  HVMでのみ対応

  Turbo Boost Technology

  詳細は httpawsamazoncomec2instance-‐‑‒types

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

52

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

53

故障のための設計 Design for Failure   故障に備えた設計をしておく

  すべてが故障しうると考えシステム全体での保守的設計   SPOF(単一障害点)の排除   障害からの復復旧(対応品質)を重視する

  EC2における故障のための設計   AMIを常にとっておく   EBSスナップショットでバックアップ   複数アベイラビリティゾーンへの分散   ELBでサーバを冗長化Auto Scalingで自動復復帰   Reserved Instanceでキャパシティ保障

  他の冗長性高いサービスとの組み合わせ   S3 SimpleDB RDS他

httpwwwslidesharenetkentamagawaaws-‐‑‒7991623

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

54

定期的なバックアップ

  EC2のAMIを定期的に作成する   (参考) 無停止でAMI取得

Cloudpackさんブログhttpblogcloudpackjp201103aws-‐‑‒news-‐‑‒ec2-‐‑‒instance-‐‑‒no-‐‑‒reboot-‐‑‒amihtml

  データボリュームとしてのEBSの場合EBSのスナップショットを定期的に作成

  スクリプトを書いて定期的なバックアップを行行うことも可能 Coderockさんブログ

httpblogdateofrockcom201003auto-‐‑‒backup-‐‑‒amazon-‐‑‒ebs-‐‑‒with-‐‑‒rubyhtml   サーバーワークスさんブログ

httpblogserverworkscojptech20110721awssdk-‐‑‒for-‐‑‒ruby-‐‑‒create-‐‑‒snapshot

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

55

Instance StorageにSSDを積んだインスタンスが増えてきた

  EC2のタイプによって選択できるInstance Storeは以下の通り

Instance Type Instance Store Volumesm1small 1 x 160 GBdaggerm1medium 1 x 410 GBm1large 2 x 420 GB (840 GB)m1xlarge 4 x 420 GB (1680 GB)m2xlarge 1 x 420 GBm22xlarge 1 x 850 GBm24xlarge 2 x 840 GB (1680 GB)m3medium 1 x 4 GB SSDm3large 1 x 32 GB SSDm3xlarge 2 x 40 GB SSD (80 GB)m32xlarge 2 x 80 GB SSD (160 GB)

t1micro None (use Amazon EBS volumes)

c1medium 1 x 350 GBdaggerc1xlarge 4 x 420 GB (1680 GB)

Instance Type Instance Store Volumes

c3large 2 x 16 GB SSD (32 GB)c3xlarge 2 x 40 GB SSD (80 GB)c32xlarge 2 x 80 GB SSD (160 GB)c34xlarge 2 x 160 GB SSD (320 GB)c38xlarge 2 x 320 GB SSD (640 GB)cc28xlarge 4 x 840 GB (3360 GB)cg14xlarge 2 x 840 GB (1680 GB)cr18xlarge 2 x 120 GB SSD (240 GB)hi14xlarge 2 x 1024 GB SSD (2048 GB)hs18xlarge 24 x 2048 GB (49 TB)i2xlarge 1 x 800 GB SSDi22xlarge 2 x 800 GB SSD (1600 GB)i24xlarge 4 x 800 GB SSD (3200 GB)i28xlarge 8 x 800 GB SSD (6400 GB)

2014年年1月29日時点

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

56

Instance Storageを使うべきなのは

 高IOPS高帯域なストレージが必要な場合

 消えても良良い一次データの置き場として使う場合

 ストレージ冗長化を準備できる場合

S3活かしたいメリット

考慮すべき制約

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

57

EC2へのファイル転送は

  SCPを使う scp pk-‐‑‒XXXpem rootec2-‐‑‒XXXamazonawscomxxx

  Windowsの場合はWinSCPなど   S3経由で共有する

  S3にアップロードしEC2からwgetでアクセスする   FTPを立立ち上げる

  EC2側でFTPサーバーを立立ち上げておく

  高速に送信したい   Tsunami UDP Aspera等のソリューション

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

58

VM Import Export

  複数プラットフォームのVMイメージをAmazon EC2に移行行(インポートエクスポート)可能

httpawstypepadcomaws_japan201012vm-‐‑‒import-‐‑‒bring-‐‑‒your-‐‑‒vmware-‐‑‒images-‐‑‒to-‐‑‒the-‐‑‒cloudhtml

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

59

稼働EC2インスタンスからメタデータ取得

  ami-‐‑‒id   ami-‐‑‒launch-‐‑‒index   ami-‐‑‒manifest-‐‑‒path   block-‐‑‒device-‐‑‒mapping   hostname   instance-‐‑‒action   instance-‐‑‒id   Instance-‐‑‒type   kernel-‐‑‒id

  local-‐‑‒hostname   local-‐‑‒ipv4   mac   network   placement   profile   public-‐‑‒hostname   public-‐‑‒ipv4   public-‐‑‒keys   reservation-‐‑‒id

curl http169254169254latestmeta-‐‑‒data

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

60

起動時にパラメーターを渡す   起動時に16KB以内で任意のものを渡せる

  ChefやPuppetなどを利利用して自己構成できるAMIに   参照emsp AWSマイスターemsp CloudFormation資料料httpwwwslidesharenetkentamagawacloudformation-‐‑‒aws5

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

61

EC2コマンドラインツール amp AWS SDKs

  コマンドラインからEC2のAPIにアクセスできるツール   ツールをインストールしセキュリティ証明書を配置

  AWS SDKs httpawsamazoncomcode

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

62

マネージメントコンソールだけでなくAPIからプログラマブルにアクセス

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1a --instance-type m1small

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1b --instance-type m1small

Tokyo リージョン

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

63

EC2のスケジュールイベント表示機能

  EC2インスタンスが稼働しているハードかソフトにメンテナンスが必要な場合に情報を提供する仕組み

  インスタンスリブートシステムリブートリタイヤ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

64

EC2のステータスチェック機能

  下記の2種類のチェックを自動テストで実行行し情報を提示   システムステータスチェック

  EC2インスタンスにネットワークパケットが通るかチェック   インスタンスステータスチェック

  EC2インスタンスのOSがネットワークパケットを受け取るかチェック

  もし状況に乖離離がある場合はレポートできます

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

65

AWS制限増加申請

  EC2を誤って大量量に作成しないよう最大インスタンス数の上限を20に制限しています

  制限増加申請フォームで各種制限の増加を行行えますbull  httpawsamazoncomjpcontact-‐‑‒usemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

66

既存EBSボリュームのサイズ変更更

  例例 10GB -‐‑‒gt 100GB変更更への流流れ   EBSをデタッチする   EBSからS3にスナップショットを作成する

  新たなボリュームサイズを指定してEBSを作成する

  EBSをアタッチする   マウントしてリサイズする

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

スナップショット

EBS (10GB)

EBS (100GB)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

67

EBSとS3

EBSは複数EC2にアタッチ不不可   単独のEC2インスタンスへのブロックデバイスとしての使い方

  NFSのような使い方をする際はEC2にミドルウェアを導入(GlusterFS等)

S3は複数のEC2からアクセス可   ただしWrite Once Read A Lotな使い方に向いている

  アップロード並列列化も使える   耐久性の設計は99999999999で非常に高い

Copyright copy 2011 Amazon Web Services

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

バケット

EBS

EC2インスタンス

HTTPHTTPS

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

68

EIP使用時の注意点

  グローバルIP(EIP)を用いた場合インターネット経由のアクセスとなり課金発生するケースがある

  名前解決したいサーバに固定IPを付与する13   各サーバは固定グローバルIPを元に

AWSのDNSに名前を問い合わせ13   問い合わせた結果返ってくる外部DNS名でサーバにアクセスを行う13   EC2内部で外部DNS名を使ってアクセスすると プライベートIPアドレスに変換されるため 目的のサーバにプライベートIPでアクセスできる13

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

69

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

70

AWSの課金金の仕組みインターネット

ELB

EC2

EBS

S3

データ転送量量

ELB利利用料料データ処理理量量

インスタンスタイプ別利利用料料

EBSの利利用料料

S3の利利用料料

大半を占める

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

71

Simple Monthly Calculator

  Web上にある計算機を使って概算費用を計算できますsect  httpcalculators3amazonawscomcalc5htmllng=ja_JP

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

72

複数の価格モデル

 課金金モデルが選べるsect 通常の時間課金金のオンデマンドインスタンス

sect ある程度度継続してEC2を使う(1年年3年年)EC2リザーブドインスタンス

sect 入札を利利用してより安く使うEC2スポットインスタンス

rarrマイスターシリーズ RIampスポットインスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

73

AWS無料料試用枠

  AWSでは無料料試用枠を用意していますbull  httpawsamazoncomjpfreeemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

74

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

75

Appendix

  参考資料料bull  Amazon Glacier Developer Guidehttpdocsamazonwebservicescomamazonglacierlatestdevintroductionhtml

bull  Amazon Glacier FAQhttpawsamazoncomjpglacierfaqs

bull  Amazon Glaceir価格httpawsamazoncomjpglacierpricing

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

76

QampA

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 5: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

5

Amazon EC2仮想化されたサーバ

仮想サーバ(Amazon EC2)

Windows Linux BSD

コマンドライン SDK利利用

SSH公開鍵認証

仮想外部ディスク(Amazon EBS)

Amazon S3

マシンイメージ(AMI)から起動

仮想デスクトップ

ターミナル

AMI保存

API

Webコンソール

リージョンとエッジロケーション

カリフォルニアダブリン

シンガポール

東京

オレゴン

バージニア

サンパウロ

リージョン

エッジローケーション

GovCloud

世界8(+2)カ所のリージョン(地域) 36都市51箇所のエッジロケーションemsp を即座に利利用可能

httpawsamazoncomjpabout-‐‑‒awsglobalinfrastructureemsp 

シドニー

北北京

アベイラビリティゾーン(AZ)

bull  各リージョン内に複数のAZ(データセンター群)が存在bull  各AZはお互いに影響を受け難いように地理理的電源的ネットワーク的に分離離して設計

bull  AZ間は高速専用線で接続(リージョン間はインターネットも使用)

典型的Webアーキテクチャ(他のサービスとの組み合わせ)

東京リージョン

AZ-‐‑‒1a AZ-‐‑‒1c

EC2 EC2

RDSマスタ RDSスレーブ自動同期

ELB(ロードバランサ)

Amazon Route 53(ドメイン名割り当て)

静的コンテンツ

S3

CloudFront(コンテンツ 配信)

Virtual Private Cloud (VPC)とEC2

EC2-Classic

Amazon Virtual Private Cloud (VPC)環境

ユーザごとの IPアドレス領域で

インスタンスを利用可

全ユーザで共通の 100008のIPアドレスを使う

現在の標準環境 EC2-VPC

EC2-VPCのDefault VPC

  Default VPCでは 1  172310016が使われる 2  各AZにDefault Subnet (public)が自動作成される 3  選択したAZのDefault Subnetにインスタンスがデプロイされる 4  EC2インスタンスにはPublic IPアドレスがアサインされる

Default VPC (172310016) デフォルトのデプロイ先VPC

Default Subnet AZごとに作成されるデフォルトのデプロイ先サブネット 大きさは20 (4096 IPs)

Public IPアドレス インスタンスに動的割当て されるGlobal IPアドレス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

11

Amazon Elastic Block Store (EBS)

EBSとはEC2に仮想外付けされるブロックレベルのストレージサービス

  サイズは1GB単位で〜~1TBまで   サイズ期間(IO)で課金金される   各EC2インスタンスで複数EBSを使える詳細   データは永続的に保存される   いつでもバックアップ(スナップショット)   スナップショットからEBSを作成可能(他のAZに作成できる)

  Provisioned IOPSでIOパフォーマンス指定bull  2014年年3月時点で最大4000IOPS

  他のEC2インスタンスに付け替え可能

Region

Availability Zone - a

EBS EBS EBS

Availability Zone - b

EBS EBS

Amazon S3

EBSスナップショット

EC2 EC2

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

12

Instance StorageとEBS

EC2

Instance Storage bull  内蔵ディスク bull  EC2と不可分 bull  EC2をStopTerminateするとクリアされる bull  性能容量はインスタンスタイプごとに規定 bull  追加費用なし

EBS bull  ネットワークで接続 bull  EC2とは独立管理 bull  EC2をTerminateしてもEBSは保持可能 bull  Volumeごとに性能容量を定義可能 bull  EBSの費用が発生

物理的には ネットワーク経由

EC2に関連する主要コンポーネントリージョン

アベイラビリティゾーン

Amazon CloudWatch

Auto Scaling

Amazon Elastic Block Storage

(EBS)

Amazon Machine Image (AMI)

Elastic IP

Amazon Virtual Private Cloud

(VPC)

Elastic Load Balancer

Snapshot

Amazon Elastic Compute Cloud

(EC2)

Key Pairs

AWS Management Console

Security Groups

VM ImportExport

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

14

今日のAgenda

 Amazon EC2とは  Amazon EC2の基本

bull  触ってみようbull  基本コンセプト

 Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

15

マネジメントコンソールからログイン

  作成したアカウントのメールアドレスパスワードでログインbull  httpsconsoleawsamazoncomec2home emsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

16

AWSサービスの選択   Webコンソールでコントロールするサービスを選ぶ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

17

リージョン選択   日本にいながら世界中のどのリージョンも選択できる

XXXX

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

18

AMI選択   任意のAMIを選ぶことで好みの環境 (OSミドルウェアアプリデータ) を選択できる

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

19

台数インスタンスタイプアベイラビリティゾーンの指定

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

20

EBSの設定

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

21

Key Pair選択   いわゆる公開鍵方式でサーバーにアクセスする初回時は秘密鍵を手元にダウンロードする

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

22

Security Groups選択

  いわゆるファイアウォールの設定作っておいたグループをサーバーに割り当てる

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

23

起動完了了

  起動完了了画面を確認し起動ウィザードを終了了

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

24

起動したインスタンスの情報確認XXXXX

パブリックDNS名

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

25

ターミナルでアクセス

ログインの際のアカウント名はAMIによって違うので注意 例) Amazon Linux -gt ec2-user その他Linuxの多く -gt root admin等

パブリックDNS名

秘密鍵

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

26

今日のAgenda

 Amazon EC2とは  Amazon EC2の基本

bull  触ってみようbull  基本コンセプト

 Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

27

Amazon Machine Image (AMI)

  AMIはインスタンス作成に使用するイメージテンプレート   AWS公式AMIやサードパーティもAMIを提供

bull  httpsawsamazoncomamisbull  httpsawsamazoncommarketplaceemsp 

  選択したAMIから起動する   EC2インスタンスから任意のタイミングでカスタムAMIを作成できる

launch

Amazon Machine Image (AMI)

Amazon EC2インスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

28

AMIとインスタンスAZの関係

インスタンス

Amazon S3

AMI

Availability Zone-1a Availability Zone-1b

カスタム AMI

AMIからインスタンスを起動

カスタムAMIを使ってインスタンスを複数台起動

カスタムAMIを作成必要に応じて共有設定

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

29

AMIの取得AMIからの起動

Copyright copy 2011 Amazon Web Services

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

30

EC2インスタンスのライフサイクル   起動したインスタンスは3つの状態を持つ

bull  Running 実行行中課金金されるbull  Stopped 停止中課金金されないbull  Terminated 終了了StopStartはできない

Running

Terminated

Stopped

StartStop

Terminate

launch

Terminate

Amazon Machine Image (AMI)

Amazon EC2インスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

31

EC2インスタンスの停止と終了了

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

32

EC2インスタンスのタイプ変更Stop(停止)しているといつでもタイプ(スペック)を変更更できる

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

33

EBSボリュームのアタッチ

Copyright copy 2011 Amazon Web Services

EC2インスタンスと同じゾーンに作ることを注意 スナップショットから複製も可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

34

EC2インスタンスのアドレス

  全てのインスタンスが下記を持つsect  Private IPアドレス(VPC内のサブネットから割り当てる)sect  Private DNS名(internal)sect  Public DNS名 (amazonawscom)

  public IPアドレスをオプションで付けられる   固定されたPublic IP Addresses はEIPと呼ぶ

sect  稼働しているEC2インスタンスに瞬時に付け外しが可能sect  インスタンスにアサインしているときは料料金金はかからない

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

35

EIPの割り当て

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

36

EIPの使いどころ

  通常のケースはEIPは必要なくEC2のPublic DNS名を用いてCNAMEで名前変換を行行う

  Route 53(名前解決サービス)でPublic DNSを用いる

  固定IPアドレスが必要なときに限りEIPを用いる   メールサーバー監視サーバー等

  メールサーバの送信制限解除逆引き申請が必要な場合は下記から申請を行行うhttpsaws-‐‑‒portalamazoncomgpawshtml-‐‑‒forms-‐‑‒controllercontactusec2-‐‑‒email-‐‑‒limit-‐‑‒rdns-‐‑‒request

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

37

リージョン間コピー(AMIEBS)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

38

Amazon EC2の関連サービス関連情報   監視負荷分散自動スケール

rarrCloudWatchELBAutoScaling   閉域網での利利用仮想ネットワーキング

rarrAmazon VPC (Virtual Private Cloud)   ① 社内ネットワークからVPN接続   ② ルーティングイントラIPアドレス仮想NIC等々

  占有サーバ rarrAmazon Dedicated Instance   専用線接続 rarrAmazon Direct Connect   Windowsemsp emsp  rarrWindowsインスタンス   スパコンrarrHPCインスタンス   アクセス管理理emsp  rarrIAM (Identity and Access Management)   料料金金関係emsp  rarrConsolidated Billing資料料集emsp httpawsamazoncomjpaws-‐‑‒meister

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

39

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

40

AWSのセキュリティの考え方

第三者認証

SOC 1SSAE 16ISAE 3402 ISO 27001 PCI DSS HIPAA ITAR

FISMA Moderate FIPS 140-2 ファシリティ

DC電源ネットワーク冗長化

Your Apps

Webサイトアプリケーションこれまでと同様のセキュリティを

お客様SI様で実現可能

インフラよりハイレベルの

セキュリティをAWSが提供

シェアードレスポンシビリティモデル(責任共有モデル)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

41

EC2の責任共有モデル

物理インタフェース

ファイアウォール

      ハイバーバイザー

Sm

all

Larg

e

hellip

Sm

all Amazon EC2

インスタンス

物理ホスト

ユーザーが 責任を持って 管理する

AWSが 責任を持って 管理する

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

42

ファイアウォールを実現するSecurity Group

  インスタンスのINOUTトラフィックを制限するファイアウォール機能

  デフォルトIN向けは全トラフィック閉

  必要な受信アクセスに対してアクセスルールを定義する

bull  プロトコル( TCPUDP)bull  宛先ポートbull  アクセス元IP Security Group

  ルールをひとまとめにしたテンプレートを Security Groupと呼ぶ

EC2 インスタンス

ポート22(SSH)

ポート80(HTTP)

EC2ファイアウォール

Security Group

ポート25(SMTP)

ポート22(SSH)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

43

Security Groupの使い方   インスタンスの用途に応じたSecurity Groupを用意する

bull  Webサーバ用DBサーバ用メールサーバ用等   アクセス元にSecurity Groupも設定して限定可能

Webサーバ

Webサーバ

DBサーバ

sg-1234

22 00000 80 00000 25 sg-1234

sg-1234

sg-1234

sg-abcd sg-abcd

22 00000 3306 sg-1234

Webサーバ

sg-xyz

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

44

セキュリティ証明書

仮想サーバ(Amazon EC2)Windows( スタンダード)

コマンドライン SDK利利用

SSH公開鍵認証

仮想デスクトップ

ターミナル

REST SOAPAPI

Webコンソール

①EC2インスタンスへのアクセスrarr鍵認証

②Webコンソールへのアクセス

rarrパスワード認証 多要素認証 IAM

③APIへのアクセスrarrアクセスキー X509証明書 IAM

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

45

Key Pair(キーペア)を用いた鍵認証   鍵認証はユーザ名パスワードの認証よりも安全な認証方式

ダウンロードされた秘密鍵

①キーペア作成

②インスタンス起動時にemsp emsp emsp 公開鍵をコピー

公開鍵

③公開鍵秘密鍵のペアが合致するとログイン可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

46

EC2のSLA13

sect  EC2の可用性が9995 sect 上記に満たない場合はServiceクレジットを返還する

sect 詳細は sect  httpawsamazoncomec2-sla

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

47

AWSセキュリティセンター 13

 日本語のホワイトペーパー bull  セキュリティ概要 bull  リスクとコンプライアンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

48

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

49

最近追加された機能

  VM Import for Linux   IAM EC2 Resource Permissions   リザーブドインスタンスの変更更可能に   SR-‐‑‒IOVネットワークDriverネットワーク性能向上

bull  C3 I2 R3インスタンスで対応

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

50

インスタンスのさらなる追加

  一般的な目的なら M3   Compute Optimizedなら C3   Memory Optimizedなら R3(もうすぐ)   GPUが必要なら G2   IOPS重視なら I2   Disk Based Storage ならHS1

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

51

Intel Processor Features

  m3 c3 cc2 g2 cr1 i2 r3の全てが対応

  AES New Instructions (AES-‐‑‒NI)bull  c1 cg1 m2でも対応

  Advanced Vector Extensions (Intel AVX)bull  HVMでのみ対応

  Turbo Boost Technology

  詳細は httpawsamazoncomec2instance-‐‑‒types

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

52

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

53

故障のための設計 Design for Failure   故障に備えた設計をしておく

  すべてが故障しうると考えシステム全体での保守的設計   SPOF(単一障害点)の排除   障害からの復復旧(対応品質)を重視する

  EC2における故障のための設計   AMIを常にとっておく   EBSスナップショットでバックアップ   複数アベイラビリティゾーンへの分散   ELBでサーバを冗長化Auto Scalingで自動復復帰   Reserved Instanceでキャパシティ保障

  他の冗長性高いサービスとの組み合わせ   S3 SimpleDB RDS他

httpwwwslidesharenetkentamagawaaws-‐‑‒7991623

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

54

定期的なバックアップ

  EC2のAMIを定期的に作成する   (参考) 無停止でAMI取得

Cloudpackさんブログhttpblogcloudpackjp201103aws-‐‑‒news-‐‑‒ec2-‐‑‒instance-‐‑‒no-‐‑‒reboot-‐‑‒amihtml

  データボリュームとしてのEBSの場合EBSのスナップショットを定期的に作成

  スクリプトを書いて定期的なバックアップを行行うことも可能 Coderockさんブログ

httpblogdateofrockcom201003auto-‐‑‒backup-‐‑‒amazon-‐‑‒ebs-‐‑‒with-‐‑‒rubyhtml   サーバーワークスさんブログ

httpblogserverworkscojptech20110721awssdk-‐‑‒for-‐‑‒ruby-‐‑‒create-‐‑‒snapshot

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

55

Instance StorageにSSDを積んだインスタンスが増えてきた

  EC2のタイプによって選択できるInstance Storeは以下の通り

Instance Type Instance Store Volumesm1small 1 x 160 GBdaggerm1medium 1 x 410 GBm1large 2 x 420 GB (840 GB)m1xlarge 4 x 420 GB (1680 GB)m2xlarge 1 x 420 GBm22xlarge 1 x 850 GBm24xlarge 2 x 840 GB (1680 GB)m3medium 1 x 4 GB SSDm3large 1 x 32 GB SSDm3xlarge 2 x 40 GB SSD (80 GB)m32xlarge 2 x 80 GB SSD (160 GB)

t1micro None (use Amazon EBS volumes)

c1medium 1 x 350 GBdaggerc1xlarge 4 x 420 GB (1680 GB)

Instance Type Instance Store Volumes

c3large 2 x 16 GB SSD (32 GB)c3xlarge 2 x 40 GB SSD (80 GB)c32xlarge 2 x 80 GB SSD (160 GB)c34xlarge 2 x 160 GB SSD (320 GB)c38xlarge 2 x 320 GB SSD (640 GB)cc28xlarge 4 x 840 GB (3360 GB)cg14xlarge 2 x 840 GB (1680 GB)cr18xlarge 2 x 120 GB SSD (240 GB)hi14xlarge 2 x 1024 GB SSD (2048 GB)hs18xlarge 24 x 2048 GB (49 TB)i2xlarge 1 x 800 GB SSDi22xlarge 2 x 800 GB SSD (1600 GB)i24xlarge 4 x 800 GB SSD (3200 GB)i28xlarge 8 x 800 GB SSD (6400 GB)

2014年年1月29日時点

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

56

Instance Storageを使うべきなのは

 高IOPS高帯域なストレージが必要な場合

 消えても良良い一次データの置き場として使う場合

 ストレージ冗長化を準備できる場合

S3活かしたいメリット

考慮すべき制約

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

57

EC2へのファイル転送は

  SCPを使う scp pk-‐‑‒XXXpem rootec2-‐‑‒XXXamazonawscomxxx

  Windowsの場合はWinSCPなど   S3経由で共有する

  S3にアップロードしEC2からwgetでアクセスする   FTPを立立ち上げる

  EC2側でFTPサーバーを立立ち上げておく

  高速に送信したい   Tsunami UDP Aspera等のソリューション

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

58

VM Import Export

  複数プラットフォームのVMイメージをAmazon EC2に移行行(インポートエクスポート)可能

httpawstypepadcomaws_japan201012vm-‐‑‒import-‐‑‒bring-‐‑‒your-‐‑‒vmware-‐‑‒images-‐‑‒to-‐‑‒the-‐‑‒cloudhtml

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

59

稼働EC2インスタンスからメタデータ取得

  ami-‐‑‒id   ami-‐‑‒launch-‐‑‒index   ami-‐‑‒manifest-‐‑‒path   block-‐‑‒device-‐‑‒mapping   hostname   instance-‐‑‒action   instance-‐‑‒id   Instance-‐‑‒type   kernel-‐‑‒id

  local-‐‑‒hostname   local-‐‑‒ipv4   mac   network   placement   profile   public-‐‑‒hostname   public-‐‑‒ipv4   public-‐‑‒keys   reservation-‐‑‒id

curl http169254169254latestmeta-‐‑‒data

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

60

起動時にパラメーターを渡す   起動時に16KB以内で任意のものを渡せる

  ChefやPuppetなどを利利用して自己構成できるAMIに   参照emsp AWSマイスターemsp CloudFormation資料料httpwwwslidesharenetkentamagawacloudformation-‐‑‒aws5

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

61

EC2コマンドラインツール amp AWS SDKs

  コマンドラインからEC2のAPIにアクセスできるツール   ツールをインストールしセキュリティ証明書を配置

  AWS SDKs httpawsamazoncomcode

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

62

マネージメントコンソールだけでなくAPIからプログラマブルにアクセス

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1a --instance-type m1small

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1b --instance-type m1small

Tokyo リージョン

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

63

EC2のスケジュールイベント表示機能

  EC2インスタンスが稼働しているハードかソフトにメンテナンスが必要な場合に情報を提供する仕組み

  インスタンスリブートシステムリブートリタイヤ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

64

EC2のステータスチェック機能

  下記の2種類のチェックを自動テストで実行行し情報を提示   システムステータスチェック

  EC2インスタンスにネットワークパケットが通るかチェック   インスタンスステータスチェック

  EC2インスタンスのOSがネットワークパケットを受け取るかチェック

  もし状況に乖離離がある場合はレポートできます

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

65

AWS制限増加申請

  EC2を誤って大量量に作成しないよう最大インスタンス数の上限を20に制限しています

  制限増加申請フォームで各種制限の増加を行行えますbull  httpawsamazoncomjpcontact-‐‑‒usemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

66

既存EBSボリュームのサイズ変更更

  例例 10GB -‐‑‒gt 100GB変更更への流流れ   EBSをデタッチする   EBSからS3にスナップショットを作成する

  新たなボリュームサイズを指定してEBSを作成する

  EBSをアタッチする   マウントしてリサイズする

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

スナップショット

EBS (10GB)

EBS (100GB)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

67

EBSとS3

EBSは複数EC2にアタッチ不不可   単独のEC2インスタンスへのブロックデバイスとしての使い方

  NFSのような使い方をする際はEC2にミドルウェアを導入(GlusterFS等)

S3は複数のEC2からアクセス可   ただしWrite Once Read A Lotな使い方に向いている

  アップロード並列列化も使える   耐久性の設計は99999999999で非常に高い

Copyright copy 2011 Amazon Web Services

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

バケット

EBS

EC2インスタンス

HTTPHTTPS

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

68

EIP使用時の注意点

  グローバルIP(EIP)を用いた場合インターネット経由のアクセスとなり課金発生するケースがある

  名前解決したいサーバに固定IPを付与する13   各サーバは固定グローバルIPを元に

AWSのDNSに名前を問い合わせ13   問い合わせた結果返ってくる外部DNS名でサーバにアクセスを行う13   EC2内部で外部DNS名を使ってアクセスすると プライベートIPアドレスに変換されるため 目的のサーバにプライベートIPでアクセスできる13

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

69

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

70

AWSの課金金の仕組みインターネット

ELB

EC2

EBS

S3

データ転送量量

ELB利利用料料データ処理理量量

インスタンスタイプ別利利用料料

EBSの利利用料料

S3の利利用料料

大半を占める

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

71

Simple Monthly Calculator

  Web上にある計算機を使って概算費用を計算できますsect  httpcalculators3amazonawscomcalc5htmllng=ja_JP

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

72

複数の価格モデル

 課金金モデルが選べるsect 通常の時間課金金のオンデマンドインスタンス

sect ある程度度継続してEC2を使う(1年年3年年)EC2リザーブドインスタンス

sect 入札を利利用してより安く使うEC2スポットインスタンス

rarrマイスターシリーズ RIampスポットインスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

73

AWS無料料試用枠

  AWSでは無料料試用枠を用意していますbull  httpawsamazoncomjpfreeemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

74

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

75

Appendix

  参考資料料bull  Amazon Glacier Developer Guidehttpdocsamazonwebservicescomamazonglacierlatestdevintroductionhtml

bull  Amazon Glacier FAQhttpawsamazoncomjpglacierfaqs

bull  Amazon Glaceir価格httpawsamazoncomjpglacierpricing

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

76

QampA

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 6: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

リージョンとエッジロケーション

カリフォルニアダブリン

シンガポール

東京

オレゴン

バージニア

サンパウロ

リージョン

エッジローケーション

GovCloud

世界8(+2)カ所のリージョン(地域) 36都市51箇所のエッジロケーションemsp を即座に利利用可能

httpawsamazoncomjpabout-‐‑‒awsglobalinfrastructureemsp 

シドニー

北北京

アベイラビリティゾーン(AZ)

bull  各リージョン内に複数のAZ(データセンター群)が存在bull  各AZはお互いに影響を受け難いように地理理的電源的ネットワーク的に分離離して設計

bull  AZ間は高速専用線で接続(リージョン間はインターネットも使用)

典型的Webアーキテクチャ(他のサービスとの組み合わせ)

東京リージョン

AZ-‐‑‒1a AZ-‐‑‒1c

EC2 EC2

RDSマスタ RDSスレーブ自動同期

ELB(ロードバランサ)

Amazon Route 53(ドメイン名割り当て)

静的コンテンツ

S3

CloudFront(コンテンツ 配信)

Virtual Private Cloud (VPC)とEC2

EC2-Classic

Amazon Virtual Private Cloud (VPC)環境

ユーザごとの IPアドレス領域で

インスタンスを利用可

全ユーザで共通の 100008のIPアドレスを使う

現在の標準環境 EC2-VPC

EC2-VPCのDefault VPC

  Default VPCでは 1  172310016が使われる 2  各AZにDefault Subnet (public)が自動作成される 3  選択したAZのDefault Subnetにインスタンスがデプロイされる 4  EC2インスタンスにはPublic IPアドレスがアサインされる

Default VPC (172310016) デフォルトのデプロイ先VPC

Default Subnet AZごとに作成されるデフォルトのデプロイ先サブネット 大きさは20 (4096 IPs)

Public IPアドレス インスタンスに動的割当て されるGlobal IPアドレス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

11

Amazon Elastic Block Store (EBS)

EBSとはEC2に仮想外付けされるブロックレベルのストレージサービス

  サイズは1GB単位で〜~1TBまで   サイズ期間(IO)で課金金される   各EC2インスタンスで複数EBSを使える詳細   データは永続的に保存される   いつでもバックアップ(スナップショット)   スナップショットからEBSを作成可能(他のAZに作成できる)

  Provisioned IOPSでIOパフォーマンス指定bull  2014年年3月時点で最大4000IOPS

  他のEC2インスタンスに付け替え可能

Region

Availability Zone - a

EBS EBS EBS

Availability Zone - b

EBS EBS

Amazon S3

EBSスナップショット

EC2 EC2

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

12

Instance StorageとEBS

EC2

Instance Storage bull  内蔵ディスク bull  EC2と不可分 bull  EC2をStopTerminateするとクリアされる bull  性能容量はインスタンスタイプごとに規定 bull  追加費用なし

EBS bull  ネットワークで接続 bull  EC2とは独立管理 bull  EC2をTerminateしてもEBSは保持可能 bull  Volumeごとに性能容量を定義可能 bull  EBSの費用が発生

物理的には ネットワーク経由

EC2に関連する主要コンポーネントリージョン

アベイラビリティゾーン

Amazon CloudWatch

Auto Scaling

Amazon Elastic Block Storage

(EBS)

Amazon Machine Image (AMI)

Elastic IP

Amazon Virtual Private Cloud

(VPC)

Elastic Load Balancer

Snapshot

Amazon Elastic Compute Cloud

(EC2)

Key Pairs

AWS Management Console

Security Groups

VM ImportExport

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

14

今日のAgenda

 Amazon EC2とは  Amazon EC2の基本

bull  触ってみようbull  基本コンセプト

 Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

15

マネジメントコンソールからログイン

  作成したアカウントのメールアドレスパスワードでログインbull  httpsconsoleawsamazoncomec2home emsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

16

AWSサービスの選択   Webコンソールでコントロールするサービスを選ぶ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

17

リージョン選択   日本にいながら世界中のどのリージョンも選択できる

XXXX

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

18

AMI選択   任意のAMIを選ぶことで好みの環境 (OSミドルウェアアプリデータ) を選択できる

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

19

台数インスタンスタイプアベイラビリティゾーンの指定

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

20

EBSの設定

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

21

Key Pair選択   いわゆる公開鍵方式でサーバーにアクセスする初回時は秘密鍵を手元にダウンロードする

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

22

Security Groups選択

  いわゆるファイアウォールの設定作っておいたグループをサーバーに割り当てる

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

23

起動完了了

  起動完了了画面を確認し起動ウィザードを終了了

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

24

起動したインスタンスの情報確認XXXXX

パブリックDNS名

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

25

ターミナルでアクセス

ログインの際のアカウント名はAMIによって違うので注意 例) Amazon Linux -gt ec2-user その他Linuxの多く -gt root admin等

パブリックDNS名

秘密鍵

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

26

今日のAgenda

 Amazon EC2とは  Amazon EC2の基本

bull  触ってみようbull  基本コンセプト

 Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

27

Amazon Machine Image (AMI)

  AMIはインスタンス作成に使用するイメージテンプレート   AWS公式AMIやサードパーティもAMIを提供

bull  httpsawsamazoncomamisbull  httpsawsamazoncommarketplaceemsp 

  選択したAMIから起動する   EC2インスタンスから任意のタイミングでカスタムAMIを作成できる

launch

Amazon Machine Image (AMI)

Amazon EC2インスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

28

AMIとインスタンスAZの関係

インスタンス

Amazon S3

AMI

Availability Zone-1a Availability Zone-1b

カスタム AMI

AMIからインスタンスを起動

カスタムAMIを使ってインスタンスを複数台起動

カスタムAMIを作成必要に応じて共有設定

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

29

AMIの取得AMIからの起動

Copyright copy 2011 Amazon Web Services

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

30

EC2インスタンスのライフサイクル   起動したインスタンスは3つの状態を持つ

bull  Running 実行行中課金金されるbull  Stopped 停止中課金金されないbull  Terminated 終了了StopStartはできない

Running

Terminated

Stopped

StartStop

Terminate

launch

Terminate

Amazon Machine Image (AMI)

Amazon EC2インスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

31

EC2インスタンスの停止と終了了

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

32

EC2インスタンスのタイプ変更Stop(停止)しているといつでもタイプ(スペック)を変更更できる

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

33

EBSボリュームのアタッチ

Copyright copy 2011 Amazon Web Services

EC2インスタンスと同じゾーンに作ることを注意 スナップショットから複製も可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

34

EC2インスタンスのアドレス

  全てのインスタンスが下記を持つsect  Private IPアドレス(VPC内のサブネットから割り当てる)sect  Private DNS名(internal)sect  Public DNS名 (amazonawscom)

  public IPアドレスをオプションで付けられる   固定されたPublic IP Addresses はEIPと呼ぶ

sect  稼働しているEC2インスタンスに瞬時に付け外しが可能sect  インスタンスにアサインしているときは料料金金はかからない

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

35

EIPの割り当て

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

36

EIPの使いどころ

  通常のケースはEIPは必要なくEC2のPublic DNS名を用いてCNAMEで名前変換を行行う

  Route 53(名前解決サービス)でPublic DNSを用いる

  固定IPアドレスが必要なときに限りEIPを用いる   メールサーバー監視サーバー等

  メールサーバの送信制限解除逆引き申請が必要な場合は下記から申請を行行うhttpsaws-‐‑‒portalamazoncomgpawshtml-‐‑‒forms-‐‑‒controllercontactusec2-‐‑‒email-‐‑‒limit-‐‑‒rdns-‐‑‒request

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

37

リージョン間コピー(AMIEBS)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

38

Amazon EC2の関連サービス関連情報   監視負荷分散自動スケール

rarrCloudWatchELBAutoScaling   閉域網での利利用仮想ネットワーキング

rarrAmazon VPC (Virtual Private Cloud)   ① 社内ネットワークからVPN接続   ② ルーティングイントラIPアドレス仮想NIC等々

  占有サーバ rarrAmazon Dedicated Instance   専用線接続 rarrAmazon Direct Connect   Windowsemsp emsp  rarrWindowsインスタンス   スパコンrarrHPCインスタンス   アクセス管理理emsp  rarrIAM (Identity and Access Management)   料料金金関係emsp  rarrConsolidated Billing資料料集emsp httpawsamazoncomjpaws-‐‑‒meister

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

39

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

40

AWSのセキュリティの考え方

第三者認証

SOC 1SSAE 16ISAE 3402 ISO 27001 PCI DSS HIPAA ITAR

FISMA Moderate FIPS 140-2 ファシリティ

DC電源ネットワーク冗長化

Your Apps

Webサイトアプリケーションこれまでと同様のセキュリティを

お客様SI様で実現可能

インフラよりハイレベルの

セキュリティをAWSが提供

シェアードレスポンシビリティモデル(責任共有モデル)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

41

EC2の責任共有モデル

物理インタフェース

ファイアウォール

      ハイバーバイザー

Sm

all

Larg

e

hellip

Sm

all Amazon EC2

インスタンス

物理ホスト

ユーザーが 責任を持って 管理する

AWSが 責任を持って 管理する

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

42

ファイアウォールを実現するSecurity Group

  インスタンスのINOUTトラフィックを制限するファイアウォール機能

  デフォルトIN向けは全トラフィック閉

  必要な受信アクセスに対してアクセスルールを定義する

bull  プロトコル( TCPUDP)bull  宛先ポートbull  アクセス元IP Security Group

  ルールをひとまとめにしたテンプレートを Security Groupと呼ぶ

EC2 インスタンス

ポート22(SSH)

ポート80(HTTP)

EC2ファイアウォール

Security Group

ポート25(SMTP)

ポート22(SSH)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

43

Security Groupの使い方   インスタンスの用途に応じたSecurity Groupを用意する

bull  Webサーバ用DBサーバ用メールサーバ用等   アクセス元にSecurity Groupも設定して限定可能

Webサーバ

Webサーバ

DBサーバ

sg-1234

22 00000 80 00000 25 sg-1234

sg-1234

sg-1234

sg-abcd sg-abcd

22 00000 3306 sg-1234

Webサーバ

sg-xyz

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

44

セキュリティ証明書

仮想サーバ(Amazon EC2)Windows( スタンダード)

コマンドライン SDK利利用

SSH公開鍵認証

仮想デスクトップ

ターミナル

REST SOAPAPI

Webコンソール

①EC2インスタンスへのアクセスrarr鍵認証

②Webコンソールへのアクセス

rarrパスワード認証 多要素認証 IAM

③APIへのアクセスrarrアクセスキー X509証明書 IAM

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

45

Key Pair(キーペア)を用いた鍵認証   鍵認証はユーザ名パスワードの認証よりも安全な認証方式

ダウンロードされた秘密鍵

①キーペア作成

②インスタンス起動時にemsp emsp emsp 公開鍵をコピー

公開鍵

③公開鍵秘密鍵のペアが合致するとログイン可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

46

EC2のSLA13

sect  EC2の可用性が9995 sect 上記に満たない場合はServiceクレジットを返還する

sect 詳細は sect  httpawsamazoncomec2-sla

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

47

AWSセキュリティセンター 13

 日本語のホワイトペーパー bull  セキュリティ概要 bull  リスクとコンプライアンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

48

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

49

最近追加された機能

  VM Import for Linux   IAM EC2 Resource Permissions   リザーブドインスタンスの変更更可能に   SR-‐‑‒IOVネットワークDriverネットワーク性能向上

bull  C3 I2 R3インスタンスで対応

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

50

インスタンスのさらなる追加

  一般的な目的なら M3   Compute Optimizedなら C3   Memory Optimizedなら R3(もうすぐ)   GPUが必要なら G2   IOPS重視なら I2   Disk Based Storage ならHS1

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

51

Intel Processor Features

  m3 c3 cc2 g2 cr1 i2 r3の全てが対応

  AES New Instructions (AES-‐‑‒NI)bull  c1 cg1 m2でも対応

  Advanced Vector Extensions (Intel AVX)bull  HVMでのみ対応

  Turbo Boost Technology

  詳細は httpawsamazoncomec2instance-‐‑‒types

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

52

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

53

故障のための設計 Design for Failure   故障に備えた設計をしておく

  すべてが故障しうると考えシステム全体での保守的設計   SPOF(単一障害点)の排除   障害からの復復旧(対応品質)を重視する

  EC2における故障のための設計   AMIを常にとっておく   EBSスナップショットでバックアップ   複数アベイラビリティゾーンへの分散   ELBでサーバを冗長化Auto Scalingで自動復復帰   Reserved Instanceでキャパシティ保障

  他の冗長性高いサービスとの組み合わせ   S3 SimpleDB RDS他

httpwwwslidesharenetkentamagawaaws-‐‑‒7991623

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

54

定期的なバックアップ

  EC2のAMIを定期的に作成する   (参考) 無停止でAMI取得

Cloudpackさんブログhttpblogcloudpackjp201103aws-‐‑‒news-‐‑‒ec2-‐‑‒instance-‐‑‒no-‐‑‒reboot-‐‑‒amihtml

  データボリュームとしてのEBSの場合EBSのスナップショットを定期的に作成

  スクリプトを書いて定期的なバックアップを行行うことも可能 Coderockさんブログ

httpblogdateofrockcom201003auto-‐‑‒backup-‐‑‒amazon-‐‑‒ebs-‐‑‒with-‐‑‒rubyhtml   サーバーワークスさんブログ

httpblogserverworkscojptech20110721awssdk-‐‑‒for-‐‑‒ruby-‐‑‒create-‐‑‒snapshot

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

55

Instance StorageにSSDを積んだインスタンスが増えてきた

  EC2のタイプによって選択できるInstance Storeは以下の通り

Instance Type Instance Store Volumesm1small 1 x 160 GBdaggerm1medium 1 x 410 GBm1large 2 x 420 GB (840 GB)m1xlarge 4 x 420 GB (1680 GB)m2xlarge 1 x 420 GBm22xlarge 1 x 850 GBm24xlarge 2 x 840 GB (1680 GB)m3medium 1 x 4 GB SSDm3large 1 x 32 GB SSDm3xlarge 2 x 40 GB SSD (80 GB)m32xlarge 2 x 80 GB SSD (160 GB)

t1micro None (use Amazon EBS volumes)

c1medium 1 x 350 GBdaggerc1xlarge 4 x 420 GB (1680 GB)

Instance Type Instance Store Volumes

c3large 2 x 16 GB SSD (32 GB)c3xlarge 2 x 40 GB SSD (80 GB)c32xlarge 2 x 80 GB SSD (160 GB)c34xlarge 2 x 160 GB SSD (320 GB)c38xlarge 2 x 320 GB SSD (640 GB)cc28xlarge 4 x 840 GB (3360 GB)cg14xlarge 2 x 840 GB (1680 GB)cr18xlarge 2 x 120 GB SSD (240 GB)hi14xlarge 2 x 1024 GB SSD (2048 GB)hs18xlarge 24 x 2048 GB (49 TB)i2xlarge 1 x 800 GB SSDi22xlarge 2 x 800 GB SSD (1600 GB)i24xlarge 4 x 800 GB SSD (3200 GB)i28xlarge 8 x 800 GB SSD (6400 GB)

2014年年1月29日時点

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

56

Instance Storageを使うべきなのは

 高IOPS高帯域なストレージが必要な場合

 消えても良良い一次データの置き場として使う場合

 ストレージ冗長化を準備できる場合

S3活かしたいメリット

考慮すべき制約

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

57

EC2へのファイル転送は

  SCPを使う scp pk-‐‑‒XXXpem rootec2-‐‑‒XXXamazonawscomxxx

  Windowsの場合はWinSCPなど   S3経由で共有する

  S3にアップロードしEC2からwgetでアクセスする   FTPを立立ち上げる

  EC2側でFTPサーバーを立立ち上げておく

  高速に送信したい   Tsunami UDP Aspera等のソリューション

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

58

VM Import Export

  複数プラットフォームのVMイメージをAmazon EC2に移行行(インポートエクスポート)可能

httpawstypepadcomaws_japan201012vm-‐‑‒import-‐‑‒bring-‐‑‒your-‐‑‒vmware-‐‑‒images-‐‑‒to-‐‑‒the-‐‑‒cloudhtml

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

59

稼働EC2インスタンスからメタデータ取得

  ami-‐‑‒id   ami-‐‑‒launch-‐‑‒index   ami-‐‑‒manifest-‐‑‒path   block-‐‑‒device-‐‑‒mapping   hostname   instance-‐‑‒action   instance-‐‑‒id   Instance-‐‑‒type   kernel-‐‑‒id

  local-‐‑‒hostname   local-‐‑‒ipv4   mac   network   placement   profile   public-‐‑‒hostname   public-‐‑‒ipv4   public-‐‑‒keys   reservation-‐‑‒id

curl http169254169254latestmeta-‐‑‒data

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

60

起動時にパラメーターを渡す   起動時に16KB以内で任意のものを渡せる

  ChefやPuppetなどを利利用して自己構成できるAMIに   参照emsp AWSマイスターemsp CloudFormation資料料httpwwwslidesharenetkentamagawacloudformation-‐‑‒aws5

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

61

EC2コマンドラインツール amp AWS SDKs

  コマンドラインからEC2のAPIにアクセスできるツール   ツールをインストールしセキュリティ証明書を配置

  AWS SDKs httpawsamazoncomcode

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

62

マネージメントコンソールだけでなくAPIからプログラマブルにアクセス

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1a --instance-type m1small

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1b --instance-type m1small

Tokyo リージョン

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

63

EC2のスケジュールイベント表示機能

  EC2インスタンスが稼働しているハードかソフトにメンテナンスが必要な場合に情報を提供する仕組み

  インスタンスリブートシステムリブートリタイヤ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

64

EC2のステータスチェック機能

  下記の2種類のチェックを自動テストで実行行し情報を提示   システムステータスチェック

  EC2インスタンスにネットワークパケットが通るかチェック   インスタンスステータスチェック

  EC2インスタンスのOSがネットワークパケットを受け取るかチェック

  もし状況に乖離離がある場合はレポートできます

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

65

AWS制限増加申請

  EC2を誤って大量量に作成しないよう最大インスタンス数の上限を20に制限しています

  制限増加申請フォームで各種制限の増加を行行えますbull  httpawsamazoncomjpcontact-‐‑‒usemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

66

既存EBSボリュームのサイズ変更更

  例例 10GB -‐‑‒gt 100GB変更更への流流れ   EBSをデタッチする   EBSからS3にスナップショットを作成する

  新たなボリュームサイズを指定してEBSを作成する

  EBSをアタッチする   マウントしてリサイズする

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

スナップショット

EBS (10GB)

EBS (100GB)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

67

EBSとS3

EBSは複数EC2にアタッチ不不可   単独のEC2インスタンスへのブロックデバイスとしての使い方

  NFSのような使い方をする際はEC2にミドルウェアを導入(GlusterFS等)

S3は複数のEC2からアクセス可   ただしWrite Once Read A Lotな使い方に向いている

  アップロード並列列化も使える   耐久性の設計は99999999999で非常に高い

Copyright copy 2011 Amazon Web Services

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

バケット

EBS

EC2インスタンス

HTTPHTTPS

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

68

EIP使用時の注意点

  グローバルIP(EIP)を用いた場合インターネット経由のアクセスとなり課金発生するケースがある

  名前解決したいサーバに固定IPを付与する13   各サーバは固定グローバルIPを元に

AWSのDNSに名前を問い合わせ13   問い合わせた結果返ってくる外部DNS名でサーバにアクセスを行う13   EC2内部で外部DNS名を使ってアクセスすると プライベートIPアドレスに変換されるため 目的のサーバにプライベートIPでアクセスできる13

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

69

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

70

AWSの課金金の仕組みインターネット

ELB

EC2

EBS

S3

データ転送量量

ELB利利用料料データ処理理量量

インスタンスタイプ別利利用料料

EBSの利利用料料

S3の利利用料料

大半を占める

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

71

Simple Monthly Calculator

  Web上にある計算機を使って概算費用を計算できますsect  httpcalculators3amazonawscomcalc5htmllng=ja_JP

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

72

複数の価格モデル

 課金金モデルが選べるsect 通常の時間課金金のオンデマンドインスタンス

sect ある程度度継続してEC2を使う(1年年3年年)EC2リザーブドインスタンス

sect 入札を利利用してより安く使うEC2スポットインスタンス

rarrマイスターシリーズ RIampスポットインスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

73

AWS無料料試用枠

  AWSでは無料料試用枠を用意していますbull  httpawsamazoncomjpfreeemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

74

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

75

Appendix

  参考資料料bull  Amazon Glacier Developer Guidehttpdocsamazonwebservicescomamazonglacierlatestdevintroductionhtml

bull  Amazon Glacier FAQhttpawsamazoncomjpglacierfaqs

bull  Amazon Glaceir価格httpawsamazoncomjpglacierpricing

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

76

QampA

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 7: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

アベイラビリティゾーン(AZ)

bull  各リージョン内に複数のAZ(データセンター群)が存在bull  各AZはお互いに影響を受け難いように地理理的電源的ネットワーク的に分離離して設計

bull  AZ間は高速専用線で接続(リージョン間はインターネットも使用)

典型的Webアーキテクチャ(他のサービスとの組み合わせ)

東京リージョン

AZ-‐‑‒1a AZ-‐‑‒1c

EC2 EC2

RDSマスタ RDSスレーブ自動同期

ELB(ロードバランサ)

Amazon Route 53(ドメイン名割り当て)

静的コンテンツ

S3

CloudFront(コンテンツ 配信)

Virtual Private Cloud (VPC)とEC2

EC2-Classic

Amazon Virtual Private Cloud (VPC)環境

ユーザごとの IPアドレス領域で

インスタンスを利用可

全ユーザで共通の 100008のIPアドレスを使う

現在の標準環境 EC2-VPC

EC2-VPCのDefault VPC

  Default VPCでは 1  172310016が使われる 2  各AZにDefault Subnet (public)が自動作成される 3  選択したAZのDefault Subnetにインスタンスがデプロイされる 4  EC2インスタンスにはPublic IPアドレスがアサインされる

Default VPC (172310016) デフォルトのデプロイ先VPC

Default Subnet AZごとに作成されるデフォルトのデプロイ先サブネット 大きさは20 (4096 IPs)

Public IPアドレス インスタンスに動的割当て されるGlobal IPアドレス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

11

Amazon Elastic Block Store (EBS)

EBSとはEC2に仮想外付けされるブロックレベルのストレージサービス

  サイズは1GB単位で〜~1TBまで   サイズ期間(IO)で課金金される   各EC2インスタンスで複数EBSを使える詳細   データは永続的に保存される   いつでもバックアップ(スナップショット)   スナップショットからEBSを作成可能(他のAZに作成できる)

  Provisioned IOPSでIOパフォーマンス指定bull  2014年年3月時点で最大4000IOPS

  他のEC2インスタンスに付け替え可能

Region

Availability Zone - a

EBS EBS EBS

Availability Zone - b

EBS EBS

Amazon S3

EBSスナップショット

EC2 EC2

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

12

Instance StorageとEBS

EC2

Instance Storage bull  内蔵ディスク bull  EC2と不可分 bull  EC2をStopTerminateするとクリアされる bull  性能容量はインスタンスタイプごとに規定 bull  追加費用なし

EBS bull  ネットワークで接続 bull  EC2とは独立管理 bull  EC2をTerminateしてもEBSは保持可能 bull  Volumeごとに性能容量を定義可能 bull  EBSの費用が発生

物理的には ネットワーク経由

EC2に関連する主要コンポーネントリージョン

アベイラビリティゾーン

Amazon CloudWatch

Auto Scaling

Amazon Elastic Block Storage

(EBS)

Amazon Machine Image (AMI)

Elastic IP

Amazon Virtual Private Cloud

(VPC)

Elastic Load Balancer

Snapshot

Amazon Elastic Compute Cloud

(EC2)

Key Pairs

AWS Management Console

Security Groups

VM ImportExport

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

14

今日のAgenda

 Amazon EC2とは  Amazon EC2の基本

bull  触ってみようbull  基本コンセプト

 Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

15

マネジメントコンソールからログイン

  作成したアカウントのメールアドレスパスワードでログインbull  httpsconsoleawsamazoncomec2home emsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

16

AWSサービスの選択   Webコンソールでコントロールするサービスを選ぶ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

17

リージョン選択   日本にいながら世界中のどのリージョンも選択できる

XXXX

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

18

AMI選択   任意のAMIを選ぶことで好みの環境 (OSミドルウェアアプリデータ) を選択できる

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

19

台数インスタンスタイプアベイラビリティゾーンの指定

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

20

EBSの設定

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

21

Key Pair選択   いわゆる公開鍵方式でサーバーにアクセスする初回時は秘密鍵を手元にダウンロードする

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

22

Security Groups選択

  いわゆるファイアウォールの設定作っておいたグループをサーバーに割り当てる

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

23

起動完了了

  起動完了了画面を確認し起動ウィザードを終了了

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

24

起動したインスタンスの情報確認XXXXX

パブリックDNS名

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

25

ターミナルでアクセス

ログインの際のアカウント名はAMIによって違うので注意 例) Amazon Linux -gt ec2-user その他Linuxの多く -gt root admin等

パブリックDNS名

秘密鍵

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

26

今日のAgenda

 Amazon EC2とは  Amazon EC2の基本

bull  触ってみようbull  基本コンセプト

 Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

27

Amazon Machine Image (AMI)

  AMIはインスタンス作成に使用するイメージテンプレート   AWS公式AMIやサードパーティもAMIを提供

bull  httpsawsamazoncomamisbull  httpsawsamazoncommarketplaceemsp 

  選択したAMIから起動する   EC2インスタンスから任意のタイミングでカスタムAMIを作成できる

launch

Amazon Machine Image (AMI)

Amazon EC2インスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

28

AMIとインスタンスAZの関係

インスタンス

Amazon S3

AMI

Availability Zone-1a Availability Zone-1b

カスタム AMI

AMIからインスタンスを起動

カスタムAMIを使ってインスタンスを複数台起動

カスタムAMIを作成必要に応じて共有設定

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

29

AMIの取得AMIからの起動

Copyright copy 2011 Amazon Web Services

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

30

EC2インスタンスのライフサイクル   起動したインスタンスは3つの状態を持つ

bull  Running 実行行中課金金されるbull  Stopped 停止中課金金されないbull  Terminated 終了了StopStartはできない

Running

Terminated

Stopped

StartStop

Terminate

launch

Terminate

Amazon Machine Image (AMI)

Amazon EC2インスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

31

EC2インスタンスの停止と終了了

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

32

EC2インスタンスのタイプ変更Stop(停止)しているといつでもタイプ(スペック)を変更更できる

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

33

EBSボリュームのアタッチ

Copyright copy 2011 Amazon Web Services

EC2インスタンスと同じゾーンに作ることを注意 スナップショットから複製も可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

34

EC2インスタンスのアドレス

  全てのインスタンスが下記を持つsect  Private IPアドレス(VPC内のサブネットから割り当てる)sect  Private DNS名(internal)sect  Public DNS名 (amazonawscom)

  public IPアドレスをオプションで付けられる   固定されたPublic IP Addresses はEIPと呼ぶ

sect  稼働しているEC2インスタンスに瞬時に付け外しが可能sect  インスタンスにアサインしているときは料料金金はかからない

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

35

EIPの割り当て

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

36

EIPの使いどころ

  通常のケースはEIPは必要なくEC2のPublic DNS名を用いてCNAMEで名前変換を行行う

  Route 53(名前解決サービス)でPublic DNSを用いる

  固定IPアドレスが必要なときに限りEIPを用いる   メールサーバー監視サーバー等

  メールサーバの送信制限解除逆引き申請が必要な場合は下記から申請を行行うhttpsaws-‐‑‒portalamazoncomgpawshtml-‐‑‒forms-‐‑‒controllercontactusec2-‐‑‒email-‐‑‒limit-‐‑‒rdns-‐‑‒request

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

37

リージョン間コピー(AMIEBS)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

38

Amazon EC2の関連サービス関連情報   監視負荷分散自動スケール

rarrCloudWatchELBAutoScaling   閉域網での利利用仮想ネットワーキング

rarrAmazon VPC (Virtual Private Cloud)   ① 社内ネットワークからVPN接続   ② ルーティングイントラIPアドレス仮想NIC等々

  占有サーバ rarrAmazon Dedicated Instance   専用線接続 rarrAmazon Direct Connect   Windowsemsp emsp  rarrWindowsインスタンス   スパコンrarrHPCインスタンス   アクセス管理理emsp  rarrIAM (Identity and Access Management)   料料金金関係emsp  rarrConsolidated Billing資料料集emsp httpawsamazoncomjpaws-‐‑‒meister

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

39

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

40

AWSのセキュリティの考え方

第三者認証

SOC 1SSAE 16ISAE 3402 ISO 27001 PCI DSS HIPAA ITAR

FISMA Moderate FIPS 140-2 ファシリティ

DC電源ネットワーク冗長化

Your Apps

Webサイトアプリケーションこれまでと同様のセキュリティを

お客様SI様で実現可能

インフラよりハイレベルの

セキュリティをAWSが提供

シェアードレスポンシビリティモデル(責任共有モデル)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

41

EC2の責任共有モデル

物理インタフェース

ファイアウォール

      ハイバーバイザー

Sm

all

Larg

e

hellip

Sm

all Amazon EC2

インスタンス

物理ホスト

ユーザーが 責任を持って 管理する

AWSが 責任を持って 管理する

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

42

ファイアウォールを実現するSecurity Group

  インスタンスのINOUTトラフィックを制限するファイアウォール機能

  デフォルトIN向けは全トラフィック閉

  必要な受信アクセスに対してアクセスルールを定義する

bull  プロトコル( TCPUDP)bull  宛先ポートbull  アクセス元IP Security Group

  ルールをひとまとめにしたテンプレートを Security Groupと呼ぶ

EC2 インスタンス

ポート22(SSH)

ポート80(HTTP)

EC2ファイアウォール

Security Group

ポート25(SMTP)

ポート22(SSH)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

43

Security Groupの使い方   インスタンスの用途に応じたSecurity Groupを用意する

bull  Webサーバ用DBサーバ用メールサーバ用等   アクセス元にSecurity Groupも設定して限定可能

Webサーバ

Webサーバ

DBサーバ

sg-1234

22 00000 80 00000 25 sg-1234

sg-1234

sg-1234

sg-abcd sg-abcd

22 00000 3306 sg-1234

Webサーバ

sg-xyz

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

44

セキュリティ証明書

仮想サーバ(Amazon EC2)Windows( スタンダード)

コマンドライン SDK利利用

SSH公開鍵認証

仮想デスクトップ

ターミナル

REST SOAPAPI

Webコンソール

①EC2インスタンスへのアクセスrarr鍵認証

②Webコンソールへのアクセス

rarrパスワード認証 多要素認証 IAM

③APIへのアクセスrarrアクセスキー X509証明書 IAM

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

45

Key Pair(キーペア)を用いた鍵認証   鍵認証はユーザ名パスワードの認証よりも安全な認証方式

ダウンロードされた秘密鍵

①キーペア作成

②インスタンス起動時にemsp emsp emsp 公開鍵をコピー

公開鍵

③公開鍵秘密鍵のペアが合致するとログイン可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

46

EC2のSLA13

sect  EC2の可用性が9995 sect 上記に満たない場合はServiceクレジットを返還する

sect 詳細は sect  httpawsamazoncomec2-sla

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

47

AWSセキュリティセンター 13

 日本語のホワイトペーパー bull  セキュリティ概要 bull  リスクとコンプライアンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

48

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

49

最近追加された機能

  VM Import for Linux   IAM EC2 Resource Permissions   リザーブドインスタンスの変更更可能に   SR-‐‑‒IOVネットワークDriverネットワーク性能向上

bull  C3 I2 R3インスタンスで対応

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

50

インスタンスのさらなる追加

  一般的な目的なら M3   Compute Optimizedなら C3   Memory Optimizedなら R3(もうすぐ)   GPUが必要なら G2   IOPS重視なら I2   Disk Based Storage ならHS1

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

51

Intel Processor Features

  m3 c3 cc2 g2 cr1 i2 r3の全てが対応

  AES New Instructions (AES-‐‑‒NI)bull  c1 cg1 m2でも対応

  Advanced Vector Extensions (Intel AVX)bull  HVMでのみ対応

  Turbo Boost Technology

  詳細は httpawsamazoncomec2instance-‐‑‒types

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

52

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

53

故障のための設計 Design for Failure   故障に備えた設計をしておく

  すべてが故障しうると考えシステム全体での保守的設計   SPOF(単一障害点)の排除   障害からの復復旧(対応品質)を重視する

  EC2における故障のための設計   AMIを常にとっておく   EBSスナップショットでバックアップ   複数アベイラビリティゾーンへの分散   ELBでサーバを冗長化Auto Scalingで自動復復帰   Reserved Instanceでキャパシティ保障

  他の冗長性高いサービスとの組み合わせ   S3 SimpleDB RDS他

httpwwwslidesharenetkentamagawaaws-‐‑‒7991623

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

54

定期的なバックアップ

  EC2のAMIを定期的に作成する   (参考) 無停止でAMI取得

Cloudpackさんブログhttpblogcloudpackjp201103aws-‐‑‒news-‐‑‒ec2-‐‑‒instance-‐‑‒no-‐‑‒reboot-‐‑‒amihtml

  データボリュームとしてのEBSの場合EBSのスナップショットを定期的に作成

  スクリプトを書いて定期的なバックアップを行行うことも可能 Coderockさんブログ

httpblogdateofrockcom201003auto-‐‑‒backup-‐‑‒amazon-‐‑‒ebs-‐‑‒with-‐‑‒rubyhtml   サーバーワークスさんブログ

httpblogserverworkscojptech20110721awssdk-‐‑‒for-‐‑‒ruby-‐‑‒create-‐‑‒snapshot

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

55

Instance StorageにSSDを積んだインスタンスが増えてきた

  EC2のタイプによって選択できるInstance Storeは以下の通り

Instance Type Instance Store Volumesm1small 1 x 160 GBdaggerm1medium 1 x 410 GBm1large 2 x 420 GB (840 GB)m1xlarge 4 x 420 GB (1680 GB)m2xlarge 1 x 420 GBm22xlarge 1 x 850 GBm24xlarge 2 x 840 GB (1680 GB)m3medium 1 x 4 GB SSDm3large 1 x 32 GB SSDm3xlarge 2 x 40 GB SSD (80 GB)m32xlarge 2 x 80 GB SSD (160 GB)

t1micro None (use Amazon EBS volumes)

c1medium 1 x 350 GBdaggerc1xlarge 4 x 420 GB (1680 GB)

Instance Type Instance Store Volumes

c3large 2 x 16 GB SSD (32 GB)c3xlarge 2 x 40 GB SSD (80 GB)c32xlarge 2 x 80 GB SSD (160 GB)c34xlarge 2 x 160 GB SSD (320 GB)c38xlarge 2 x 320 GB SSD (640 GB)cc28xlarge 4 x 840 GB (3360 GB)cg14xlarge 2 x 840 GB (1680 GB)cr18xlarge 2 x 120 GB SSD (240 GB)hi14xlarge 2 x 1024 GB SSD (2048 GB)hs18xlarge 24 x 2048 GB (49 TB)i2xlarge 1 x 800 GB SSDi22xlarge 2 x 800 GB SSD (1600 GB)i24xlarge 4 x 800 GB SSD (3200 GB)i28xlarge 8 x 800 GB SSD (6400 GB)

2014年年1月29日時点

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

56

Instance Storageを使うべきなのは

 高IOPS高帯域なストレージが必要な場合

 消えても良良い一次データの置き場として使う場合

 ストレージ冗長化を準備できる場合

S3活かしたいメリット

考慮すべき制約

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

57

EC2へのファイル転送は

  SCPを使う scp pk-‐‑‒XXXpem rootec2-‐‑‒XXXamazonawscomxxx

  Windowsの場合はWinSCPなど   S3経由で共有する

  S3にアップロードしEC2からwgetでアクセスする   FTPを立立ち上げる

  EC2側でFTPサーバーを立立ち上げておく

  高速に送信したい   Tsunami UDP Aspera等のソリューション

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

58

VM Import Export

  複数プラットフォームのVMイメージをAmazon EC2に移行行(インポートエクスポート)可能

httpawstypepadcomaws_japan201012vm-‐‑‒import-‐‑‒bring-‐‑‒your-‐‑‒vmware-‐‑‒images-‐‑‒to-‐‑‒the-‐‑‒cloudhtml

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

59

稼働EC2インスタンスからメタデータ取得

  ami-‐‑‒id   ami-‐‑‒launch-‐‑‒index   ami-‐‑‒manifest-‐‑‒path   block-‐‑‒device-‐‑‒mapping   hostname   instance-‐‑‒action   instance-‐‑‒id   Instance-‐‑‒type   kernel-‐‑‒id

  local-‐‑‒hostname   local-‐‑‒ipv4   mac   network   placement   profile   public-‐‑‒hostname   public-‐‑‒ipv4   public-‐‑‒keys   reservation-‐‑‒id

curl http169254169254latestmeta-‐‑‒data

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

60

起動時にパラメーターを渡す   起動時に16KB以内で任意のものを渡せる

  ChefやPuppetなどを利利用して自己構成できるAMIに   参照emsp AWSマイスターemsp CloudFormation資料料httpwwwslidesharenetkentamagawacloudformation-‐‑‒aws5

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

61

EC2コマンドラインツール amp AWS SDKs

  コマンドラインからEC2のAPIにアクセスできるツール   ツールをインストールしセキュリティ証明書を配置

  AWS SDKs httpawsamazoncomcode

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

62

マネージメントコンソールだけでなくAPIからプログラマブルにアクセス

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1a --instance-type m1small

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1b --instance-type m1small

Tokyo リージョン

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

63

EC2のスケジュールイベント表示機能

  EC2インスタンスが稼働しているハードかソフトにメンテナンスが必要な場合に情報を提供する仕組み

  インスタンスリブートシステムリブートリタイヤ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

64

EC2のステータスチェック機能

  下記の2種類のチェックを自動テストで実行行し情報を提示   システムステータスチェック

  EC2インスタンスにネットワークパケットが通るかチェック   インスタンスステータスチェック

  EC2インスタンスのOSがネットワークパケットを受け取るかチェック

  もし状況に乖離離がある場合はレポートできます

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

65

AWS制限増加申請

  EC2を誤って大量量に作成しないよう最大インスタンス数の上限を20に制限しています

  制限増加申請フォームで各種制限の増加を行行えますbull  httpawsamazoncomjpcontact-‐‑‒usemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

66

既存EBSボリュームのサイズ変更更

  例例 10GB -‐‑‒gt 100GB変更更への流流れ   EBSをデタッチする   EBSからS3にスナップショットを作成する

  新たなボリュームサイズを指定してEBSを作成する

  EBSをアタッチする   マウントしてリサイズする

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

スナップショット

EBS (10GB)

EBS (100GB)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

67

EBSとS3

EBSは複数EC2にアタッチ不不可   単独のEC2インスタンスへのブロックデバイスとしての使い方

  NFSのような使い方をする際はEC2にミドルウェアを導入(GlusterFS等)

S3は複数のEC2からアクセス可   ただしWrite Once Read A Lotな使い方に向いている

  アップロード並列列化も使える   耐久性の設計は99999999999で非常に高い

Copyright copy 2011 Amazon Web Services

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

バケット

EBS

EC2インスタンス

HTTPHTTPS

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

68

EIP使用時の注意点

  グローバルIP(EIP)を用いた場合インターネット経由のアクセスとなり課金発生するケースがある

  名前解決したいサーバに固定IPを付与する13   各サーバは固定グローバルIPを元に

AWSのDNSに名前を問い合わせ13   問い合わせた結果返ってくる外部DNS名でサーバにアクセスを行う13   EC2内部で外部DNS名を使ってアクセスすると プライベートIPアドレスに変換されるため 目的のサーバにプライベートIPでアクセスできる13

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

69

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

70

AWSの課金金の仕組みインターネット

ELB

EC2

EBS

S3

データ転送量量

ELB利利用料料データ処理理量量

インスタンスタイプ別利利用料料

EBSの利利用料料

S3の利利用料料

大半を占める

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

71

Simple Monthly Calculator

  Web上にある計算機を使って概算費用を計算できますsect  httpcalculators3amazonawscomcalc5htmllng=ja_JP

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

72

複数の価格モデル

 課金金モデルが選べるsect 通常の時間課金金のオンデマンドインスタンス

sect ある程度度継続してEC2を使う(1年年3年年)EC2リザーブドインスタンス

sect 入札を利利用してより安く使うEC2スポットインスタンス

rarrマイスターシリーズ RIampスポットインスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

73

AWS無料料試用枠

  AWSでは無料料試用枠を用意していますbull  httpawsamazoncomjpfreeemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

74

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

75

Appendix

  参考資料料bull  Amazon Glacier Developer Guidehttpdocsamazonwebservicescomamazonglacierlatestdevintroductionhtml

bull  Amazon Glacier FAQhttpawsamazoncomjpglacierfaqs

bull  Amazon Glaceir価格httpawsamazoncomjpglacierpricing

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

76

QampA

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 8: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

典型的Webアーキテクチャ(他のサービスとの組み合わせ)

東京リージョン

AZ-‐‑‒1a AZ-‐‑‒1c

EC2 EC2

RDSマスタ RDSスレーブ自動同期

ELB(ロードバランサ)

Amazon Route 53(ドメイン名割り当て)

静的コンテンツ

S3

CloudFront(コンテンツ 配信)

Virtual Private Cloud (VPC)とEC2

EC2-Classic

Amazon Virtual Private Cloud (VPC)環境

ユーザごとの IPアドレス領域で

インスタンスを利用可

全ユーザで共通の 100008のIPアドレスを使う

現在の標準環境 EC2-VPC

EC2-VPCのDefault VPC

  Default VPCでは 1  172310016が使われる 2  各AZにDefault Subnet (public)が自動作成される 3  選択したAZのDefault Subnetにインスタンスがデプロイされる 4  EC2インスタンスにはPublic IPアドレスがアサインされる

Default VPC (172310016) デフォルトのデプロイ先VPC

Default Subnet AZごとに作成されるデフォルトのデプロイ先サブネット 大きさは20 (4096 IPs)

Public IPアドレス インスタンスに動的割当て されるGlobal IPアドレス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

11

Amazon Elastic Block Store (EBS)

EBSとはEC2に仮想外付けされるブロックレベルのストレージサービス

  サイズは1GB単位で〜~1TBまで   サイズ期間(IO)で課金金される   各EC2インスタンスで複数EBSを使える詳細   データは永続的に保存される   いつでもバックアップ(スナップショット)   スナップショットからEBSを作成可能(他のAZに作成できる)

  Provisioned IOPSでIOパフォーマンス指定bull  2014年年3月時点で最大4000IOPS

  他のEC2インスタンスに付け替え可能

Region

Availability Zone - a

EBS EBS EBS

Availability Zone - b

EBS EBS

Amazon S3

EBSスナップショット

EC2 EC2

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

12

Instance StorageとEBS

EC2

Instance Storage bull  内蔵ディスク bull  EC2と不可分 bull  EC2をStopTerminateするとクリアされる bull  性能容量はインスタンスタイプごとに規定 bull  追加費用なし

EBS bull  ネットワークで接続 bull  EC2とは独立管理 bull  EC2をTerminateしてもEBSは保持可能 bull  Volumeごとに性能容量を定義可能 bull  EBSの費用が発生

物理的には ネットワーク経由

EC2に関連する主要コンポーネントリージョン

アベイラビリティゾーン

Amazon CloudWatch

Auto Scaling

Amazon Elastic Block Storage

(EBS)

Amazon Machine Image (AMI)

Elastic IP

Amazon Virtual Private Cloud

(VPC)

Elastic Load Balancer

Snapshot

Amazon Elastic Compute Cloud

(EC2)

Key Pairs

AWS Management Console

Security Groups

VM ImportExport

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

14

今日のAgenda

 Amazon EC2とは  Amazon EC2の基本

bull  触ってみようbull  基本コンセプト

 Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

15

マネジメントコンソールからログイン

  作成したアカウントのメールアドレスパスワードでログインbull  httpsconsoleawsamazoncomec2home emsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

16

AWSサービスの選択   Webコンソールでコントロールするサービスを選ぶ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

17

リージョン選択   日本にいながら世界中のどのリージョンも選択できる

XXXX

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

18

AMI選択   任意のAMIを選ぶことで好みの環境 (OSミドルウェアアプリデータ) を選択できる

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

19

台数インスタンスタイプアベイラビリティゾーンの指定

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

20

EBSの設定

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

21

Key Pair選択   いわゆる公開鍵方式でサーバーにアクセスする初回時は秘密鍵を手元にダウンロードする

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

22

Security Groups選択

  いわゆるファイアウォールの設定作っておいたグループをサーバーに割り当てる

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

23

起動完了了

  起動完了了画面を確認し起動ウィザードを終了了

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

24

起動したインスタンスの情報確認XXXXX

パブリックDNS名

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

25

ターミナルでアクセス

ログインの際のアカウント名はAMIによって違うので注意 例) Amazon Linux -gt ec2-user その他Linuxの多く -gt root admin等

パブリックDNS名

秘密鍵

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

26

今日のAgenda

 Amazon EC2とは  Amazon EC2の基本

bull  触ってみようbull  基本コンセプト

 Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

27

Amazon Machine Image (AMI)

  AMIはインスタンス作成に使用するイメージテンプレート   AWS公式AMIやサードパーティもAMIを提供

bull  httpsawsamazoncomamisbull  httpsawsamazoncommarketplaceemsp 

  選択したAMIから起動する   EC2インスタンスから任意のタイミングでカスタムAMIを作成できる

launch

Amazon Machine Image (AMI)

Amazon EC2インスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

28

AMIとインスタンスAZの関係

インスタンス

Amazon S3

AMI

Availability Zone-1a Availability Zone-1b

カスタム AMI

AMIからインスタンスを起動

カスタムAMIを使ってインスタンスを複数台起動

カスタムAMIを作成必要に応じて共有設定

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

29

AMIの取得AMIからの起動

Copyright copy 2011 Amazon Web Services

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

30

EC2インスタンスのライフサイクル   起動したインスタンスは3つの状態を持つ

bull  Running 実行行中課金金されるbull  Stopped 停止中課金金されないbull  Terminated 終了了StopStartはできない

Running

Terminated

Stopped

StartStop

Terminate

launch

Terminate

Amazon Machine Image (AMI)

Amazon EC2インスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

31

EC2インスタンスの停止と終了了

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

32

EC2インスタンスのタイプ変更Stop(停止)しているといつでもタイプ(スペック)を変更更できる

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

33

EBSボリュームのアタッチ

Copyright copy 2011 Amazon Web Services

EC2インスタンスと同じゾーンに作ることを注意 スナップショットから複製も可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

34

EC2インスタンスのアドレス

  全てのインスタンスが下記を持つsect  Private IPアドレス(VPC内のサブネットから割り当てる)sect  Private DNS名(internal)sect  Public DNS名 (amazonawscom)

  public IPアドレスをオプションで付けられる   固定されたPublic IP Addresses はEIPと呼ぶ

sect  稼働しているEC2インスタンスに瞬時に付け外しが可能sect  インスタンスにアサインしているときは料料金金はかからない

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

35

EIPの割り当て

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

36

EIPの使いどころ

  通常のケースはEIPは必要なくEC2のPublic DNS名を用いてCNAMEで名前変換を行行う

  Route 53(名前解決サービス)でPublic DNSを用いる

  固定IPアドレスが必要なときに限りEIPを用いる   メールサーバー監視サーバー等

  メールサーバの送信制限解除逆引き申請が必要な場合は下記から申請を行行うhttpsaws-‐‑‒portalamazoncomgpawshtml-‐‑‒forms-‐‑‒controllercontactusec2-‐‑‒email-‐‑‒limit-‐‑‒rdns-‐‑‒request

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

37

リージョン間コピー(AMIEBS)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

38

Amazon EC2の関連サービス関連情報   監視負荷分散自動スケール

rarrCloudWatchELBAutoScaling   閉域網での利利用仮想ネットワーキング

rarrAmazon VPC (Virtual Private Cloud)   ① 社内ネットワークからVPN接続   ② ルーティングイントラIPアドレス仮想NIC等々

  占有サーバ rarrAmazon Dedicated Instance   専用線接続 rarrAmazon Direct Connect   Windowsemsp emsp  rarrWindowsインスタンス   スパコンrarrHPCインスタンス   アクセス管理理emsp  rarrIAM (Identity and Access Management)   料料金金関係emsp  rarrConsolidated Billing資料料集emsp httpawsamazoncomjpaws-‐‑‒meister

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

39

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

40

AWSのセキュリティの考え方

第三者認証

SOC 1SSAE 16ISAE 3402 ISO 27001 PCI DSS HIPAA ITAR

FISMA Moderate FIPS 140-2 ファシリティ

DC電源ネットワーク冗長化

Your Apps

Webサイトアプリケーションこれまでと同様のセキュリティを

お客様SI様で実現可能

インフラよりハイレベルの

セキュリティをAWSが提供

シェアードレスポンシビリティモデル(責任共有モデル)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

41

EC2の責任共有モデル

物理インタフェース

ファイアウォール

      ハイバーバイザー

Sm

all

Larg

e

hellip

Sm

all Amazon EC2

インスタンス

物理ホスト

ユーザーが 責任を持って 管理する

AWSが 責任を持って 管理する

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

42

ファイアウォールを実現するSecurity Group

  インスタンスのINOUTトラフィックを制限するファイアウォール機能

  デフォルトIN向けは全トラフィック閉

  必要な受信アクセスに対してアクセスルールを定義する

bull  プロトコル( TCPUDP)bull  宛先ポートbull  アクセス元IP Security Group

  ルールをひとまとめにしたテンプレートを Security Groupと呼ぶ

EC2 インスタンス

ポート22(SSH)

ポート80(HTTP)

EC2ファイアウォール

Security Group

ポート25(SMTP)

ポート22(SSH)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

43

Security Groupの使い方   インスタンスの用途に応じたSecurity Groupを用意する

bull  Webサーバ用DBサーバ用メールサーバ用等   アクセス元にSecurity Groupも設定して限定可能

Webサーバ

Webサーバ

DBサーバ

sg-1234

22 00000 80 00000 25 sg-1234

sg-1234

sg-1234

sg-abcd sg-abcd

22 00000 3306 sg-1234

Webサーバ

sg-xyz

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

44

セキュリティ証明書

仮想サーバ(Amazon EC2)Windows( スタンダード)

コマンドライン SDK利利用

SSH公開鍵認証

仮想デスクトップ

ターミナル

REST SOAPAPI

Webコンソール

①EC2インスタンスへのアクセスrarr鍵認証

②Webコンソールへのアクセス

rarrパスワード認証 多要素認証 IAM

③APIへのアクセスrarrアクセスキー X509証明書 IAM

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

45

Key Pair(キーペア)を用いた鍵認証   鍵認証はユーザ名パスワードの認証よりも安全な認証方式

ダウンロードされた秘密鍵

①キーペア作成

②インスタンス起動時にemsp emsp emsp 公開鍵をコピー

公開鍵

③公開鍵秘密鍵のペアが合致するとログイン可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

46

EC2のSLA13

sect  EC2の可用性が9995 sect 上記に満たない場合はServiceクレジットを返還する

sect 詳細は sect  httpawsamazoncomec2-sla

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

47

AWSセキュリティセンター 13

 日本語のホワイトペーパー bull  セキュリティ概要 bull  リスクとコンプライアンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

48

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

49

最近追加された機能

  VM Import for Linux   IAM EC2 Resource Permissions   リザーブドインスタンスの変更更可能に   SR-‐‑‒IOVネットワークDriverネットワーク性能向上

bull  C3 I2 R3インスタンスで対応

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

50

インスタンスのさらなる追加

  一般的な目的なら M3   Compute Optimizedなら C3   Memory Optimizedなら R3(もうすぐ)   GPUが必要なら G2   IOPS重視なら I2   Disk Based Storage ならHS1

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

51

Intel Processor Features

  m3 c3 cc2 g2 cr1 i2 r3の全てが対応

  AES New Instructions (AES-‐‑‒NI)bull  c1 cg1 m2でも対応

  Advanced Vector Extensions (Intel AVX)bull  HVMでのみ対応

  Turbo Boost Technology

  詳細は httpawsamazoncomec2instance-‐‑‒types

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

52

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

53

故障のための設計 Design for Failure   故障に備えた設計をしておく

  すべてが故障しうると考えシステム全体での保守的設計   SPOF(単一障害点)の排除   障害からの復復旧(対応品質)を重視する

  EC2における故障のための設計   AMIを常にとっておく   EBSスナップショットでバックアップ   複数アベイラビリティゾーンへの分散   ELBでサーバを冗長化Auto Scalingで自動復復帰   Reserved Instanceでキャパシティ保障

  他の冗長性高いサービスとの組み合わせ   S3 SimpleDB RDS他

httpwwwslidesharenetkentamagawaaws-‐‑‒7991623

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

54

定期的なバックアップ

  EC2のAMIを定期的に作成する   (参考) 無停止でAMI取得

Cloudpackさんブログhttpblogcloudpackjp201103aws-‐‑‒news-‐‑‒ec2-‐‑‒instance-‐‑‒no-‐‑‒reboot-‐‑‒amihtml

  データボリュームとしてのEBSの場合EBSのスナップショットを定期的に作成

  スクリプトを書いて定期的なバックアップを行行うことも可能 Coderockさんブログ

httpblogdateofrockcom201003auto-‐‑‒backup-‐‑‒amazon-‐‑‒ebs-‐‑‒with-‐‑‒rubyhtml   サーバーワークスさんブログ

httpblogserverworkscojptech20110721awssdk-‐‑‒for-‐‑‒ruby-‐‑‒create-‐‑‒snapshot

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

55

Instance StorageにSSDを積んだインスタンスが増えてきた

  EC2のタイプによって選択できるInstance Storeは以下の通り

Instance Type Instance Store Volumesm1small 1 x 160 GBdaggerm1medium 1 x 410 GBm1large 2 x 420 GB (840 GB)m1xlarge 4 x 420 GB (1680 GB)m2xlarge 1 x 420 GBm22xlarge 1 x 850 GBm24xlarge 2 x 840 GB (1680 GB)m3medium 1 x 4 GB SSDm3large 1 x 32 GB SSDm3xlarge 2 x 40 GB SSD (80 GB)m32xlarge 2 x 80 GB SSD (160 GB)

t1micro None (use Amazon EBS volumes)

c1medium 1 x 350 GBdaggerc1xlarge 4 x 420 GB (1680 GB)

Instance Type Instance Store Volumes

c3large 2 x 16 GB SSD (32 GB)c3xlarge 2 x 40 GB SSD (80 GB)c32xlarge 2 x 80 GB SSD (160 GB)c34xlarge 2 x 160 GB SSD (320 GB)c38xlarge 2 x 320 GB SSD (640 GB)cc28xlarge 4 x 840 GB (3360 GB)cg14xlarge 2 x 840 GB (1680 GB)cr18xlarge 2 x 120 GB SSD (240 GB)hi14xlarge 2 x 1024 GB SSD (2048 GB)hs18xlarge 24 x 2048 GB (49 TB)i2xlarge 1 x 800 GB SSDi22xlarge 2 x 800 GB SSD (1600 GB)i24xlarge 4 x 800 GB SSD (3200 GB)i28xlarge 8 x 800 GB SSD (6400 GB)

2014年年1月29日時点

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

56

Instance Storageを使うべきなのは

 高IOPS高帯域なストレージが必要な場合

 消えても良良い一次データの置き場として使う場合

 ストレージ冗長化を準備できる場合

S3活かしたいメリット

考慮すべき制約

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

57

EC2へのファイル転送は

  SCPを使う scp pk-‐‑‒XXXpem rootec2-‐‑‒XXXamazonawscomxxx

  Windowsの場合はWinSCPなど   S3経由で共有する

  S3にアップロードしEC2からwgetでアクセスする   FTPを立立ち上げる

  EC2側でFTPサーバーを立立ち上げておく

  高速に送信したい   Tsunami UDP Aspera等のソリューション

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

58

VM Import Export

  複数プラットフォームのVMイメージをAmazon EC2に移行行(インポートエクスポート)可能

httpawstypepadcomaws_japan201012vm-‐‑‒import-‐‑‒bring-‐‑‒your-‐‑‒vmware-‐‑‒images-‐‑‒to-‐‑‒the-‐‑‒cloudhtml

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

59

稼働EC2インスタンスからメタデータ取得

  ami-‐‑‒id   ami-‐‑‒launch-‐‑‒index   ami-‐‑‒manifest-‐‑‒path   block-‐‑‒device-‐‑‒mapping   hostname   instance-‐‑‒action   instance-‐‑‒id   Instance-‐‑‒type   kernel-‐‑‒id

  local-‐‑‒hostname   local-‐‑‒ipv4   mac   network   placement   profile   public-‐‑‒hostname   public-‐‑‒ipv4   public-‐‑‒keys   reservation-‐‑‒id

curl http169254169254latestmeta-‐‑‒data

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

60

起動時にパラメーターを渡す   起動時に16KB以内で任意のものを渡せる

  ChefやPuppetなどを利利用して自己構成できるAMIに   参照emsp AWSマイスターemsp CloudFormation資料料httpwwwslidesharenetkentamagawacloudformation-‐‑‒aws5

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

61

EC2コマンドラインツール amp AWS SDKs

  コマンドラインからEC2のAPIにアクセスできるツール   ツールをインストールしセキュリティ証明書を配置

  AWS SDKs httpawsamazoncomcode

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

62

マネージメントコンソールだけでなくAPIからプログラマブルにアクセス

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1a --instance-type m1small

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1b --instance-type m1small

Tokyo リージョン

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

63

EC2のスケジュールイベント表示機能

  EC2インスタンスが稼働しているハードかソフトにメンテナンスが必要な場合に情報を提供する仕組み

  インスタンスリブートシステムリブートリタイヤ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

64

EC2のステータスチェック機能

  下記の2種類のチェックを自動テストで実行行し情報を提示   システムステータスチェック

  EC2インスタンスにネットワークパケットが通るかチェック   インスタンスステータスチェック

  EC2インスタンスのOSがネットワークパケットを受け取るかチェック

  もし状況に乖離離がある場合はレポートできます

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

65

AWS制限増加申請

  EC2を誤って大量量に作成しないよう最大インスタンス数の上限を20に制限しています

  制限増加申請フォームで各種制限の増加を行行えますbull  httpawsamazoncomjpcontact-‐‑‒usemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

66

既存EBSボリュームのサイズ変更更

  例例 10GB -‐‑‒gt 100GB変更更への流流れ   EBSをデタッチする   EBSからS3にスナップショットを作成する

  新たなボリュームサイズを指定してEBSを作成する

  EBSをアタッチする   マウントしてリサイズする

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

スナップショット

EBS (10GB)

EBS (100GB)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

67

EBSとS3

EBSは複数EC2にアタッチ不不可   単独のEC2インスタンスへのブロックデバイスとしての使い方

  NFSのような使い方をする際はEC2にミドルウェアを導入(GlusterFS等)

S3は複数のEC2からアクセス可   ただしWrite Once Read A Lotな使い方に向いている

  アップロード並列列化も使える   耐久性の設計は99999999999で非常に高い

Copyright copy 2011 Amazon Web Services

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

バケット

EBS

EC2インスタンス

HTTPHTTPS

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

68

EIP使用時の注意点

  グローバルIP(EIP)を用いた場合インターネット経由のアクセスとなり課金発生するケースがある

  名前解決したいサーバに固定IPを付与する13   各サーバは固定グローバルIPを元に

AWSのDNSに名前を問い合わせ13   問い合わせた結果返ってくる外部DNS名でサーバにアクセスを行う13   EC2内部で外部DNS名を使ってアクセスすると プライベートIPアドレスに変換されるため 目的のサーバにプライベートIPでアクセスできる13

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

69

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

70

AWSの課金金の仕組みインターネット

ELB

EC2

EBS

S3

データ転送量量

ELB利利用料料データ処理理量量

インスタンスタイプ別利利用料料

EBSの利利用料料

S3の利利用料料

大半を占める

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

71

Simple Monthly Calculator

  Web上にある計算機を使って概算費用を計算できますsect  httpcalculators3amazonawscomcalc5htmllng=ja_JP

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

72

複数の価格モデル

 課金金モデルが選べるsect 通常の時間課金金のオンデマンドインスタンス

sect ある程度度継続してEC2を使う(1年年3年年)EC2リザーブドインスタンス

sect 入札を利利用してより安く使うEC2スポットインスタンス

rarrマイスターシリーズ RIampスポットインスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

73

AWS無料料試用枠

  AWSでは無料料試用枠を用意していますbull  httpawsamazoncomjpfreeemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

74

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

75

Appendix

  参考資料料bull  Amazon Glacier Developer Guidehttpdocsamazonwebservicescomamazonglacierlatestdevintroductionhtml

bull  Amazon Glacier FAQhttpawsamazoncomjpglacierfaqs

bull  Amazon Glaceir価格httpawsamazoncomjpglacierpricing

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

76

QampA

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 9: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

Virtual Private Cloud (VPC)とEC2

EC2-Classic

Amazon Virtual Private Cloud (VPC)環境

ユーザごとの IPアドレス領域で

インスタンスを利用可

全ユーザで共通の 100008のIPアドレスを使う

現在の標準環境 EC2-VPC

EC2-VPCのDefault VPC

  Default VPCでは 1  172310016が使われる 2  各AZにDefault Subnet (public)が自動作成される 3  選択したAZのDefault Subnetにインスタンスがデプロイされる 4  EC2インスタンスにはPublic IPアドレスがアサインされる

Default VPC (172310016) デフォルトのデプロイ先VPC

Default Subnet AZごとに作成されるデフォルトのデプロイ先サブネット 大きさは20 (4096 IPs)

Public IPアドレス インスタンスに動的割当て されるGlobal IPアドレス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

11

Amazon Elastic Block Store (EBS)

EBSとはEC2に仮想外付けされるブロックレベルのストレージサービス

  サイズは1GB単位で〜~1TBまで   サイズ期間(IO)で課金金される   各EC2インスタンスで複数EBSを使える詳細   データは永続的に保存される   いつでもバックアップ(スナップショット)   スナップショットからEBSを作成可能(他のAZに作成できる)

  Provisioned IOPSでIOパフォーマンス指定bull  2014年年3月時点で最大4000IOPS

  他のEC2インスタンスに付け替え可能

Region

Availability Zone - a

EBS EBS EBS

Availability Zone - b

EBS EBS

Amazon S3

EBSスナップショット

EC2 EC2

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

12

Instance StorageとEBS

EC2

Instance Storage bull  内蔵ディスク bull  EC2と不可分 bull  EC2をStopTerminateするとクリアされる bull  性能容量はインスタンスタイプごとに規定 bull  追加費用なし

EBS bull  ネットワークで接続 bull  EC2とは独立管理 bull  EC2をTerminateしてもEBSは保持可能 bull  Volumeごとに性能容量を定義可能 bull  EBSの費用が発生

物理的には ネットワーク経由

EC2に関連する主要コンポーネントリージョン

アベイラビリティゾーン

Amazon CloudWatch

Auto Scaling

Amazon Elastic Block Storage

(EBS)

Amazon Machine Image (AMI)

Elastic IP

Amazon Virtual Private Cloud

(VPC)

Elastic Load Balancer

Snapshot

Amazon Elastic Compute Cloud

(EC2)

Key Pairs

AWS Management Console

Security Groups

VM ImportExport

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

14

今日のAgenda

 Amazon EC2とは  Amazon EC2の基本

bull  触ってみようbull  基本コンセプト

 Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

15

マネジメントコンソールからログイン

  作成したアカウントのメールアドレスパスワードでログインbull  httpsconsoleawsamazoncomec2home emsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

16

AWSサービスの選択   Webコンソールでコントロールするサービスを選ぶ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

17

リージョン選択   日本にいながら世界中のどのリージョンも選択できる

XXXX

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

18

AMI選択   任意のAMIを選ぶことで好みの環境 (OSミドルウェアアプリデータ) を選択できる

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

19

台数インスタンスタイプアベイラビリティゾーンの指定

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

20

EBSの設定

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

21

Key Pair選択   いわゆる公開鍵方式でサーバーにアクセスする初回時は秘密鍵を手元にダウンロードする

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

22

Security Groups選択

  いわゆるファイアウォールの設定作っておいたグループをサーバーに割り当てる

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

23

起動完了了

  起動完了了画面を確認し起動ウィザードを終了了

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

24

起動したインスタンスの情報確認XXXXX

パブリックDNS名

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

25

ターミナルでアクセス

ログインの際のアカウント名はAMIによって違うので注意 例) Amazon Linux -gt ec2-user その他Linuxの多く -gt root admin等

パブリックDNS名

秘密鍵

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

26

今日のAgenda

 Amazon EC2とは  Amazon EC2の基本

bull  触ってみようbull  基本コンセプト

 Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

27

Amazon Machine Image (AMI)

  AMIはインスタンス作成に使用するイメージテンプレート   AWS公式AMIやサードパーティもAMIを提供

bull  httpsawsamazoncomamisbull  httpsawsamazoncommarketplaceemsp 

  選択したAMIから起動する   EC2インスタンスから任意のタイミングでカスタムAMIを作成できる

launch

Amazon Machine Image (AMI)

Amazon EC2インスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

28

AMIとインスタンスAZの関係

インスタンス

Amazon S3

AMI

Availability Zone-1a Availability Zone-1b

カスタム AMI

AMIからインスタンスを起動

カスタムAMIを使ってインスタンスを複数台起動

カスタムAMIを作成必要に応じて共有設定

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

29

AMIの取得AMIからの起動

Copyright copy 2011 Amazon Web Services

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

30

EC2インスタンスのライフサイクル   起動したインスタンスは3つの状態を持つ

bull  Running 実行行中課金金されるbull  Stopped 停止中課金金されないbull  Terminated 終了了StopStartはできない

Running

Terminated

Stopped

StartStop

Terminate

launch

Terminate

Amazon Machine Image (AMI)

Amazon EC2インスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

31

EC2インスタンスの停止と終了了

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

32

EC2インスタンスのタイプ変更Stop(停止)しているといつでもタイプ(スペック)を変更更できる

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

33

EBSボリュームのアタッチ

Copyright copy 2011 Amazon Web Services

EC2インスタンスと同じゾーンに作ることを注意 スナップショットから複製も可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

34

EC2インスタンスのアドレス

  全てのインスタンスが下記を持つsect  Private IPアドレス(VPC内のサブネットから割り当てる)sect  Private DNS名(internal)sect  Public DNS名 (amazonawscom)

  public IPアドレスをオプションで付けられる   固定されたPublic IP Addresses はEIPと呼ぶ

sect  稼働しているEC2インスタンスに瞬時に付け外しが可能sect  インスタンスにアサインしているときは料料金金はかからない

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

35

EIPの割り当て

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

36

EIPの使いどころ

  通常のケースはEIPは必要なくEC2のPublic DNS名を用いてCNAMEで名前変換を行行う

  Route 53(名前解決サービス)でPublic DNSを用いる

  固定IPアドレスが必要なときに限りEIPを用いる   メールサーバー監視サーバー等

  メールサーバの送信制限解除逆引き申請が必要な場合は下記から申請を行行うhttpsaws-‐‑‒portalamazoncomgpawshtml-‐‑‒forms-‐‑‒controllercontactusec2-‐‑‒email-‐‑‒limit-‐‑‒rdns-‐‑‒request

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

37

リージョン間コピー(AMIEBS)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

38

Amazon EC2の関連サービス関連情報   監視負荷分散自動スケール

rarrCloudWatchELBAutoScaling   閉域網での利利用仮想ネットワーキング

rarrAmazon VPC (Virtual Private Cloud)   ① 社内ネットワークからVPN接続   ② ルーティングイントラIPアドレス仮想NIC等々

  占有サーバ rarrAmazon Dedicated Instance   専用線接続 rarrAmazon Direct Connect   Windowsemsp emsp  rarrWindowsインスタンス   スパコンrarrHPCインスタンス   アクセス管理理emsp  rarrIAM (Identity and Access Management)   料料金金関係emsp  rarrConsolidated Billing資料料集emsp httpawsamazoncomjpaws-‐‑‒meister

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

39

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

40

AWSのセキュリティの考え方

第三者認証

SOC 1SSAE 16ISAE 3402 ISO 27001 PCI DSS HIPAA ITAR

FISMA Moderate FIPS 140-2 ファシリティ

DC電源ネットワーク冗長化

Your Apps

Webサイトアプリケーションこれまでと同様のセキュリティを

お客様SI様で実現可能

インフラよりハイレベルの

セキュリティをAWSが提供

シェアードレスポンシビリティモデル(責任共有モデル)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

41

EC2の責任共有モデル

物理インタフェース

ファイアウォール

      ハイバーバイザー

Sm

all

Larg

e

hellip

Sm

all Amazon EC2

インスタンス

物理ホスト

ユーザーが 責任を持って 管理する

AWSが 責任を持って 管理する

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

42

ファイアウォールを実現するSecurity Group

  インスタンスのINOUTトラフィックを制限するファイアウォール機能

  デフォルトIN向けは全トラフィック閉

  必要な受信アクセスに対してアクセスルールを定義する

bull  プロトコル( TCPUDP)bull  宛先ポートbull  アクセス元IP Security Group

  ルールをひとまとめにしたテンプレートを Security Groupと呼ぶ

EC2 インスタンス

ポート22(SSH)

ポート80(HTTP)

EC2ファイアウォール

Security Group

ポート25(SMTP)

ポート22(SSH)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

43

Security Groupの使い方   インスタンスの用途に応じたSecurity Groupを用意する

bull  Webサーバ用DBサーバ用メールサーバ用等   アクセス元にSecurity Groupも設定して限定可能

Webサーバ

Webサーバ

DBサーバ

sg-1234

22 00000 80 00000 25 sg-1234

sg-1234

sg-1234

sg-abcd sg-abcd

22 00000 3306 sg-1234

Webサーバ

sg-xyz

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

44

セキュリティ証明書

仮想サーバ(Amazon EC2)Windows( スタンダード)

コマンドライン SDK利利用

SSH公開鍵認証

仮想デスクトップ

ターミナル

REST SOAPAPI

Webコンソール

①EC2インスタンスへのアクセスrarr鍵認証

②Webコンソールへのアクセス

rarrパスワード認証 多要素認証 IAM

③APIへのアクセスrarrアクセスキー X509証明書 IAM

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

45

Key Pair(キーペア)を用いた鍵認証   鍵認証はユーザ名パスワードの認証よりも安全な認証方式

ダウンロードされた秘密鍵

①キーペア作成

②インスタンス起動時にemsp emsp emsp 公開鍵をコピー

公開鍵

③公開鍵秘密鍵のペアが合致するとログイン可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

46

EC2のSLA13

sect  EC2の可用性が9995 sect 上記に満たない場合はServiceクレジットを返還する

sect 詳細は sect  httpawsamazoncomec2-sla

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

47

AWSセキュリティセンター 13

 日本語のホワイトペーパー bull  セキュリティ概要 bull  リスクとコンプライアンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

48

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

49

最近追加された機能

  VM Import for Linux   IAM EC2 Resource Permissions   リザーブドインスタンスの変更更可能に   SR-‐‑‒IOVネットワークDriverネットワーク性能向上

bull  C3 I2 R3インスタンスで対応

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

50

インスタンスのさらなる追加

  一般的な目的なら M3   Compute Optimizedなら C3   Memory Optimizedなら R3(もうすぐ)   GPUが必要なら G2   IOPS重視なら I2   Disk Based Storage ならHS1

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

51

Intel Processor Features

  m3 c3 cc2 g2 cr1 i2 r3の全てが対応

  AES New Instructions (AES-‐‑‒NI)bull  c1 cg1 m2でも対応

  Advanced Vector Extensions (Intel AVX)bull  HVMでのみ対応

  Turbo Boost Technology

  詳細は httpawsamazoncomec2instance-‐‑‒types

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

52

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

53

故障のための設計 Design for Failure   故障に備えた設計をしておく

  すべてが故障しうると考えシステム全体での保守的設計   SPOF(単一障害点)の排除   障害からの復復旧(対応品質)を重視する

  EC2における故障のための設計   AMIを常にとっておく   EBSスナップショットでバックアップ   複数アベイラビリティゾーンへの分散   ELBでサーバを冗長化Auto Scalingで自動復復帰   Reserved Instanceでキャパシティ保障

  他の冗長性高いサービスとの組み合わせ   S3 SimpleDB RDS他

httpwwwslidesharenetkentamagawaaws-‐‑‒7991623

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

54

定期的なバックアップ

  EC2のAMIを定期的に作成する   (参考) 無停止でAMI取得

Cloudpackさんブログhttpblogcloudpackjp201103aws-‐‑‒news-‐‑‒ec2-‐‑‒instance-‐‑‒no-‐‑‒reboot-‐‑‒amihtml

  データボリュームとしてのEBSの場合EBSのスナップショットを定期的に作成

  スクリプトを書いて定期的なバックアップを行行うことも可能 Coderockさんブログ

httpblogdateofrockcom201003auto-‐‑‒backup-‐‑‒amazon-‐‑‒ebs-‐‑‒with-‐‑‒rubyhtml   サーバーワークスさんブログ

httpblogserverworkscojptech20110721awssdk-‐‑‒for-‐‑‒ruby-‐‑‒create-‐‑‒snapshot

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

55

Instance StorageにSSDを積んだインスタンスが増えてきた

  EC2のタイプによって選択できるInstance Storeは以下の通り

Instance Type Instance Store Volumesm1small 1 x 160 GBdaggerm1medium 1 x 410 GBm1large 2 x 420 GB (840 GB)m1xlarge 4 x 420 GB (1680 GB)m2xlarge 1 x 420 GBm22xlarge 1 x 850 GBm24xlarge 2 x 840 GB (1680 GB)m3medium 1 x 4 GB SSDm3large 1 x 32 GB SSDm3xlarge 2 x 40 GB SSD (80 GB)m32xlarge 2 x 80 GB SSD (160 GB)

t1micro None (use Amazon EBS volumes)

c1medium 1 x 350 GBdaggerc1xlarge 4 x 420 GB (1680 GB)

Instance Type Instance Store Volumes

c3large 2 x 16 GB SSD (32 GB)c3xlarge 2 x 40 GB SSD (80 GB)c32xlarge 2 x 80 GB SSD (160 GB)c34xlarge 2 x 160 GB SSD (320 GB)c38xlarge 2 x 320 GB SSD (640 GB)cc28xlarge 4 x 840 GB (3360 GB)cg14xlarge 2 x 840 GB (1680 GB)cr18xlarge 2 x 120 GB SSD (240 GB)hi14xlarge 2 x 1024 GB SSD (2048 GB)hs18xlarge 24 x 2048 GB (49 TB)i2xlarge 1 x 800 GB SSDi22xlarge 2 x 800 GB SSD (1600 GB)i24xlarge 4 x 800 GB SSD (3200 GB)i28xlarge 8 x 800 GB SSD (6400 GB)

2014年年1月29日時点

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

56

Instance Storageを使うべきなのは

 高IOPS高帯域なストレージが必要な場合

 消えても良良い一次データの置き場として使う場合

 ストレージ冗長化を準備できる場合

S3活かしたいメリット

考慮すべき制約

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

57

EC2へのファイル転送は

  SCPを使う scp pk-‐‑‒XXXpem rootec2-‐‑‒XXXamazonawscomxxx

  Windowsの場合はWinSCPなど   S3経由で共有する

  S3にアップロードしEC2からwgetでアクセスする   FTPを立立ち上げる

  EC2側でFTPサーバーを立立ち上げておく

  高速に送信したい   Tsunami UDP Aspera等のソリューション

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

58

VM Import Export

  複数プラットフォームのVMイメージをAmazon EC2に移行行(インポートエクスポート)可能

httpawstypepadcomaws_japan201012vm-‐‑‒import-‐‑‒bring-‐‑‒your-‐‑‒vmware-‐‑‒images-‐‑‒to-‐‑‒the-‐‑‒cloudhtml

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

59

稼働EC2インスタンスからメタデータ取得

  ami-‐‑‒id   ami-‐‑‒launch-‐‑‒index   ami-‐‑‒manifest-‐‑‒path   block-‐‑‒device-‐‑‒mapping   hostname   instance-‐‑‒action   instance-‐‑‒id   Instance-‐‑‒type   kernel-‐‑‒id

  local-‐‑‒hostname   local-‐‑‒ipv4   mac   network   placement   profile   public-‐‑‒hostname   public-‐‑‒ipv4   public-‐‑‒keys   reservation-‐‑‒id

curl http169254169254latestmeta-‐‑‒data

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

60

起動時にパラメーターを渡す   起動時に16KB以内で任意のものを渡せる

  ChefやPuppetなどを利利用して自己構成できるAMIに   参照emsp AWSマイスターemsp CloudFormation資料料httpwwwslidesharenetkentamagawacloudformation-‐‑‒aws5

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

61

EC2コマンドラインツール amp AWS SDKs

  コマンドラインからEC2のAPIにアクセスできるツール   ツールをインストールしセキュリティ証明書を配置

  AWS SDKs httpawsamazoncomcode

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

62

マネージメントコンソールだけでなくAPIからプログラマブルにアクセス

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1a --instance-type m1small

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1b --instance-type m1small

Tokyo リージョン

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

63

EC2のスケジュールイベント表示機能

  EC2インスタンスが稼働しているハードかソフトにメンテナンスが必要な場合に情報を提供する仕組み

  インスタンスリブートシステムリブートリタイヤ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

64

EC2のステータスチェック機能

  下記の2種類のチェックを自動テストで実行行し情報を提示   システムステータスチェック

  EC2インスタンスにネットワークパケットが通るかチェック   インスタンスステータスチェック

  EC2インスタンスのOSがネットワークパケットを受け取るかチェック

  もし状況に乖離離がある場合はレポートできます

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

65

AWS制限増加申請

  EC2を誤って大量量に作成しないよう最大インスタンス数の上限を20に制限しています

  制限増加申請フォームで各種制限の増加を行行えますbull  httpawsamazoncomjpcontact-‐‑‒usemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

66

既存EBSボリュームのサイズ変更更

  例例 10GB -‐‑‒gt 100GB変更更への流流れ   EBSをデタッチする   EBSからS3にスナップショットを作成する

  新たなボリュームサイズを指定してEBSを作成する

  EBSをアタッチする   マウントしてリサイズする

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

スナップショット

EBS (10GB)

EBS (100GB)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

67

EBSとS3

EBSは複数EC2にアタッチ不不可   単独のEC2インスタンスへのブロックデバイスとしての使い方

  NFSのような使い方をする際はEC2にミドルウェアを導入(GlusterFS等)

S3は複数のEC2からアクセス可   ただしWrite Once Read A Lotな使い方に向いている

  アップロード並列列化も使える   耐久性の設計は99999999999で非常に高い

Copyright copy 2011 Amazon Web Services

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

バケット

EBS

EC2インスタンス

HTTPHTTPS

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

68

EIP使用時の注意点

  グローバルIP(EIP)を用いた場合インターネット経由のアクセスとなり課金発生するケースがある

  名前解決したいサーバに固定IPを付与する13   各サーバは固定グローバルIPを元に

AWSのDNSに名前を問い合わせ13   問い合わせた結果返ってくる外部DNS名でサーバにアクセスを行う13   EC2内部で外部DNS名を使ってアクセスすると プライベートIPアドレスに変換されるため 目的のサーバにプライベートIPでアクセスできる13

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

69

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

70

AWSの課金金の仕組みインターネット

ELB

EC2

EBS

S3

データ転送量量

ELB利利用料料データ処理理量量

インスタンスタイプ別利利用料料

EBSの利利用料料

S3の利利用料料

大半を占める

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

71

Simple Monthly Calculator

  Web上にある計算機を使って概算費用を計算できますsect  httpcalculators3amazonawscomcalc5htmllng=ja_JP

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

72

複数の価格モデル

 課金金モデルが選べるsect 通常の時間課金金のオンデマンドインスタンス

sect ある程度度継続してEC2を使う(1年年3年年)EC2リザーブドインスタンス

sect 入札を利利用してより安く使うEC2スポットインスタンス

rarrマイスターシリーズ RIampスポットインスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

73

AWS無料料試用枠

  AWSでは無料料試用枠を用意していますbull  httpawsamazoncomjpfreeemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

74

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

75

Appendix

  参考資料料bull  Amazon Glacier Developer Guidehttpdocsamazonwebservicescomamazonglacierlatestdevintroductionhtml

bull  Amazon Glacier FAQhttpawsamazoncomjpglacierfaqs

bull  Amazon Glaceir価格httpawsamazoncomjpglacierpricing

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

76

QampA

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 10: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

EC2-VPCのDefault VPC

  Default VPCでは 1  172310016が使われる 2  各AZにDefault Subnet (public)が自動作成される 3  選択したAZのDefault Subnetにインスタンスがデプロイされる 4  EC2インスタンスにはPublic IPアドレスがアサインされる

Default VPC (172310016) デフォルトのデプロイ先VPC

Default Subnet AZごとに作成されるデフォルトのデプロイ先サブネット 大きさは20 (4096 IPs)

Public IPアドレス インスタンスに動的割当て されるGlobal IPアドレス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

11

Amazon Elastic Block Store (EBS)

EBSとはEC2に仮想外付けされるブロックレベルのストレージサービス

  サイズは1GB単位で〜~1TBまで   サイズ期間(IO)で課金金される   各EC2インスタンスで複数EBSを使える詳細   データは永続的に保存される   いつでもバックアップ(スナップショット)   スナップショットからEBSを作成可能(他のAZに作成できる)

  Provisioned IOPSでIOパフォーマンス指定bull  2014年年3月時点で最大4000IOPS

  他のEC2インスタンスに付け替え可能

Region

Availability Zone - a

EBS EBS EBS

Availability Zone - b

EBS EBS

Amazon S3

EBSスナップショット

EC2 EC2

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

12

Instance StorageとEBS

EC2

Instance Storage bull  内蔵ディスク bull  EC2と不可分 bull  EC2をStopTerminateするとクリアされる bull  性能容量はインスタンスタイプごとに規定 bull  追加費用なし

EBS bull  ネットワークで接続 bull  EC2とは独立管理 bull  EC2をTerminateしてもEBSは保持可能 bull  Volumeごとに性能容量を定義可能 bull  EBSの費用が発生

物理的には ネットワーク経由

EC2に関連する主要コンポーネントリージョン

アベイラビリティゾーン

Amazon CloudWatch

Auto Scaling

Amazon Elastic Block Storage

(EBS)

Amazon Machine Image (AMI)

Elastic IP

Amazon Virtual Private Cloud

(VPC)

Elastic Load Balancer

Snapshot

Amazon Elastic Compute Cloud

(EC2)

Key Pairs

AWS Management Console

Security Groups

VM ImportExport

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

14

今日のAgenda

 Amazon EC2とは  Amazon EC2の基本

bull  触ってみようbull  基本コンセプト

 Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

15

マネジメントコンソールからログイン

  作成したアカウントのメールアドレスパスワードでログインbull  httpsconsoleawsamazoncomec2home emsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

16

AWSサービスの選択   Webコンソールでコントロールするサービスを選ぶ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

17

リージョン選択   日本にいながら世界中のどのリージョンも選択できる

XXXX

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

18

AMI選択   任意のAMIを選ぶことで好みの環境 (OSミドルウェアアプリデータ) を選択できる

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

19

台数インスタンスタイプアベイラビリティゾーンの指定

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

20

EBSの設定

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

21

Key Pair選択   いわゆる公開鍵方式でサーバーにアクセスする初回時は秘密鍵を手元にダウンロードする

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

22

Security Groups選択

  いわゆるファイアウォールの設定作っておいたグループをサーバーに割り当てる

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

23

起動完了了

  起動完了了画面を確認し起動ウィザードを終了了

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

24

起動したインスタンスの情報確認XXXXX

パブリックDNS名

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

25

ターミナルでアクセス

ログインの際のアカウント名はAMIによって違うので注意 例) Amazon Linux -gt ec2-user その他Linuxの多く -gt root admin等

パブリックDNS名

秘密鍵

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

26

今日のAgenda

 Amazon EC2とは  Amazon EC2の基本

bull  触ってみようbull  基本コンセプト

 Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

27

Amazon Machine Image (AMI)

  AMIはインスタンス作成に使用するイメージテンプレート   AWS公式AMIやサードパーティもAMIを提供

bull  httpsawsamazoncomamisbull  httpsawsamazoncommarketplaceemsp 

  選択したAMIから起動する   EC2インスタンスから任意のタイミングでカスタムAMIを作成できる

launch

Amazon Machine Image (AMI)

Amazon EC2インスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

28

AMIとインスタンスAZの関係

インスタンス

Amazon S3

AMI

Availability Zone-1a Availability Zone-1b

カスタム AMI

AMIからインスタンスを起動

カスタムAMIを使ってインスタンスを複数台起動

カスタムAMIを作成必要に応じて共有設定

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

29

AMIの取得AMIからの起動

Copyright copy 2011 Amazon Web Services

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

30

EC2インスタンスのライフサイクル   起動したインスタンスは3つの状態を持つ

bull  Running 実行行中課金金されるbull  Stopped 停止中課金金されないbull  Terminated 終了了StopStartはできない

Running

Terminated

Stopped

StartStop

Terminate

launch

Terminate

Amazon Machine Image (AMI)

Amazon EC2インスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

31

EC2インスタンスの停止と終了了

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

32

EC2インスタンスのタイプ変更Stop(停止)しているといつでもタイプ(スペック)を変更更できる

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

33

EBSボリュームのアタッチ

Copyright copy 2011 Amazon Web Services

EC2インスタンスと同じゾーンに作ることを注意 スナップショットから複製も可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

34

EC2インスタンスのアドレス

  全てのインスタンスが下記を持つsect  Private IPアドレス(VPC内のサブネットから割り当てる)sect  Private DNS名(internal)sect  Public DNS名 (amazonawscom)

  public IPアドレスをオプションで付けられる   固定されたPublic IP Addresses はEIPと呼ぶ

sect  稼働しているEC2インスタンスに瞬時に付け外しが可能sect  インスタンスにアサインしているときは料料金金はかからない

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

35

EIPの割り当て

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

36

EIPの使いどころ

  通常のケースはEIPは必要なくEC2のPublic DNS名を用いてCNAMEで名前変換を行行う

  Route 53(名前解決サービス)でPublic DNSを用いる

  固定IPアドレスが必要なときに限りEIPを用いる   メールサーバー監視サーバー等

  メールサーバの送信制限解除逆引き申請が必要な場合は下記から申請を行行うhttpsaws-‐‑‒portalamazoncomgpawshtml-‐‑‒forms-‐‑‒controllercontactusec2-‐‑‒email-‐‑‒limit-‐‑‒rdns-‐‑‒request

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

37

リージョン間コピー(AMIEBS)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

38

Amazon EC2の関連サービス関連情報   監視負荷分散自動スケール

rarrCloudWatchELBAutoScaling   閉域網での利利用仮想ネットワーキング

rarrAmazon VPC (Virtual Private Cloud)   ① 社内ネットワークからVPN接続   ② ルーティングイントラIPアドレス仮想NIC等々

  占有サーバ rarrAmazon Dedicated Instance   専用線接続 rarrAmazon Direct Connect   Windowsemsp emsp  rarrWindowsインスタンス   スパコンrarrHPCインスタンス   アクセス管理理emsp  rarrIAM (Identity and Access Management)   料料金金関係emsp  rarrConsolidated Billing資料料集emsp httpawsamazoncomjpaws-‐‑‒meister

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

39

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

40

AWSのセキュリティの考え方

第三者認証

SOC 1SSAE 16ISAE 3402 ISO 27001 PCI DSS HIPAA ITAR

FISMA Moderate FIPS 140-2 ファシリティ

DC電源ネットワーク冗長化

Your Apps

Webサイトアプリケーションこれまでと同様のセキュリティを

お客様SI様で実現可能

インフラよりハイレベルの

セキュリティをAWSが提供

シェアードレスポンシビリティモデル(責任共有モデル)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

41

EC2の責任共有モデル

物理インタフェース

ファイアウォール

      ハイバーバイザー

Sm

all

Larg

e

hellip

Sm

all Amazon EC2

インスタンス

物理ホスト

ユーザーが 責任を持って 管理する

AWSが 責任を持って 管理する

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

42

ファイアウォールを実現するSecurity Group

  インスタンスのINOUTトラフィックを制限するファイアウォール機能

  デフォルトIN向けは全トラフィック閉

  必要な受信アクセスに対してアクセスルールを定義する

bull  プロトコル( TCPUDP)bull  宛先ポートbull  アクセス元IP Security Group

  ルールをひとまとめにしたテンプレートを Security Groupと呼ぶ

EC2 インスタンス

ポート22(SSH)

ポート80(HTTP)

EC2ファイアウォール

Security Group

ポート25(SMTP)

ポート22(SSH)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

43

Security Groupの使い方   インスタンスの用途に応じたSecurity Groupを用意する

bull  Webサーバ用DBサーバ用メールサーバ用等   アクセス元にSecurity Groupも設定して限定可能

Webサーバ

Webサーバ

DBサーバ

sg-1234

22 00000 80 00000 25 sg-1234

sg-1234

sg-1234

sg-abcd sg-abcd

22 00000 3306 sg-1234

Webサーバ

sg-xyz

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

44

セキュリティ証明書

仮想サーバ(Amazon EC2)Windows( スタンダード)

コマンドライン SDK利利用

SSH公開鍵認証

仮想デスクトップ

ターミナル

REST SOAPAPI

Webコンソール

①EC2インスタンスへのアクセスrarr鍵認証

②Webコンソールへのアクセス

rarrパスワード認証 多要素認証 IAM

③APIへのアクセスrarrアクセスキー X509証明書 IAM

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

45

Key Pair(キーペア)を用いた鍵認証   鍵認証はユーザ名パスワードの認証よりも安全な認証方式

ダウンロードされた秘密鍵

①キーペア作成

②インスタンス起動時にemsp emsp emsp 公開鍵をコピー

公開鍵

③公開鍵秘密鍵のペアが合致するとログイン可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

46

EC2のSLA13

sect  EC2の可用性が9995 sect 上記に満たない場合はServiceクレジットを返還する

sect 詳細は sect  httpawsamazoncomec2-sla

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

47

AWSセキュリティセンター 13

 日本語のホワイトペーパー bull  セキュリティ概要 bull  リスクとコンプライアンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

48

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

49

最近追加された機能

  VM Import for Linux   IAM EC2 Resource Permissions   リザーブドインスタンスの変更更可能に   SR-‐‑‒IOVネットワークDriverネットワーク性能向上

bull  C3 I2 R3インスタンスで対応

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

50

インスタンスのさらなる追加

  一般的な目的なら M3   Compute Optimizedなら C3   Memory Optimizedなら R3(もうすぐ)   GPUが必要なら G2   IOPS重視なら I2   Disk Based Storage ならHS1

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

51

Intel Processor Features

  m3 c3 cc2 g2 cr1 i2 r3の全てが対応

  AES New Instructions (AES-‐‑‒NI)bull  c1 cg1 m2でも対応

  Advanced Vector Extensions (Intel AVX)bull  HVMでのみ対応

  Turbo Boost Technology

  詳細は httpawsamazoncomec2instance-‐‑‒types

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

52

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

53

故障のための設計 Design for Failure   故障に備えた設計をしておく

  すべてが故障しうると考えシステム全体での保守的設計   SPOF(単一障害点)の排除   障害からの復復旧(対応品質)を重視する

  EC2における故障のための設計   AMIを常にとっておく   EBSスナップショットでバックアップ   複数アベイラビリティゾーンへの分散   ELBでサーバを冗長化Auto Scalingで自動復復帰   Reserved Instanceでキャパシティ保障

  他の冗長性高いサービスとの組み合わせ   S3 SimpleDB RDS他

httpwwwslidesharenetkentamagawaaws-‐‑‒7991623

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

54

定期的なバックアップ

  EC2のAMIを定期的に作成する   (参考) 無停止でAMI取得

Cloudpackさんブログhttpblogcloudpackjp201103aws-‐‑‒news-‐‑‒ec2-‐‑‒instance-‐‑‒no-‐‑‒reboot-‐‑‒amihtml

  データボリュームとしてのEBSの場合EBSのスナップショットを定期的に作成

  スクリプトを書いて定期的なバックアップを行行うことも可能 Coderockさんブログ

httpblogdateofrockcom201003auto-‐‑‒backup-‐‑‒amazon-‐‑‒ebs-‐‑‒with-‐‑‒rubyhtml   サーバーワークスさんブログ

httpblogserverworkscojptech20110721awssdk-‐‑‒for-‐‑‒ruby-‐‑‒create-‐‑‒snapshot

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

55

Instance StorageにSSDを積んだインスタンスが増えてきた

  EC2のタイプによって選択できるInstance Storeは以下の通り

Instance Type Instance Store Volumesm1small 1 x 160 GBdaggerm1medium 1 x 410 GBm1large 2 x 420 GB (840 GB)m1xlarge 4 x 420 GB (1680 GB)m2xlarge 1 x 420 GBm22xlarge 1 x 850 GBm24xlarge 2 x 840 GB (1680 GB)m3medium 1 x 4 GB SSDm3large 1 x 32 GB SSDm3xlarge 2 x 40 GB SSD (80 GB)m32xlarge 2 x 80 GB SSD (160 GB)

t1micro None (use Amazon EBS volumes)

c1medium 1 x 350 GBdaggerc1xlarge 4 x 420 GB (1680 GB)

Instance Type Instance Store Volumes

c3large 2 x 16 GB SSD (32 GB)c3xlarge 2 x 40 GB SSD (80 GB)c32xlarge 2 x 80 GB SSD (160 GB)c34xlarge 2 x 160 GB SSD (320 GB)c38xlarge 2 x 320 GB SSD (640 GB)cc28xlarge 4 x 840 GB (3360 GB)cg14xlarge 2 x 840 GB (1680 GB)cr18xlarge 2 x 120 GB SSD (240 GB)hi14xlarge 2 x 1024 GB SSD (2048 GB)hs18xlarge 24 x 2048 GB (49 TB)i2xlarge 1 x 800 GB SSDi22xlarge 2 x 800 GB SSD (1600 GB)i24xlarge 4 x 800 GB SSD (3200 GB)i28xlarge 8 x 800 GB SSD (6400 GB)

2014年年1月29日時点

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

56

Instance Storageを使うべきなのは

 高IOPS高帯域なストレージが必要な場合

 消えても良良い一次データの置き場として使う場合

 ストレージ冗長化を準備できる場合

S3活かしたいメリット

考慮すべき制約

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

57

EC2へのファイル転送は

  SCPを使う scp pk-‐‑‒XXXpem rootec2-‐‑‒XXXamazonawscomxxx

  Windowsの場合はWinSCPなど   S3経由で共有する

  S3にアップロードしEC2からwgetでアクセスする   FTPを立立ち上げる

  EC2側でFTPサーバーを立立ち上げておく

  高速に送信したい   Tsunami UDP Aspera等のソリューション

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

58

VM Import Export

  複数プラットフォームのVMイメージをAmazon EC2に移行行(インポートエクスポート)可能

httpawstypepadcomaws_japan201012vm-‐‑‒import-‐‑‒bring-‐‑‒your-‐‑‒vmware-‐‑‒images-‐‑‒to-‐‑‒the-‐‑‒cloudhtml

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

59

稼働EC2インスタンスからメタデータ取得

  ami-‐‑‒id   ami-‐‑‒launch-‐‑‒index   ami-‐‑‒manifest-‐‑‒path   block-‐‑‒device-‐‑‒mapping   hostname   instance-‐‑‒action   instance-‐‑‒id   Instance-‐‑‒type   kernel-‐‑‒id

  local-‐‑‒hostname   local-‐‑‒ipv4   mac   network   placement   profile   public-‐‑‒hostname   public-‐‑‒ipv4   public-‐‑‒keys   reservation-‐‑‒id

curl http169254169254latestmeta-‐‑‒data

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

60

起動時にパラメーターを渡す   起動時に16KB以内で任意のものを渡せる

  ChefやPuppetなどを利利用して自己構成できるAMIに   参照emsp AWSマイスターemsp CloudFormation資料料httpwwwslidesharenetkentamagawacloudformation-‐‑‒aws5

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

61

EC2コマンドラインツール amp AWS SDKs

  コマンドラインからEC2のAPIにアクセスできるツール   ツールをインストールしセキュリティ証明書を配置

  AWS SDKs httpawsamazoncomcode

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

62

マネージメントコンソールだけでなくAPIからプログラマブルにアクセス

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1a --instance-type m1small

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1b --instance-type m1small

Tokyo リージョン

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

63

EC2のスケジュールイベント表示機能

  EC2インスタンスが稼働しているハードかソフトにメンテナンスが必要な場合に情報を提供する仕組み

  インスタンスリブートシステムリブートリタイヤ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

64

EC2のステータスチェック機能

  下記の2種類のチェックを自動テストで実行行し情報を提示   システムステータスチェック

  EC2インスタンスにネットワークパケットが通るかチェック   インスタンスステータスチェック

  EC2インスタンスのOSがネットワークパケットを受け取るかチェック

  もし状況に乖離離がある場合はレポートできます

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

65

AWS制限増加申請

  EC2を誤って大量量に作成しないよう最大インスタンス数の上限を20に制限しています

  制限増加申請フォームで各種制限の増加を行行えますbull  httpawsamazoncomjpcontact-‐‑‒usemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

66

既存EBSボリュームのサイズ変更更

  例例 10GB -‐‑‒gt 100GB変更更への流流れ   EBSをデタッチする   EBSからS3にスナップショットを作成する

  新たなボリュームサイズを指定してEBSを作成する

  EBSをアタッチする   マウントしてリサイズする

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

スナップショット

EBS (10GB)

EBS (100GB)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

67

EBSとS3

EBSは複数EC2にアタッチ不不可   単独のEC2インスタンスへのブロックデバイスとしての使い方

  NFSのような使い方をする際はEC2にミドルウェアを導入(GlusterFS等)

S3は複数のEC2からアクセス可   ただしWrite Once Read A Lotな使い方に向いている

  アップロード並列列化も使える   耐久性の設計は99999999999で非常に高い

Copyright copy 2011 Amazon Web Services

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

バケット

EBS

EC2インスタンス

HTTPHTTPS

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

68

EIP使用時の注意点

  グローバルIP(EIP)を用いた場合インターネット経由のアクセスとなり課金発生するケースがある

  名前解決したいサーバに固定IPを付与する13   各サーバは固定グローバルIPを元に

AWSのDNSに名前を問い合わせ13   問い合わせた結果返ってくる外部DNS名でサーバにアクセスを行う13   EC2内部で外部DNS名を使ってアクセスすると プライベートIPアドレスに変換されるため 目的のサーバにプライベートIPでアクセスできる13

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

69

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

70

AWSの課金金の仕組みインターネット

ELB

EC2

EBS

S3

データ転送量量

ELB利利用料料データ処理理量量

インスタンスタイプ別利利用料料

EBSの利利用料料

S3の利利用料料

大半を占める

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

71

Simple Monthly Calculator

  Web上にある計算機を使って概算費用を計算できますsect  httpcalculators3amazonawscomcalc5htmllng=ja_JP

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

72

複数の価格モデル

 課金金モデルが選べるsect 通常の時間課金金のオンデマンドインスタンス

sect ある程度度継続してEC2を使う(1年年3年年)EC2リザーブドインスタンス

sect 入札を利利用してより安く使うEC2スポットインスタンス

rarrマイスターシリーズ RIampスポットインスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

73

AWS無料料試用枠

  AWSでは無料料試用枠を用意していますbull  httpawsamazoncomjpfreeemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

74

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

75

Appendix

  参考資料料bull  Amazon Glacier Developer Guidehttpdocsamazonwebservicescomamazonglacierlatestdevintroductionhtml

bull  Amazon Glacier FAQhttpawsamazoncomjpglacierfaqs

bull  Amazon Glaceir価格httpawsamazoncomjpglacierpricing

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

76

QampA

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 11: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

11

Amazon Elastic Block Store (EBS)

EBSとはEC2に仮想外付けされるブロックレベルのストレージサービス

  サイズは1GB単位で〜~1TBまで   サイズ期間(IO)で課金金される   各EC2インスタンスで複数EBSを使える詳細   データは永続的に保存される   いつでもバックアップ(スナップショット)   スナップショットからEBSを作成可能(他のAZに作成できる)

  Provisioned IOPSでIOパフォーマンス指定bull  2014年年3月時点で最大4000IOPS

  他のEC2インスタンスに付け替え可能

Region

Availability Zone - a

EBS EBS EBS

Availability Zone - b

EBS EBS

Amazon S3

EBSスナップショット

EC2 EC2

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

12

Instance StorageとEBS

EC2

Instance Storage bull  内蔵ディスク bull  EC2と不可分 bull  EC2をStopTerminateするとクリアされる bull  性能容量はインスタンスタイプごとに規定 bull  追加費用なし

EBS bull  ネットワークで接続 bull  EC2とは独立管理 bull  EC2をTerminateしてもEBSは保持可能 bull  Volumeごとに性能容量を定義可能 bull  EBSの費用が発生

物理的には ネットワーク経由

EC2に関連する主要コンポーネントリージョン

アベイラビリティゾーン

Amazon CloudWatch

Auto Scaling

Amazon Elastic Block Storage

(EBS)

Amazon Machine Image (AMI)

Elastic IP

Amazon Virtual Private Cloud

(VPC)

Elastic Load Balancer

Snapshot

Amazon Elastic Compute Cloud

(EC2)

Key Pairs

AWS Management Console

Security Groups

VM ImportExport

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

14

今日のAgenda

 Amazon EC2とは  Amazon EC2の基本

bull  触ってみようbull  基本コンセプト

 Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

15

マネジメントコンソールからログイン

  作成したアカウントのメールアドレスパスワードでログインbull  httpsconsoleawsamazoncomec2home emsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

16

AWSサービスの選択   Webコンソールでコントロールするサービスを選ぶ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

17

リージョン選択   日本にいながら世界中のどのリージョンも選択できる

XXXX

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

18

AMI選択   任意のAMIを選ぶことで好みの環境 (OSミドルウェアアプリデータ) を選択できる

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

19

台数インスタンスタイプアベイラビリティゾーンの指定

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

20

EBSの設定

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

21

Key Pair選択   いわゆる公開鍵方式でサーバーにアクセスする初回時は秘密鍵を手元にダウンロードする

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

22

Security Groups選択

  いわゆるファイアウォールの設定作っておいたグループをサーバーに割り当てる

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

23

起動完了了

  起動完了了画面を確認し起動ウィザードを終了了

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

24

起動したインスタンスの情報確認XXXXX

パブリックDNS名

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

25

ターミナルでアクセス

ログインの際のアカウント名はAMIによって違うので注意 例) Amazon Linux -gt ec2-user その他Linuxの多く -gt root admin等

パブリックDNS名

秘密鍵

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

26

今日のAgenda

 Amazon EC2とは  Amazon EC2の基本

bull  触ってみようbull  基本コンセプト

 Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

27

Amazon Machine Image (AMI)

  AMIはインスタンス作成に使用するイメージテンプレート   AWS公式AMIやサードパーティもAMIを提供

bull  httpsawsamazoncomamisbull  httpsawsamazoncommarketplaceemsp 

  選択したAMIから起動する   EC2インスタンスから任意のタイミングでカスタムAMIを作成できる

launch

Amazon Machine Image (AMI)

Amazon EC2インスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

28

AMIとインスタンスAZの関係

インスタンス

Amazon S3

AMI

Availability Zone-1a Availability Zone-1b

カスタム AMI

AMIからインスタンスを起動

カスタムAMIを使ってインスタンスを複数台起動

カスタムAMIを作成必要に応じて共有設定

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

29

AMIの取得AMIからの起動

Copyright copy 2011 Amazon Web Services

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

30

EC2インスタンスのライフサイクル   起動したインスタンスは3つの状態を持つ

bull  Running 実行行中課金金されるbull  Stopped 停止中課金金されないbull  Terminated 終了了StopStartはできない

Running

Terminated

Stopped

StartStop

Terminate

launch

Terminate

Amazon Machine Image (AMI)

Amazon EC2インスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

31

EC2インスタンスの停止と終了了

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

32

EC2インスタンスのタイプ変更Stop(停止)しているといつでもタイプ(スペック)を変更更できる

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

33

EBSボリュームのアタッチ

Copyright copy 2011 Amazon Web Services

EC2インスタンスと同じゾーンに作ることを注意 スナップショットから複製も可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

34

EC2インスタンスのアドレス

  全てのインスタンスが下記を持つsect  Private IPアドレス(VPC内のサブネットから割り当てる)sect  Private DNS名(internal)sect  Public DNS名 (amazonawscom)

  public IPアドレスをオプションで付けられる   固定されたPublic IP Addresses はEIPと呼ぶ

sect  稼働しているEC2インスタンスに瞬時に付け外しが可能sect  インスタンスにアサインしているときは料料金金はかからない

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

35

EIPの割り当て

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

36

EIPの使いどころ

  通常のケースはEIPは必要なくEC2のPublic DNS名を用いてCNAMEで名前変換を行行う

  Route 53(名前解決サービス)でPublic DNSを用いる

  固定IPアドレスが必要なときに限りEIPを用いる   メールサーバー監視サーバー等

  メールサーバの送信制限解除逆引き申請が必要な場合は下記から申請を行行うhttpsaws-‐‑‒portalamazoncomgpawshtml-‐‑‒forms-‐‑‒controllercontactusec2-‐‑‒email-‐‑‒limit-‐‑‒rdns-‐‑‒request

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

37

リージョン間コピー(AMIEBS)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

38

Amazon EC2の関連サービス関連情報   監視負荷分散自動スケール

rarrCloudWatchELBAutoScaling   閉域網での利利用仮想ネットワーキング

rarrAmazon VPC (Virtual Private Cloud)   ① 社内ネットワークからVPN接続   ② ルーティングイントラIPアドレス仮想NIC等々

  占有サーバ rarrAmazon Dedicated Instance   専用線接続 rarrAmazon Direct Connect   Windowsemsp emsp  rarrWindowsインスタンス   スパコンrarrHPCインスタンス   アクセス管理理emsp  rarrIAM (Identity and Access Management)   料料金金関係emsp  rarrConsolidated Billing資料料集emsp httpawsamazoncomjpaws-‐‑‒meister

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

39

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

40

AWSのセキュリティの考え方

第三者認証

SOC 1SSAE 16ISAE 3402 ISO 27001 PCI DSS HIPAA ITAR

FISMA Moderate FIPS 140-2 ファシリティ

DC電源ネットワーク冗長化

Your Apps

Webサイトアプリケーションこれまでと同様のセキュリティを

お客様SI様で実現可能

インフラよりハイレベルの

セキュリティをAWSが提供

シェアードレスポンシビリティモデル(責任共有モデル)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

41

EC2の責任共有モデル

物理インタフェース

ファイアウォール

      ハイバーバイザー

Sm

all

Larg

e

hellip

Sm

all Amazon EC2

インスタンス

物理ホスト

ユーザーが 責任を持って 管理する

AWSが 責任を持って 管理する

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

42

ファイアウォールを実現するSecurity Group

  インスタンスのINOUTトラフィックを制限するファイアウォール機能

  デフォルトIN向けは全トラフィック閉

  必要な受信アクセスに対してアクセスルールを定義する

bull  プロトコル( TCPUDP)bull  宛先ポートbull  アクセス元IP Security Group

  ルールをひとまとめにしたテンプレートを Security Groupと呼ぶ

EC2 インスタンス

ポート22(SSH)

ポート80(HTTP)

EC2ファイアウォール

Security Group

ポート25(SMTP)

ポート22(SSH)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

43

Security Groupの使い方   インスタンスの用途に応じたSecurity Groupを用意する

bull  Webサーバ用DBサーバ用メールサーバ用等   アクセス元にSecurity Groupも設定して限定可能

Webサーバ

Webサーバ

DBサーバ

sg-1234

22 00000 80 00000 25 sg-1234

sg-1234

sg-1234

sg-abcd sg-abcd

22 00000 3306 sg-1234

Webサーバ

sg-xyz

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

44

セキュリティ証明書

仮想サーバ(Amazon EC2)Windows( スタンダード)

コマンドライン SDK利利用

SSH公開鍵認証

仮想デスクトップ

ターミナル

REST SOAPAPI

Webコンソール

①EC2インスタンスへのアクセスrarr鍵認証

②Webコンソールへのアクセス

rarrパスワード認証 多要素認証 IAM

③APIへのアクセスrarrアクセスキー X509証明書 IAM

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

45

Key Pair(キーペア)を用いた鍵認証   鍵認証はユーザ名パスワードの認証よりも安全な認証方式

ダウンロードされた秘密鍵

①キーペア作成

②インスタンス起動時にemsp emsp emsp 公開鍵をコピー

公開鍵

③公開鍵秘密鍵のペアが合致するとログイン可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

46

EC2のSLA13

sect  EC2の可用性が9995 sect 上記に満たない場合はServiceクレジットを返還する

sect 詳細は sect  httpawsamazoncomec2-sla

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

47

AWSセキュリティセンター 13

 日本語のホワイトペーパー bull  セキュリティ概要 bull  リスクとコンプライアンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

48

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

49

最近追加された機能

  VM Import for Linux   IAM EC2 Resource Permissions   リザーブドインスタンスの変更更可能に   SR-‐‑‒IOVネットワークDriverネットワーク性能向上

bull  C3 I2 R3インスタンスで対応

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

50

インスタンスのさらなる追加

  一般的な目的なら M3   Compute Optimizedなら C3   Memory Optimizedなら R3(もうすぐ)   GPUが必要なら G2   IOPS重視なら I2   Disk Based Storage ならHS1

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

51

Intel Processor Features

  m3 c3 cc2 g2 cr1 i2 r3の全てが対応

  AES New Instructions (AES-‐‑‒NI)bull  c1 cg1 m2でも対応

  Advanced Vector Extensions (Intel AVX)bull  HVMでのみ対応

  Turbo Boost Technology

  詳細は httpawsamazoncomec2instance-‐‑‒types

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

52

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

53

故障のための設計 Design for Failure   故障に備えた設計をしておく

  すべてが故障しうると考えシステム全体での保守的設計   SPOF(単一障害点)の排除   障害からの復復旧(対応品質)を重視する

  EC2における故障のための設計   AMIを常にとっておく   EBSスナップショットでバックアップ   複数アベイラビリティゾーンへの分散   ELBでサーバを冗長化Auto Scalingで自動復復帰   Reserved Instanceでキャパシティ保障

  他の冗長性高いサービスとの組み合わせ   S3 SimpleDB RDS他

httpwwwslidesharenetkentamagawaaws-‐‑‒7991623

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

54

定期的なバックアップ

  EC2のAMIを定期的に作成する   (参考) 無停止でAMI取得

Cloudpackさんブログhttpblogcloudpackjp201103aws-‐‑‒news-‐‑‒ec2-‐‑‒instance-‐‑‒no-‐‑‒reboot-‐‑‒amihtml

  データボリュームとしてのEBSの場合EBSのスナップショットを定期的に作成

  スクリプトを書いて定期的なバックアップを行行うことも可能 Coderockさんブログ

httpblogdateofrockcom201003auto-‐‑‒backup-‐‑‒amazon-‐‑‒ebs-‐‑‒with-‐‑‒rubyhtml   サーバーワークスさんブログ

httpblogserverworkscojptech20110721awssdk-‐‑‒for-‐‑‒ruby-‐‑‒create-‐‑‒snapshot

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

55

Instance StorageにSSDを積んだインスタンスが増えてきた

  EC2のタイプによって選択できるInstance Storeは以下の通り

Instance Type Instance Store Volumesm1small 1 x 160 GBdaggerm1medium 1 x 410 GBm1large 2 x 420 GB (840 GB)m1xlarge 4 x 420 GB (1680 GB)m2xlarge 1 x 420 GBm22xlarge 1 x 850 GBm24xlarge 2 x 840 GB (1680 GB)m3medium 1 x 4 GB SSDm3large 1 x 32 GB SSDm3xlarge 2 x 40 GB SSD (80 GB)m32xlarge 2 x 80 GB SSD (160 GB)

t1micro None (use Amazon EBS volumes)

c1medium 1 x 350 GBdaggerc1xlarge 4 x 420 GB (1680 GB)

Instance Type Instance Store Volumes

c3large 2 x 16 GB SSD (32 GB)c3xlarge 2 x 40 GB SSD (80 GB)c32xlarge 2 x 80 GB SSD (160 GB)c34xlarge 2 x 160 GB SSD (320 GB)c38xlarge 2 x 320 GB SSD (640 GB)cc28xlarge 4 x 840 GB (3360 GB)cg14xlarge 2 x 840 GB (1680 GB)cr18xlarge 2 x 120 GB SSD (240 GB)hi14xlarge 2 x 1024 GB SSD (2048 GB)hs18xlarge 24 x 2048 GB (49 TB)i2xlarge 1 x 800 GB SSDi22xlarge 2 x 800 GB SSD (1600 GB)i24xlarge 4 x 800 GB SSD (3200 GB)i28xlarge 8 x 800 GB SSD (6400 GB)

2014年年1月29日時点

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

56

Instance Storageを使うべきなのは

 高IOPS高帯域なストレージが必要な場合

 消えても良良い一次データの置き場として使う場合

 ストレージ冗長化を準備できる場合

S3活かしたいメリット

考慮すべき制約

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

57

EC2へのファイル転送は

  SCPを使う scp pk-‐‑‒XXXpem rootec2-‐‑‒XXXamazonawscomxxx

  Windowsの場合はWinSCPなど   S3経由で共有する

  S3にアップロードしEC2からwgetでアクセスする   FTPを立立ち上げる

  EC2側でFTPサーバーを立立ち上げておく

  高速に送信したい   Tsunami UDP Aspera等のソリューション

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

58

VM Import Export

  複数プラットフォームのVMイメージをAmazon EC2に移行行(インポートエクスポート)可能

httpawstypepadcomaws_japan201012vm-‐‑‒import-‐‑‒bring-‐‑‒your-‐‑‒vmware-‐‑‒images-‐‑‒to-‐‑‒the-‐‑‒cloudhtml

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

59

稼働EC2インスタンスからメタデータ取得

  ami-‐‑‒id   ami-‐‑‒launch-‐‑‒index   ami-‐‑‒manifest-‐‑‒path   block-‐‑‒device-‐‑‒mapping   hostname   instance-‐‑‒action   instance-‐‑‒id   Instance-‐‑‒type   kernel-‐‑‒id

  local-‐‑‒hostname   local-‐‑‒ipv4   mac   network   placement   profile   public-‐‑‒hostname   public-‐‑‒ipv4   public-‐‑‒keys   reservation-‐‑‒id

curl http169254169254latestmeta-‐‑‒data

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

60

起動時にパラメーターを渡す   起動時に16KB以内で任意のものを渡せる

  ChefやPuppetなどを利利用して自己構成できるAMIに   参照emsp AWSマイスターemsp CloudFormation資料料httpwwwslidesharenetkentamagawacloudformation-‐‑‒aws5

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

61

EC2コマンドラインツール amp AWS SDKs

  コマンドラインからEC2のAPIにアクセスできるツール   ツールをインストールしセキュリティ証明書を配置

  AWS SDKs httpawsamazoncomcode

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

62

マネージメントコンソールだけでなくAPIからプログラマブルにアクセス

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1a --instance-type m1small

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1b --instance-type m1small

Tokyo リージョン

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

63

EC2のスケジュールイベント表示機能

  EC2インスタンスが稼働しているハードかソフトにメンテナンスが必要な場合に情報を提供する仕組み

  インスタンスリブートシステムリブートリタイヤ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

64

EC2のステータスチェック機能

  下記の2種類のチェックを自動テストで実行行し情報を提示   システムステータスチェック

  EC2インスタンスにネットワークパケットが通るかチェック   インスタンスステータスチェック

  EC2インスタンスのOSがネットワークパケットを受け取るかチェック

  もし状況に乖離離がある場合はレポートできます

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

65

AWS制限増加申請

  EC2を誤って大量量に作成しないよう最大インスタンス数の上限を20に制限しています

  制限増加申請フォームで各種制限の増加を行行えますbull  httpawsamazoncomjpcontact-‐‑‒usemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

66

既存EBSボリュームのサイズ変更更

  例例 10GB -‐‑‒gt 100GB変更更への流流れ   EBSをデタッチする   EBSからS3にスナップショットを作成する

  新たなボリュームサイズを指定してEBSを作成する

  EBSをアタッチする   マウントしてリサイズする

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

スナップショット

EBS (10GB)

EBS (100GB)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

67

EBSとS3

EBSは複数EC2にアタッチ不不可   単独のEC2インスタンスへのブロックデバイスとしての使い方

  NFSのような使い方をする際はEC2にミドルウェアを導入(GlusterFS等)

S3は複数のEC2からアクセス可   ただしWrite Once Read A Lotな使い方に向いている

  アップロード並列列化も使える   耐久性の設計は99999999999で非常に高い

Copyright copy 2011 Amazon Web Services

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

バケット

EBS

EC2インスタンス

HTTPHTTPS

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

68

EIP使用時の注意点

  グローバルIP(EIP)を用いた場合インターネット経由のアクセスとなり課金発生するケースがある

  名前解決したいサーバに固定IPを付与する13   各サーバは固定グローバルIPを元に

AWSのDNSに名前を問い合わせ13   問い合わせた結果返ってくる外部DNS名でサーバにアクセスを行う13   EC2内部で外部DNS名を使ってアクセスすると プライベートIPアドレスに変換されるため 目的のサーバにプライベートIPでアクセスできる13

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

69

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

70

AWSの課金金の仕組みインターネット

ELB

EC2

EBS

S3

データ転送量量

ELB利利用料料データ処理理量量

インスタンスタイプ別利利用料料

EBSの利利用料料

S3の利利用料料

大半を占める

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

71

Simple Monthly Calculator

  Web上にある計算機を使って概算費用を計算できますsect  httpcalculators3amazonawscomcalc5htmllng=ja_JP

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

72

複数の価格モデル

 課金金モデルが選べるsect 通常の時間課金金のオンデマンドインスタンス

sect ある程度度継続してEC2を使う(1年年3年年)EC2リザーブドインスタンス

sect 入札を利利用してより安く使うEC2スポットインスタンス

rarrマイスターシリーズ RIampスポットインスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

73

AWS無料料試用枠

  AWSでは無料料試用枠を用意していますbull  httpawsamazoncomjpfreeemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

74

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

75

Appendix

  参考資料料bull  Amazon Glacier Developer Guidehttpdocsamazonwebservicescomamazonglacierlatestdevintroductionhtml

bull  Amazon Glacier FAQhttpawsamazoncomjpglacierfaqs

bull  Amazon Glaceir価格httpawsamazoncomjpglacierpricing

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

76

QampA

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 12: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

12

Instance StorageとEBS

EC2

Instance Storage bull  内蔵ディスク bull  EC2と不可分 bull  EC2をStopTerminateするとクリアされる bull  性能容量はインスタンスタイプごとに規定 bull  追加費用なし

EBS bull  ネットワークで接続 bull  EC2とは独立管理 bull  EC2をTerminateしてもEBSは保持可能 bull  Volumeごとに性能容量を定義可能 bull  EBSの費用が発生

物理的には ネットワーク経由

EC2に関連する主要コンポーネントリージョン

アベイラビリティゾーン

Amazon CloudWatch

Auto Scaling

Amazon Elastic Block Storage

(EBS)

Amazon Machine Image (AMI)

Elastic IP

Amazon Virtual Private Cloud

(VPC)

Elastic Load Balancer

Snapshot

Amazon Elastic Compute Cloud

(EC2)

Key Pairs

AWS Management Console

Security Groups

VM ImportExport

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

14

今日のAgenda

 Amazon EC2とは  Amazon EC2の基本

bull  触ってみようbull  基本コンセプト

 Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

15

マネジメントコンソールからログイン

  作成したアカウントのメールアドレスパスワードでログインbull  httpsconsoleawsamazoncomec2home emsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

16

AWSサービスの選択   Webコンソールでコントロールするサービスを選ぶ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

17

リージョン選択   日本にいながら世界中のどのリージョンも選択できる

XXXX

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

18

AMI選択   任意のAMIを選ぶことで好みの環境 (OSミドルウェアアプリデータ) を選択できる

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

19

台数インスタンスタイプアベイラビリティゾーンの指定

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

20

EBSの設定

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

21

Key Pair選択   いわゆる公開鍵方式でサーバーにアクセスする初回時は秘密鍵を手元にダウンロードする

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

22

Security Groups選択

  いわゆるファイアウォールの設定作っておいたグループをサーバーに割り当てる

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

23

起動完了了

  起動完了了画面を確認し起動ウィザードを終了了

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

24

起動したインスタンスの情報確認XXXXX

パブリックDNS名

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

25

ターミナルでアクセス

ログインの際のアカウント名はAMIによって違うので注意 例) Amazon Linux -gt ec2-user その他Linuxの多く -gt root admin等

パブリックDNS名

秘密鍵

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

26

今日のAgenda

 Amazon EC2とは  Amazon EC2の基本

bull  触ってみようbull  基本コンセプト

 Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

27

Amazon Machine Image (AMI)

  AMIはインスタンス作成に使用するイメージテンプレート   AWS公式AMIやサードパーティもAMIを提供

bull  httpsawsamazoncomamisbull  httpsawsamazoncommarketplaceemsp 

  選択したAMIから起動する   EC2インスタンスから任意のタイミングでカスタムAMIを作成できる

launch

Amazon Machine Image (AMI)

Amazon EC2インスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

28

AMIとインスタンスAZの関係

インスタンス

Amazon S3

AMI

Availability Zone-1a Availability Zone-1b

カスタム AMI

AMIからインスタンスを起動

カスタムAMIを使ってインスタンスを複数台起動

カスタムAMIを作成必要に応じて共有設定

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

29

AMIの取得AMIからの起動

Copyright copy 2011 Amazon Web Services

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

30

EC2インスタンスのライフサイクル   起動したインスタンスは3つの状態を持つ

bull  Running 実行行中課金金されるbull  Stopped 停止中課金金されないbull  Terminated 終了了StopStartはできない

Running

Terminated

Stopped

StartStop

Terminate

launch

Terminate

Amazon Machine Image (AMI)

Amazon EC2インスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

31

EC2インスタンスの停止と終了了

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

32

EC2インスタンスのタイプ変更Stop(停止)しているといつでもタイプ(スペック)を変更更できる

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

33

EBSボリュームのアタッチ

Copyright copy 2011 Amazon Web Services

EC2インスタンスと同じゾーンに作ることを注意 スナップショットから複製も可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

34

EC2インスタンスのアドレス

  全てのインスタンスが下記を持つsect  Private IPアドレス(VPC内のサブネットから割り当てる)sect  Private DNS名(internal)sect  Public DNS名 (amazonawscom)

  public IPアドレスをオプションで付けられる   固定されたPublic IP Addresses はEIPと呼ぶ

sect  稼働しているEC2インスタンスに瞬時に付け外しが可能sect  インスタンスにアサインしているときは料料金金はかからない

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

35

EIPの割り当て

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

36

EIPの使いどころ

  通常のケースはEIPは必要なくEC2のPublic DNS名を用いてCNAMEで名前変換を行行う

  Route 53(名前解決サービス)でPublic DNSを用いる

  固定IPアドレスが必要なときに限りEIPを用いる   メールサーバー監視サーバー等

  メールサーバの送信制限解除逆引き申請が必要な場合は下記から申請を行行うhttpsaws-‐‑‒portalamazoncomgpawshtml-‐‑‒forms-‐‑‒controllercontactusec2-‐‑‒email-‐‑‒limit-‐‑‒rdns-‐‑‒request

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

37

リージョン間コピー(AMIEBS)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

38

Amazon EC2の関連サービス関連情報   監視負荷分散自動スケール

rarrCloudWatchELBAutoScaling   閉域網での利利用仮想ネットワーキング

rarrAmazon VPC (Virtual Private Cloud)   ① 社内ネットワークからVPN接続   ② ルーティングイントラIPアドレス仮想NIC等々

  占有サーバ rarrAmazon Dedicated Instance   専用線接続 rarrAmazon Direct Connect   Windowsemsp emsp  rarrWindowsインスタンス   スパコンrarrHPCインスタンス   アクセス管理理emsp  rarrIAM (Identity and Access Management)   料料金金関係emsp  rarrConsolidated Billing資料料集emsp httpawsamazoncomjpaws-‐‑‒meister

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

39

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

40

AWSのセキュリティの考え方

第三者認証

SOC 1SSAE 16ISAE 3402 ISO 27001 PCI DSS HIPAA ITAR

FISMA Moderate FIPS 140-2 ファシリティ

DC電源ネットワーク冗長化

Your Apps

Webサイトアプリケーションこれまでと同様のセキュリティを

お客様SI様で実現可能

インフラよりハイレベルの

セキュリティをAWSが提供

シェアードレスポンシビリティモデル(責任共有モデル)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

41

EC2の責任共有モデル

物理インタフェース

ファイアウォール

      ハイバーバイザー

Sm

all

Larg

e

hellip

Sm

all Amazon EC2

インスタンス

物理ホスト

ユーザーが 責任を持って 管理する

AWSが 責任を持って 管理する

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

42

ファイアウォールを実現するSecurity Group

  インスタンスのINOUTトラフィックを制限するファイアウォール機能

  デフォルトIN向けは全トラフィック閉

  必要な受信アクセスに対してアクセスルールを定義する

bull  プロトコル( TCPUDP)bull  宛先ポートbull  アクセス元IP Security Group

  ルールをひとまとめにしたテンプレートを Security Groupと呼ぶ

EC2 インスタンス

ポート22(SSH)

ポート80(HTTP)

EC2ファイアウォール

Security Group

ポート25(SMTP)

ポート22(SSH)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

43

Security Groupの使い方   インスタンスの用途に応じたSecurity Groupを用意する

bull  Webサーバ用DBサーバ用メールサーバ用等   アクセス元にSecurity Groupも設定して限定可能

Webサーバ

Webサーバ

DBサーバ

sg-1234

22 00000 80 00000 25 sg-1234

sg-1234

sg-1234

sg-abcd sg-abcd

22 00000 3306 sg-1234

Webサーバ

sg-xyz

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

44

セキュリティ証明書

仮想サーバ(Amazon EC2)Windows( スタンダード)

コマンドライン SDK利利用

SSH公開鍵認証

仮想デスクトップ

ターミナル

REST SOAPAPI

Webコンソール

①EC2インスタンスへのアクセスrarr鍵認証

②Webコンソールへのアクセス

rarrパスワード認証 多要素認証 IAM

③APIへのアクセスrarrアクセスキー X509証明書 IAM

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

45

Key Pair(キーペア)を用いた鍵認証   鍵認証はユーザ名パスワードの認証よりも安全な認証方式

ダウンロードされた秘密鍵

①キーペア作成

②インスタンス起動時にemsp emsp emsp 公開鍵をコピー

公開鍵

③公開鍵秘密鍵のペアが合致するとログイン可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

46

EC2のSLA13

sect  EC2の可用性が9995 sect 上記に満たない場合はServiceクレジットを返還する

sect 詳細は sect  httpawsamazoncomec2-sla

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

47

AWSセキュリティセンター 13

 日本語のホワイトペーパー bull  セキュリティ概要 bull  リスクとコンプライアンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

48

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

49

最近追加された機能

  VM Import for Linux   IAM EC2 Resource Permissions   リザーブドインスタンスの変更更可能に   SR-‐‑‒IOVネットワークDriverネットワーク性能向上

bull  C3 I2 R3インスタンスで対応

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

50

インスタンスのさらなる追加

  一般的な目的なら M3   Compute Optimizedなら C3   Memory Optimizedなら R3(もうすぐ)   GPUが必要なら G2   IOPS重視なら I2   Disk Based Storage ならHS1

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

51

Intel Processor Features

  m3 c3 cc2 g2 cr1 i2 r3の全てが対応

  AES New Instructions (AES-‐‑‒NI)bull  c1 cg1 m2でも対応

  Advanced Vector Extensions (Intel AVX)bull  HVMでのみ対応

  Turbo Boost Technology

  詳細は httpawsamazoncomec2instance-‐‑‒types

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

52

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

53

故障のための設計 Design for Failure   故障に備えた設計をしておく

  すべてが故障しうると考えシステム全体での保守的設計   SPOF(単一障害点)の排除   障害からの復復旧(対応品質)を重視する

  EC2における故障のための設計   AMIを常にとっておく   EBSスナップショットでバックアップ   複数アベイラビリティゾーンへの分散   ELBでサーバを冗長化Auto Scalingで自動復復帰   Reserved Instanceでキャパシティ保障

  他の冗長性高いサービスとの組み合わせ   S3 SimpleDB RDS他

httpwwwslidesharenetkentamagawaaws-‐‑‒7991623

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

54

定期的なバックアップ

  EC2のAMIを定期的に作成する   (参考) 無停止でAMI取得

Cloudpackさんブログhttpblogcloudpackjp201103aws-‐‑‒news-‐‑‒ec2-‐‑‒instance-‐‑‒no-‐‑‒reboot-‐‑‒amihtml

  データボリュームとしてのEBSの場合EBSのスナップショットを定期的に作成

  スクリプトを書いて定期的なバックアップを行行うことも可能 Coderockさんブログ

httpblogdateofrockcom201003auto-‐‑‒backup-‐‑‒amazon-‐‑‒ebs-‐‑‒with-‐‑‒rubyhtml   サーバーワークスさんブログ

httpblogserverworkscojptech20110721awssdk-‐‑‒for-‐‑‒ruby-‐‑‒create-‐‑‒snapshot

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

55

Instance StorageにSSDを積んだインスタンスが増えてきた

  EC2のタイプによって選択できるInstance Storeは以下の通り

Instance Type Instance Store Volumesm1small 1 x 160 GBdaggerm1medium 1 x 410 GBm1large 2 x 420 GB (840 GB)m1xlarge 4 x 420 GB (1680 GB)m2xlarge 1 x 420 GBm22xlarge 1 x 850 GBm24xlarge 2 x 840 GB (1680 GB)m3medium 1 x 4 GB SSDm3large 1 x 32 GB SSDm3xlarge 2 x 40 GB SSD (80 GB)m32xlarge 2 x 80 GB SSD (160 GB)

t1micro None (use Amazon EBS volumes)

c1medium 1 x 350 GBdaggerc1xlarge 4 x 420 GB (1680 GB)

Instance Type Instance Store Volumes

c3large 2 x 16 GB SSD (32 GB)c3xlarge 2 x 40 GB SSD (80 GB)c32xlarge 2 x 80 GB SSD (160 GB)c34xlarge 2 x 160 GB SSD (320 GB)c38xlarge 2 x 320 GB SSD (640 GB)cc28xlarge 4 x 840 GB (3360 GB)cg14xlarge 2 x 840 GB (1680 GB)cr18xlarge 2 x 120 GB SSD (240 GB)hi14xlarge 2 x 1024 GB SSD (2048 GB)hs18xlarge 24 x 2048 GB (49 TB)i2xlarge 1 x 800 GB SSDi22xlarge 2 x 800 GB SSD (1600 GB)i24xlarge 4 x 800 GB SSD (3200 GB)i28xlarge 8 x 800 GB SSD (6400 GB)

2014年年1月29日時点

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

56

Instance Storageを使うべきなのは

 高IOPS高帯域なストレージが必要な場合

 消えても良良い一次データの置き場として使う場合

 ストレージ冗長化を準備できる場合

S3活かしたいメリット

考慮すべき制約

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

57

EC2へのファイル転送は

  SCPを使う scp pk-‐‑‒XXXpem rootec2-‐‑‒XXXamazonawscomxxx

  Windowsの場合はWinSCPなど   S3経由で共有する

  S3にアップロードしEC2からwgetでアクセスする   FTPを立立ち上げる

  EC2側でFTPサーバーを立立ち上げておく

  高速に送信したい   Tsunami UDP Aspera等のソリューション

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

58

VM Import Export

  複数プラットフォームのVMイメージをAmazon EC2に移行行(インポートエクスポート)可能

httpawstypepadcomaws_japan201012vm-‐‑‒import-‐‑‒bring-‐‑‒your-‐‑‒vmware-‐‑‒images-‐‑‒to-‐‑‒the-‐‑‒cloudhtml

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

59

稼働EC2インスタンスからメタデータ取得

  ami-‐‑‒id   ami-‐‑‒launch-‐‑‒index   ami-‐‑‒manifest-‐‑‒path   block-‐‑‒device-‐‑‒mapping   hostname   instance-‐‑‒action   instance-‐‑‒id   Instance-‐‑‒type   kernel-‐‑‒id

  local-‐‑‒hostname   local-‐‑‒ipv4   mac   network   placement   profile   public-‐‑‒hostname   public-‐‑‒ipv4   public-‐‑‒keys   reservation-‐‑‒id

curl http169254169254latestmeta-‐‑‒data

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

60

起動時にパラメーターを渡す   起動時に16KB以内で任意のものを渡せる

  ChefやPuppetなどを利利用して自己構成できるAMIに   参照emsp AWSマイスターemsp CloudFormation資料料httpwwwslidesharenetkentamagawacloudformation-‐‑‒aws5

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

61

EC2コマンドラインツール amp AWS SDKs

  コマンドラインからEC2のAPIにアクセスできるツール   ツールをインストールしセキュリティ証明書を配置

  AWS SDKs httpawsamazoncomcode

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

62

マネージメントコンソールだけでなくAPIからプログラマブルにアクセス

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1a --instance-type m1small

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1b --instance-type m1small

Tokyo リージョン

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

63

EC2のスケジュールイベント表示機能

  EC2インスタンスが稼働しているハードかソフトにメンテナンスが必要な場合に情報を提供する仕組み

  インスタンスリブートシステムリブートリタイヤ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

64

EC2のステータスチェック機能

  下記の2種類のチェックを自動テストで実行行し情報を提示   システムステータスチェック

  EC2インスタンスにネットワークパケットが通るかチェック   インスタンスステータスチェック

  EC2インスタンスのOSがネットワークパケットを受け取るかチェック

  もし状況に乖離離がある場合はレポートできます

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

65

AWS制限増加申請

  EC2を誤って大量量に作成しないよう最大インスタンス数の上限を20に制限しています

  制限増加申請フォームで各種制限の増加を行行えますbull  httpawsamazoncomjpcontact-‐‑‒usemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

66

既存EBSボリュームのサイズ変更更

  例例 10GB -‐‑‒gt 100GB変更更への流流れ   EBSをデタッチする   EBSからS3にスナップショットを作成する

  新たなボリュームサイズを指定してEBSを作成する

  EBSをアタッチする   マウントしてリサイズする

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

スナップショット

EBS (10GB)

EBS (100GB)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

67

EBSとS3

EBSは複数EC2にアタッチ不不可   単独のEC2インスタンスへのブロックデバイスとしての使い方

  NFSのような使い方をする際はEC2にミドルウェアを導入(GlusterFS等)

S3は複数のEC2からアクセス可   ただしWrite Once Read A Lotな使い方に向いている

  アップロード並列列化も使える   耐久性の設計は99999999999で非常に高い

Copyright copy 2011 Amazon Web Services

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

バケット

EBS

EC2インスタンス

HTTPHTTPS

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

68

EIP使用時の注意点

  グローバルIP(EIP)を用いた場合インターネット経由のアクセスとなり課金発生するケースがある

  名前解決したいサーバに固定IPを付与する13   各サーバは固定グローバルIPを元に

AWSのDNSに名前を問い合わせ13   問い合わせた結果返ってくる外部DNS名でサーバにアクセスを行う13   EC2内部で外部DNS名を使ってアクセスすると プライベートIPアドレスに変換されるため 目的のサーバにプライベートIPでアクセスできる13

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

69

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

70

AWSの課金金の仕組みインターネット

ELB

EC2

EBS

S3

データ転送量量

ELB利利用料料データ処理理量量

インスタンスタイプ別利利用料料

EBSの利利用料料

S3の利利用料料

大半を占める

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

71

Simple Monthly Calculator

  Web上にある計算機を使って概算費用を計算できますsect  httpcalculators3amazonawscomcalc5htmllng=ja_JP

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

72

複数の価格モデル

 課金金モデルが選べるsect 通常の時間課金金のオンデマンドインスタンス

sect ある程度度継続してEC2を使う(1年年3年年)EC2リザーブドインスタンス

sect 入札を利利用してより安く使うEC2スポットインスタンス

rarrマイスターシリーズ RIampスポットインスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

73

AWS無料料試用枠

  AWSでは無料料試用枠を用意していますbull  httpawsamazoncomjpfreeemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

74

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

75

Appendix

  参考資料料bull  Amazon Glacier Developer Guidehttpdocsamazonwebservicescomamazonglacierlatestdevintroductionhtml

bull  Amazon Glacier FAQhttpawsamazoncomjpglacierfaqs

bull  Amazon Glaceir価格httpawsamazoncomjpglacierpricing

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

76

QampA

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 13: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

EC2に関連する主要コンポーネントリージョン

アベイラビリティゾーン

Amazon CloudWatch

Auto Scaling

Amazon Elastic Block Storage

(EBS)

Amazon Machine Image (AMI)

Elastic IP

Amazon Virtual Private Cloud

(VPC)

Elastic Load Balancer

Snapshot

Amazon Elastic Compute Cloud

(EC2)

Key Pairs

AWS Management Console

Security Groups

VM ImportExport

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

14

今日のAgenda

 Amazon EC2とは  Amazon EC2の基本

bull  触ってみようbull  基本コンセプト

 Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

15

マネジメントコンソールからログイン

  作成したアカウントのメールアドレスパスワードでログインbull  httpsconsoleawsamazoncomec2home emsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

16

AWSサービスの選択   Webコンソールでコントロールするサービスを選ぶ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

17

リージョン選択   日本にいながら世界中のどのリージョンも選択できる

XXXX

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

18

AMI選択   任意のAMIを選ぶことで好みの環境 (OSミドルウェアアプリデータ) を選択できる

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

19

台数インスタンスタイプアベイラビリティゾーンの指定

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

20

EBSの設定

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

21

Key Pair選択   いわゆる公開鍵方式でサーバーにアクセスする初回時は秘密鍵を手元にダウンロードする

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

22

Security Groups選択

  いわゆるファイアウォールの設定作っておいたグループをサーバーに割り当てる

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

23

起動完了了

  起動完了了画面を確認し起動ウィザードを終了了

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

24

起動したインスタンスの情報確認XXXXX

パブリックDNS名

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

25

ターミナルでアクセス

ログインの際のアカウント名はAMIによって違うので注意 例) Amazon Linux -gt ec2-user その他Linuxの多く -gt root admin等

パブリックDNS名

秘密鍵

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

26

今日のAgenda

 Amazon EC2とは  Amazon EC2の基本

bull  触ってみようbull  基本コンセプト

 Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

27

Amazon Machine Image (AMI)

  AMIはインスタンス作成に使用するイメージテンプレート   AWS公式AMIやサードパーティもAMIを提供

bull  httpsawsamazoncomamisbull  httpsawsamazoncommarketplaceemsp 

  選択したAMIから起動する   EC2インスタンスから任意のタイミングでカスタムAMIを作成できる

launch

Amazon Machine Image (AMI)

Amazon EC2インスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

28

AMIとインスタンスAZの関係

インスタンス

Amazon S3

AMI

Availability Zone-1a Availability Zone-1b

カスタム AMI

AMIからインスタンスを起動

カスタムAMIを使ってインスタンスを複数台起動

カスタムAMIを作成必要に応じて共有設定

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

29

AMIの取得AMIからの起動

Copyright copy 2011 Amazon Web Services

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

30

EC2インスタンスのライフサイクル   起動したインスタンスは3つの状態を持つ

bull  Running 実行行中課金金されるbull  Stopped 停止中課金金されないbull  Terminated 終了了StopStartはできない

Running

Terminated

Stopped

StartStop

Terminate

launch

Terminate

Amazon Machine Image (AMI)

Amazon EC2インスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

31

EC2インスタンスの停止と終了了

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

32

EC2インスタンスのタイプ変更Stop(停止)しているといつでもタイプ(スペック)を変更更できる

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

33

EBSボリュームのアタッチ

Copyright copy 2011 Amazon Web Services

EC2インスタンスと同じゾーンに作ることを注意 スナップショットから複製も可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

34

EC2インスタンスのアドレス

  全てのインスタンスが下記を持つsect  Private IPアドレス(VPC内のサブネットから割り当てる)sect  Private DNS名(internal)sect  Public DNS名 (amazonawscom)

  public IPアドレスをオプションで付けられる   固定されたPublic IP Addresses はEIPと呼ぶ

sect  稼働しているEC2インスタンスに瞬時に付け外しが可能sect  インスタンスにアサインしているときは料料金金はかからない

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

35

EIPの割り当て

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

36

EIPの使いどころ

  通常のケースはEIPは必要なくEC2のPublic DNS名を用いてCNAMEで名前変換を行行う

  Route 53(名前解決サービス)でPublic DNSを用いる

  固定IPアドレスが必要なときに限りEIPを用いる   メールサーバー監視サーバー等

  メールサーバの送信制限解除逆引き申請が必要な場合は下記から申請を行行うhttpsaws-‐‑‒portalamazoncomgpawshtml-‐‑‒forms-‐‑‒controllercontactusec2-‐‑‒email-‐‑‒limit-‐‑‒rdns-‐‑‒request

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

37

リージョン間コピー(AMIEBS)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

38

Amazon EC2の関連サービス関連情報   監視負荷分散自動スケール

rarrCloudWatchELBAutoScaling   閉域網での利利用仮想ネットワーキング

rarrAmazon VPC (Virtual Private Cloud)   ① 社内ネットワークからVPN接続   ② ルーティングイントラIPアドレス仮想NIC等々

  占有サーバ rarrAmazon Dedicated Instance   専用線接続 rarrAmazon Direct Connect   Windowsemsp emsp  rarrWindowsインスタンス   スパコンrarrHPCインスタンス   アクセス管理理emsp  rarrIAM (Identity and Access Management)   料料金金関係emsp  rarrConsolidated Billing資料料集emsp httpawsamazoncomjpaws-‐‑‒meister

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

39

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

40

AWSのセキュリティの考え方

第三者認証

SOC 1SSAE 16ISAE 3402 ISO 27001 PCI DSS HIPAA ITAR

FISMA Moderate FIPS 140-2 ファシリティ

DC電源ネットワーク冗長化

Your Apps

Webサイトアプリケーションこれまでと同様のセキュリティを

お客様SI様で実現可能

インフラよりハイレベルの

セキュリティをAWSが提供

シェアードレスポンシビリティモデル(責任共有モデル)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

41

EC2の責任共有モデル

物理インタフェース

ファイアウォール

      ハイバーバイザー

Sm

all

Larg

e

hellip

Sm

all Amazon EC2

インスタンス

物理ホスト

ユーザーが 責任を持って 管理する

AWSが 責任を持って 管理する

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

42

ファイアウォールを実現するSecurity Group

  インスタンスのINOUTトラフィックを制限するファイアウォール機能

  デフォルトIN向けは全トラフィック閉

  必要な受信アクセスに対してアクセスルールを定義する

bull  プロトコル( TCPUDP)bull  宛先ポートbull  アクセス元IP Security Group

  ルールをひとまとめにしたテンプレートを Security Groupと呼ぶ

EC2 インスタンス

ポート22(SSH)

ポート80(HTTP)

EC2ファイアウォール

Security Group

ポート25(SMTP)

ポート22(SSH)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

43

Security Groupの使い方   インスタンスの用途に応じたSecurity Groupを用意する

bull  Webサーバ用DBサーバ用メールサーバ用等   アクセス元にSecurity Groupも設定して限定可能

Webサーバ

Webサーバ

DBサーバ

sg-1234

22 00000 80 00000 25 sg-1234

sg-1234

sg-1234

sg-abcd sg-abcd

22 00000 3306 sg-1234

Webサーバ

sg-xyz

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

44

セキュリティ証明書

仮想サーバ(Amazon EC2)Windows( スタンダード)

コマンドライン SDK利利用

SSH公開鍵認証

仮想デスクトップ

ターミナル

REST SOAPAPI

Webコンソール

①EC2インスタンスへのアクセスrarr鍵認証

②Webコンソールへのアクセス

rarrパスワード認証 多要素認証 IAM

③APIへのアクセスrarrアクセスキー X509証明書 IAM

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

45

Key Pair(キーペア)を用いた鍵認証   鍵認証はユーザ名パスワードの認証よりも安全な認証方式

ダウンロードされた秘密鍵

①キーペア作成

②インスタンス起動時にemsp emsp emsp 公開鍵をコピー

公開鍵

③公開鍵秘密鍵のペアが合致するとログイン可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

46

EC2のSLA13

sect  EC2の可用性が9995 sect 上記に満たない場合はServiceクレジットを返還する

sect 詳細は sect  httpawsamazoncomec2-sla

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

47

AWSセキュリティセンター 13

 日本語のホワイトペーパー bull  セキュリティ概要 bull  リスクとコンプライアンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

48

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

49

最近追加された機能

  VM Import for Linux   IAM EC2 Resource Permissions   リザーブドインスタンスの変更更可能に   SR-‐‑‒IOVネットワークDriverネットワーク性能向上

bull  C3 I2 R3インスタンスで対応

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

50

インスタンスのさらなる追加

  一般的な目的なら M3   Compute Optimizedなら C3   Memory Optimizedなら R3(もうすぐ)   GPUが必要なら G2   IOPS重視なら I2   Disk Based Storage ならHS1

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

51

Intel Processor Features

  m3 c3 cc2 g2 cr1 i2 r3の全てが対応

  AES New Instructions (AES-‐‑‒NI)bull  c1 cg1 m2でも対応

  Advanced Vector Extensions (Intel AVX)bull  HVMでのみ対応

  Turbo Boost Technology

  詳細は httpawsamazoncomec2instance-‐‑‒types

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

52

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

53

故障のための設計 Design for Failure   故障に備えた設計をしておく

  すべてが故障しうると考えシステム全体での保守的設計   SPOF(単一障害点)の排除   障害からの復復旧(対応品質)を重視する

  EC2における故障のための設計   AMIを常にとっておく   EBSスナップショットでバックアップ   複数アベイラビリティゾーンへの分散   ELBでサーバを冗長化Auto Scalingで自動復復帰   Reserved Instanceでキャパシティ保障

  他の冗長性高いサービスとの組み合わせ   S3 SimpleDB RDS他

httpwwwslidesharenetkentamagawaaws-‐‑‒7991623

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

54

定期的なバックアップ

  EC2のAMIを定期的に作成する   (参考) 無停止でAMI取得

Cloudpackさんブログhttpblogcloudpackjp201103aws-‐‑‒news-‐‑‒ec2-‐‑‒instance-‐‑‒no-‐‑‒reboot-‐‑‒amihtml

  データボリュームとしてのEBSの場合EBSのスナップショットを定期的に作成

  スクリプトを書いて定期的なバックアップを行行うことも可能 Coderockさんブログ

httpblogdateofrockcom201003auto-‐‑‒backup-‐‑‒amazon-‐‑‒ebs-‐‑‒with-‐‑‒rubyhtml   サーバーワークスさんブログ

httpblogserverworkscojptech20110721awssdk-‐‑‒for-‐‑‒ruby-‐‑‒create-‐‑‒snapshot

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

55

Instance StorageにSSDを積んだインスタンスが増えてきた

  EC2のタイプによって選択できるInstance Storeは以下の通り

Instance Type Instance Store Volumesm1small 1 x 160 GBdaggerm1medium 1 x 410 GBm1large 2 x 420 GB (840 GB)m1xlarge 4 x 420 GB (1680 GB)m2xlarge 1 x 420 GBm22xlarge 1 x 850 GBm24xlarge 2 x 840 GB (1680 GB)m3medium 1 x 4 GB SSDm3large 1 x 32 GB SSDm3xlarge 2 x 40 GB SSD (80 GB)m32xlarge 2 x 80 GB SSD (160 GB)

t1micro None (use Amazon EBS volumes)

c1medium 1 x 350 GBdaggerc1xlarge 4 x 420 GB (1680 GB)

Instance Type Instance Store Volumes

c3large 2 x 16 GB SSD (32 GB)c3xlarge 2 x 40 GB SSD (80 GB)c32xlarge 2 x 80 GB SSD (160 GB)c34xlarge 2 x 160 GB SSD (320 GB)c38xlarge 2 x 320 GB SSD (640 GB)cc28xlarge 4 x 840 GB (3360 GB)cg14xlarge 2 x 840 GB (1680 GB)cr18xlarge 2 x 120 GB SSD (240 GB)hi14xlarge 2 x 1024 GB SSD (2048 GB)hs18xlarge 24 x 2048 GB (49 TB)i2xlarge 1 x 800 GB SSDi22xlarge 2 x 800 GB SSD (1600 GB)i24xlarge 4 x 800 GB SSD (3200 GB)i28xlarge 8 x 800 GB SSD (6400 GB)

2014年年1月29日時点

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

56

Instance Storageを使うべきなのは

 高IOPS高帯域なストレージが必要な場合

 消えても良良い一次データの置き場として使う場合

 ストレージ冗長化を準備できる場合

S3活かしたいメリット

考慮すべき制約

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

57

EC2へのファイル転送は

  SCPを使う scp pk-‐‑‒XXXpem rootec2-‐‑‒XXXamazonawscomxxx

  Windowsの場合はWinSCPなど   S3経由で共有する

  S3にアップロードしEC2からwgetでアクセスする   FTPを立立ち上げる

  EC2側でFTPサーバーを立立ち上げておく

  高速に送信したい   Tsunami UDP Aspera等のソリューション

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

58

VM Import Export

  複数プラットフォームのVMイメージをAmazon EC2に移行行(インポートエクスポート)可能

httpawstypepadcomaws_japan201012vm-‐‑‒import-‐‑‒bring-‐‑‒your-‐‑‒vmware-‐‑‒images-‐‑‒to-‐‑‒the-‐‑‒cloudhtml

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

59

稼働EC2インスタンスからメタデータ取得

  ami-‐‑‒id   ami-‐‑‒launch-‐‑‒index   ami-‐‑‒manifest-‐‑‒path   block-‐‑‒device-‐‑‒mapping   hostname   instance-‐‑‒action   instance-‐‑‒id   Instance-‐‑‒type   kernel-‐‑‒id

  local-‐‑‒hostname   local-‐‑‒ipv4   mac   network   placement   profile   public-‐‑‒hostname   public-‐‑‒ipv4   public-‐‑‒keys   reservation-‐‑‒id

curl http169254169254latestmeta-‐‑‒data

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

60

起動時にパラメーターを渡す   起動時に16KB以内で任意のものを渡せる

  ChefやPuppetなどを利利用して自己構成できるAMIに   参照emsp AWSマイスターemsp CloudFormation資料料httpwwwslidesharenetkentamagawacloudformation-‐‑‒aws5

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

61

EC2コマンドラインツール amp AWS SDKs

  コマンドラインからEC2のAPIにアクセスできるツール   ツールをインストールしセキュリティ証明書を配置

  AWS SDKs httpawsamazoncomcode

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

62

マネージメントコンソールだけでなくAPIからプログラマブルにアクセス

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1a --instance-type m1small

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1b --instance-type m1small

Tokyo リージョン

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

63

EC2のスケジュールイベント表示機能

  EC2インスタンスが稼働しているハードかソフトにメンテナンスが必要な場合に情報を提供する仕組み

  インスタンスリブートシステムリブートリタイヤ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

64

EC2のステータスチェック機能

  下記の2種類のチェックを自動テストで実行行し情報を提示   システムステータスチェック

  EC2インスタンスにネットワークパケットが通るかチェック   インスタンスステータスチェック

  EC2インスタンスのOSがネットワークパケットを受け取るかチェック

  もし状況に乖離離がある場合はレポートできます

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

65

AWS制限増加申請

  EC2を誤って大量量に作成しないよう最大インスタンス数の上限を20に制限しています

  制限増加申請フォームで各種制限の増加を行行えますbull  httpawsamazoncomjpcontact-‐‑‒usemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

66

既存EBSボリュームのサイズ変更更

  例例 10GB -‐‑‒gt 100GB変更更への流流れ   EBSをデタッチする   EBSからS3にスナップショットを作成する

  新たなボリュームサイズを指定してEBSを作成する

  EBSをアタッチする   マウントしてリサイズする

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

スナップショット

EBS (10GB)

EBS (100GB)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

67

EBSとS3

EBSは複数EC2にアタッチ不不可   単独のEC2インスタンスへのブロックデバイスとしての使い方

  NFSのような使い方をする際はEC2にミドルウェアを導入(GlusterFS等)

S3は複数のEC2からアクセス可   ただしWrite Once Read A Lotな使い方に向いている

  アップロード並列列化も使える   耐久性の設計は99999999999で非常に高い

Copyright copy 2011 Amazon Web Services

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

バケット

EBS

EC2インスタンス

HTTPHTTPS

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

68

EIP使用時の注意点

  グローバルIP(EIP)を用いた場合インターネット経由のアクセスとなり課金発生するケースがある

  名前解決したいサーバに固定IPを付与する13   各サーバは固定グローバルIPを元に

AWSのDNSに名前を問い合わせ13   問い合わせた結果返ってくる外部DNS名でサーバにアクセスを行う13   EC2内部で外部DNS名を使ってアクセスすると プライベートIPアドレスに変換されるため 目的のサーバにプライベートIPでアクセスできる13

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

69

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

70

AWSの課金金の仕組みインターネット

ELB

EC2

EBS

S3

データ転送量量

ELB利利用料料データ処理理量量

インスタンスタイプ別利利用料料

EBSの利利用料料

S3の利利用料料

大半を占める

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

71

Simple Monthly Calculator

  Web上にある計算機を使って概算費用を計算できますsect  httpcalculators3amazonawscomcalc5htmllng=ja_JP

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

72

複数の価格モデル

 課金金モデルが選べるsect 通常の時間課金金のオンデマンドインスタンス

sect ある程度度継続してEC2を使う(1年年3年年)EC2リザーブドインスタンス

sect 入札を利利用してより安く使うEC2スポットインスタンス

rarrマイスターシリーズ RIampスポットインスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

73

AWS無料料試用枠

  AWSでは無料料試用枠を用意していますbull  httpawsamazoncomjpfreeemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

74

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

75

Appendix

  参考資料料bull  Amazon Glacier Developer Guidehttpdocsamazonwebservicescomamazonglacierlatestdevintroductionhtml

bull  Amazon Glacier FAQhttpawsamazoncomjpglacierfaqs

bull  Amazon Glaceir価格httpawsamazoncomjpglacierpricing

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

76

QampA

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 14: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

14

今日のAgenda

 Amazon EC2とは  Amazon EC2の基本

bull  触ってみようbull  基本コンセプト

 Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

15

マネジメントコンソールからログイン

  作成したアカウントのメールアドレスパスワードでログインbull  httpsconsoleawsamazoncomec2home emsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

16

AWSサービスの選択   Webコンソールでコントロールするサービスを選ぶ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

17

リージョン選択   日本にいながら世界中のどのリージョンも選択できる

XXXX

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

18

AMI選択   任意のAMIを選ぶことで好みの環境 (OSミドルウェアアプリデータ) を選択できる

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

19

台数インスタンスタイプアベイラビリティゾーンの指定

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

20

EBSの設定

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

21

Key Pair選択   いわゆる公開鍵方式でサーバーにアクセスする初回時は秘密鍵を手元にダウンロードする

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

22

Security Groups選択

  いわゆるファイアウォールの設定作っておいたグループをサーバーに割り当てる

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

23

起動完了了

  起動完了了画面を確認し起動ウィザードを終了了

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

24

起動したインスタンスの情報確認XXXXX

パブリックDNS名

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

25

ターミナルでアクセス

ログインの際のアカウント名はAMIによって違うので注意 例) Amazon Linux -gt ec2-user その他Linuxの多く -gt root admin等

パブリックDNS名

秘密鍵

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

26

今日のAgenda

 Amazon EC2とは  Amazon EC2の基本

bull  触ってみようbull  基本コンセプト

 Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

27

Amazon Machine Image (AMI)

  AMIはインスタンス作成に使用するイメージテンプレート   AWS公式AMIやサードパーティもAMIを提供

bull  httpsawsamazoncomamisbull  httpsawsamazoncommarketplaceemsp 

  選択したAMIから起動する   EC2インスタンスから任意のタイミングでカスタムAMIを作成できる

launch

Amazon Machine Image (AMI)

Amazon EC2インスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

28

AMIとインスタンスAZの関係

インスタンス

Amazon S3

AMI

Availability Zone-1a Availability Zone-1b

カスタム AMI

AMIからインスタンスを起動

カスタムAMIを使ってインスタンスを複数台起動

カスタムAMIを作成必要に応じて共有設定

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

29

AMIの取得AMIからの起動

Copyright copy 2011 Amazon Web Services

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

30

EC2インスタンスのライフサイクル   起動したインスタンスは3つの状態を持つ

bull  Running 実行行中課金金されるbull  Stopped 停止中課金金されないbull  Terminated 終了了StopStartはできない

Running

Terminated

Stopped

StartStop

Terminate

launch

Terminate

Amazon Machine Image (AMI)

Amazon EC2インスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

31

EC2インスタンスの停止と終了了

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

32

EC2インスタンスのタイプ変更Stop(停止)しているといつでもタイプ(スペック)を変更更できる

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

33

EBSボリュームのアタッチ

Copyright copy 2011 Amazon Web Services

EC2インスタンスと同じゾーンに作ることを注意 スナップショットから複製も可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

34

EC2インスタンスのアドレス

  全てのインスタンスが下記を持つsect  Private IPアドレス(VPC内のサブネットから割り当てる)sect  Private DNS名(internal)sect  Public DNS名 (amazonawscom)

  public IPアドレスをオプションで付けられる   固定されたPublic IP Addresses はEIPと呼ぶ

sect  稼働しているEC2インスタンスに瞬時に付け外しが可能sect  インスタンスにアサインしているときは料料金金はかからない

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

35

EIPの割り当て

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

36

EIPの使いどころ

  通常のケースはEIPは必要なくEC2のPublic DNS名を用いてCNAMEで名前変換を行行う

  Route 53(名前解決サービス)でPublic DNSを用いる

  固定IPアドレスが必要なときに限りEIPを用いる   メールサーバー監視サーバー等

  メールサーバの送信制限解除逆引き申請が必要な場合は下記から申請を行行うhttpsaws-‐‑‒portalamazoncomgpawshtml-‐‑‒forms-‐‑‒controllercontactusec2-‐‑‒email-‐‑‒limit-‐‑‒rdns-‐‑‒request

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

37

リージョン間コピー(AMIEBS)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

38

Amazon EC2の関連サービス関連情報   監視負荷分散自動スケール

rarrCloudWatchELBAutoScaling   閉域網での利利用仮想ネットワーキング

rarrAmazon VPC (Virtual Private Cloud)   ① 社内ネットワークからVPN接続   ② ルーティングイントラIPアドレス仮想NIC等々

  占有サーバ rarrAmazon Dedicated Instance   専用線接続 rarrAmazon Direct Connect   Windowsemsp emsp  rarrWindowsインスタンス   スパコンrarrHPCインスタンス   アクセス管理理emsp  rarrIAM (Identity and Access Management)   料料金金関係emsp  rarrConsolidated Billing資料料集emsp httpawsamazoncomjpaws-‐‑‒meister

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

39

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

40

AWSのセキュリティの考え方

第三者認証

SOC 1SSAE 16ISAE 3402 ISO 27001 PCI DSS HIPAA ITAR

FISMA Moderate FIPS 140-2 ファシリティ

DC電源ネットワーク冗長化

Your Apps

Webサイトアプリケーションこれまでと同様のセキュリティを

お客様SI様で実現可能

インフラよりハイレベルの

セキュリティをAWSが提供

シェアードレスポンシビリティモデル(責任共有モデル)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

41

EC2の責任共有モデル

物理インタフェース

ファイアウォール

      ハイバーバイザー

Sm

all

Larg

e

hellip

Sm

all Amazon EC2

インスタンス

物理ホスト

ユーザーが 責任を持って 管理する

AWSが 責任を持って 管理する

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

42

ファイアウォールを実現するSecurity Group

  インスタンスのINOUTトラフィックを制限するファイアウォール機能

  デフォルトIN向けは全トラフィック閉

  必要な受信アクセスに対してアクセスルールを定義する

bull  プロトコル( TCPUDP)bull  宛先ポートbull  アクセス元IP Security Group

  ルールをひとまとめにしたテンプレートを Security Groupと呼ぶ

EC2 インスタンス

ポート22(SSH)

ポート80(HTTP)

EC2ファイアウォール

Security Group

ポート25(SMTP)

ポート22(SSH)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

43

Security Groupの使い方   インスタンスの用途に応じたSecurity Groupを用意する

bull  Webサーバ用DBサーバ用メールサーバ用等   アクセス元にSecurity Groupも設定して限定可能

Webサーバ

Webサーバ

DBサーバ

sg-1234

22 00000 80 00000 25 sg-1234

sg-1234

sg-1234

sg-abcd sg-abcd

22 00000 3306 sg-1234

Webサーバ

sg-xyz

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

44

セキュリティ証明書

仮想サーバ(Amazon EC2)Windows( スタンダード)

コマンドライン SDK利利用

SSH公開鍵認証

仮想デスクトップ

ターミナル

REST SOAPAPI

Webコンソール

①EC2インスタンスへのアクセスrarr鍵認証

②Webコンソールへのアクセス

rarrパスワード認証 多要素認証 IAM

③APIへのアクセスrarrアクセスキー X509証明書 IAM

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

45

Key Pair(キーペア)を用いた鍵認証   鍵認証はユーザ名パスワードの認証よりも安全な認証方式

ダウンロードされた秘密鍵

①キーペア作成

②インスタンス起動時にemsp emsp emsp 公開鍵をコピー

公開鍵

③公開鍵秘密鍵のペアが合致するとログイン可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

46

EC2のSLA13

sect  EC2の可用性が9995 sect 上記に満たない場合はServiceクレジットを返還する

sect 詳細は sect  httpawsamazoncomec2-sla

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

47

AWSセキュリティセンター 13

 日本語のホワイトペーパー bull  セキュリティ概要 bull  リスクとコンプライアンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

48

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

49

最近追加された機能

  VM Import for Linux   IAM EC2 Resource Permissions   リザーブドインスタンスの変更更可能に   SR-‐‑‒IOVネットワークDriverネットワーク性能向上

bull  C3 I2 R3インスタンスで対応

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

50

インスタンスのさらなる追加

  一般的な目的なら M3   Compute Optimizedなら C3   Memory Optimizedなら R3(もうすぐ)   GPUが必要なら G2   IOPS重視なら I2   Disk Based Storage ならHS1

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

51

Intel Processor Features

  m3 c3 cc2 g2 cr1 i2 r3の全てが対応

  AES New Instructions (AES-‐‑‒NI)bull  c1 cg1 m2でも対応

  Advanced Vector Extensions (Intel AVX)bull  HVMでのみ対応

  Turbo Boost Technology

  詳細は httpawsamazoncomec2instance-‐‑‒types

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

52

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

53

故障のための設計 Design for Failure   故障に備えた設計をしておく

  すべてが故障しうると考えシステム全体での保守的設計   SPOF(単一障害点)の排除   障害からの復復旧(対応品質)を重視する

  EC2における故障のための設計   AMIを常にとっておく   EBSスナップショットでバックアップ   複数アベイラビリティゾーンへの分散   ELBでサーバを冗長化Auto Scalingで自動復復帰   Reserved Instanceでキャパシティ保障

  他の冗長性高いサービスとの組み合わせ   S3 SimpleDB RDS他

httpwwwslidesharenetkentamagawaaws-‐‑‒7991623

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

54

定期的なバックアップ

  EC2のAMIを定期的に作成する   (参考) 無停止でAMI取得

Cloudpackさんブログhttpblogcloudpackjp201103aws-‐‑‒news-‐‑‒ec2-‐‑‒instance-‐‑‒no-‐‑‒reboot-‐‑‒amihtml

  データボリュームとしてのEBSの場合EBSのスナップショットを定期的に作成

  スクリプトを書いて定期的なバックアップを行行うことも可能 Coderockさんブログ

httpblogdateofrockcom201003auto-‐‑‒backup-‐‑‒amazon-‐‑‒ebs-‐‑‒with-‐‑‒rubyhtml   サーバーワークスさんブログ

httpblogserverworkscojptech20110721awssdk-‐‑‒for-‐‑‒ruby-‐‑‒create-‐‑‒snapshot

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

55

Instance StorageにSSDを積んだインスタンスが増えてきた

  EC2のタイプによって選択できるInstance Storeは以下の通り

Instance Type Instance Store Volumesm1small 1 x 160 GBdaggerm1medium 1 x 410 GBm1large 2 x 420 GB (840 GB)m1xlarge 4 x 420 GB (1680 GB)m2xlarge 1 x 420 GBm22xlarge 1 x 850 GBm24xlarge 2 x 840 GB (1680 GB)m3medium 1 x 4 GB SSDm3large 1 x 32 GB SSDm3xlarge 2 x 40 GB SSD (80 GB)m32xlarge 2 x 80 GB SSD (160 GB)

t1micro None (use Amazon EBS volumes)

c1medium 1 x 350 GBdaggerc1xlarge 4 x 420 GB (1680 GB)

Instance Type Instance Store Volumes

c3large 2 x 16 GB SSD (32 GB)c3xlarge 2 x 40 GB SSD (80 GB)c32xlarge 2 x 80 GB SSD (160 GB)c34xlarge 2 x 160 GB SSD (320 GB)c38xlarge 2 x 320 GB SSD (640 GB)cc28xlarge 4 x 840 GB (3360 GB)cg14xlarge 2 x 840 GB (1680 GB)cr18xlarge 2 x 120 GB SSD (240 GB)hi14xlarge 2 x 1024 GB SSD (2048 GB)hs18xlarge 24 x 2048 GB (49 TB)i2xlarge 1 x 800 GB SSDi22xlarge 2 x 800 GB SSD (1600 GB)i24xlarge 4 x 800 GB SSD (3200 GB)i28xlarge 8 x 800 GB SSD (6400 GB)

2014年年1月29日時点

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

56

Instance Storageを使うべきなのは

 高IOPS高帯域なストレージが必要な場合

 消えても良良い一次データの置き場として使う場合

 ストレージ冗長化を準備できる場合

S3活かしたいメリット

考慮すべき制約

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

57

EC2へのファイル転送は

  SCPを使う scp pk-‐‑‒XXXpem rootec2-‐‑‒XXXamazonawscomxxx

  Windowsの場合はWinSCPなど   S3経由で共有する

  S3にアップロードしEC2からwgetでアクセスする   FTPを立立ち上げる

  EC2側でFTPサーバーを立立ち上げておく

  高速に送信したい   Tsunami UDP Aspera等のソリューション

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

58

VM Import Export

  複数プラットフォームのVMイメージをAmazon EC2に移行行(インポートエクスポート)可能

httpawstypepadcomaws_japan201012vm-‐‑‒import-‐‑‒bring-‐‑‒your-‐‑‒vmware-‐‑‒images-‐‑‒to-‐‑‒the-‐‑‒cloudhtml

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

59

稼働EC2インスタンスからメタデータ取得

  ami-‐‑‒id   ami-‐‑‒launch-‐‑‒index   ami-‐‑‒manifest-‐‑‒path   block-‐‑‒device-‐‑‒mapping   hostname   instance-‐‑‒action   instance-‐‑‒id   Instance-‐‑‒type   kernel-‐‑‒id

  local-‐‑‒hostname   local-‐‑‒ipv4   mac   network   placement   profile   public-‐‑‒hostname   public-‐‑‒ipv4   public-‐‑‒keys   reservation-‐‑‒id

curl http169254169254latestmeta-‐‑‒data

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

60

起動時にパラメーターを渡す   起動時に16KB以内で任意のものを渡せる

  ChefやPuppetなどを利利用して自己構成できるAMIに   参照emsp AWSマイスターemsp CloudFormation資料料httpwwwslidesharenetkentamagawacloudformation-‐‑‒aws5

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

61

EC2コマンドラインツール amp AWS SDKs

  コマンドラインからEC2のAPIにアクセスできるツール   ツールをインストールしセキュリティ証明書を配置

  AWS SDKs httpawsamazoncomcode

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

62

マネージメントコンソールだけでなくAPIからプログラマブルにアクセス

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1a --instance-type m1small

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1b --instance-type m1small

Tokyo リージョン

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

63

EC2のスケジュールイベント表示機能

  EC2インスタンスが稼働しているハードかソフトにメンテナンスが必要な場合に情報を提供する仕組み

  インスタンスリブートシステムリブートリタイヤ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

64

EC2のステータスチェック機能

  下記の2種類のチェックを自動テストで実行行し情報を提示   システムステータスチェック

  EC2インスタンスにネットワークパケットが通るかチェック   インスタンスステータスチェック

  EC2インスタンスのOSがネットワークパケットを受け取るかチェック

  もし状況に乖離離がある場合はレポートできます

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

65

AWS制限増加申請

  EC2を誤って大量量に作成しないよう最大インスタンス数の上限を20に制限しています

  制限増加申請フォームで各種制限の増加を行行えますbull  httpawsamazoncomjpcontact-‐‑‒usemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

66

既存EBSボリュームのサイズ変更更

  例例 10GB -‐‑‒gt 100GB変更更への流流れ   EBSをデタッチする   EBSからS3にスナップショットを作成する

  新たなボリュームサイズを指定してEBSを作成する

  EBSをアタッチする   マウントしてリサイズする

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

スナップショット

EBS (10GB)

EBS (100GB)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

67

EBSとS3

EBSは複数EC2にアタッチ不不可   単独のEC2インスタンスへのブロックデバイスとしての使い方

  NFSのような使い方をする際はEC2にミドルウェアを導入(GlusterFS等)

S3は複数のEC2からアクセス可   ただしWrite Once Read A Lotな使い方に向いている

  アップロード並列列化も使える   耐久性の設計は99999999999で非常に高い

Copyright copy 2011 Amazon Web Services

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

バケット

EBS

EC2インスタンス

HTTPHTTPS

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

68

EIP使用時の注意点

  グローバルIP(EIP)を用いた場合インターネット経由のアクセスとなり課金発生するケースがある

  名前解決したいサーバに固定IPを付与する13   各サーバは固定グローバルIPを元に

AWSのDNSに名前を問い合わせ13   問い合わせた結果返ってくる外部DNS名でサーバにアクセスを行う13   EC2内部で外部DNS名を使ってアクセスすると プライベートIPアドレスに変換されるため 目的のサーバにプライベートIPでアクセスできる13

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

69

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

70

AWSの課金金の仕組みインターネット

ELB

EC2

EBS

S3

データ転送量量

ELB利利用料料データ処理理量量

インスタンスタイプ別利利用料料

EBSの利利用料料

S3の利利用料料

大半を占める

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

71

Simple Monthly Calculator

  Web上にある計算機を使って概算費用を計算できますsect  httpcalculators3amazonawscomcalc5htmllng=ja_JP

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

72

複数の価格モデル

 課金金モデルが選べるsect 通常の時間課金金のオンデマンドインスタンス

sect ある程度度継続してEC2を使う(1年年3年年)EC2リザーブドインスタンス

sect 入札を利利用してより安く使うEC2スポットインスタンス

rarrマイスターシリーズ RIampスポットインスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

73

AWS無料料試用枠

  AWSでは無料料試用枠を用意していますbull  httpawsamazoncomjpfreeemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

74

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

75

Appendix

  参考資料料bull  Amazon Glacier Developer Guidehttpdocsamazonwebservicescomamazonglacierlatestdevintroductionhtml

bull  Amazon Glacier FAQhttpawsamazoncomjpglacierfaqs

bull  Amazon Glaceir価格httpawsamazoncomjpglacierpricing

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

76

QampA

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 15: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

15

マネジメントコンソールからログイン

  作成したアカウントのメールアドレスパスワードでログインbull  httpsconsoleawsamazoncomec2home emsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

16

AWSサービスの選択   Webコンソールでコントロールするサービスを選ぶ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

17

リージョン選択   日本にいながら世界中のどのリージョンも選択できる

XXXX

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

18

AMI選択   任意のAMIを選ぶことで好みの環境 (OSミドルウェアアプリデータ) を選択できる

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

19

台数インスタンスタイプアベイラビリティゾーンの指定

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

20

EBSの設定

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

21

Key Pair選択   いわゆる公開鍵方式でサーバーにアクセスする初回時は秘密鍵を手元にダウンロードする

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

22

Security Groups選択

  いわゆるファイアウォールの設定作っておいたグループをサーバーに割り当てる

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

23

起動完了了

  起動完了了画面を確認し起動ウィザードを終了了

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

24

起動したインスタンスの情報確認XXXXX

パブリックDNS名

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

25

ターミナルでアクセス

ログインの際のアカウント名はAMIによって違うので注意 例) Amazon Linux -gt ec2-user その他Linuxの多く -gt root admin等

パブリックDNS名

秘密鍵

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

26

今日のAgenda

 Amazon EC2とは  Amazon EC2の基本

bull  触ってみようbull  基本コンセプト

 Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

27

Amazon Machine Image (AMI)

  AMIはインスタンス作成に使用するイメージテンプレート   AWS公式AMIやサードパーティもAMIを提供

bull  httpsawsamazoncomamisbull  httpsawsamazoncommarketplaceemsp 

  選択したAMIから起動する   EC2インスタンスから任意のタイミングでカスタムAMIを作成できる

launch

Amazon Machine Image (AMI)

Amazon EC2インスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

28

AMIとインスタンスAZの関係

インスタンス

Amazon S3

AMI

Availability Zone-1a Availability Zone-1b

カスタム AMI

AMIからインスタンスを起動

カスタムAMIを使ってインスタンスを複数台起動

カスタムAMIを作成必要に応じて共有設定

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

29

AMIの取得AMIからの起動

Copyright copy 2011 Amazon Web Services

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

30

EC2インスタンスのライフサイクル   起動したインスタンスは3つの状態を持つ

bull  Running 実行行中課金金されるbull  Stopped 停止中課金金されないbull  Terminated 終了了StopStartはできない

Running

Terminated

Stopped

StartStop

Terminate

launch

Terminate

Amazon Machine Image (AMI)

Amazon EC2インスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

31

EC2インスタンスの停止と終了了

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

32

EC2インスタンスのタイプ変更Stop(停止)しているといつでもタイプ(スペック)を変更更できる

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

33

EBSボリュームのアタッチ

Copyright copy 2011 Amazon Web Services

EC2インスタンスと同じゾーンに作ることを注意 スナップショットから複製も可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

34

EC2インスタンスのアドレス

  全てのインスタンスが下記を持つsect  Private IPアドレス(VPC内のサブネットから割り当てる)sect  Private DNS名(internal)sect  Public DNS名 (amazonawscom)

  public IPアドレスをオプションで付けられる   固定されたPublic IP Addresses はEIPと呼ぶ

sect  稼働しているEC2インスタンスに瞬時に付け外しが可能sect  インスタンスにアサインしているときは料料金金はかからない

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

35

EIPの割り当て

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

36

EIPの使いどころ

  通常のケースはEIPは必要なくEC2のPublic DNS名を用いてCNAMEで名前変換を行行う

  Route 53(名前解決サービス)でPublic DNSを用いる

  固定IPアドレスが必要なときに限りEIPを用いる   メールサーバー監視サーバー等

  メールサーバの送信制限解除逆引き申請が必要な場合は下記から申請を行行うhttpsaws-‐‑‒portalamazoncomgpawshtml-‐‑‒forms-‐‑‒controllercontactusec2-‐‑‒email-‐‑‒limit-‐‑‒rdns-‐‑‒request

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

37

リージョン間コピー(AMIEBS)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

38

Amazon EC2の関連サービス関連情報   監視負荷分散自動スケール

rarrCloudWatchELBAutoScaling   閉域網での利利用仮想ネットワーキング

rarrAmazon VPC (Virtual Private Cloud)   ① 社内ネットワークからVPN接続   ② ルーティングイントラIPアドレス仮想NIC等々

  占有サーバ rarrAmazon Dedicated Instance   専用線接続 rarrAmazon Direct Connect   Windowsemsp emsp  rarrWindowsインスタンス   スパコンrarrHPCインスタンス   アクセス管理理emsp  rarrIAM (Identity and Access Management)   料料金金関係emsp  rarrConsolidated Billing資料料集emsp httpawsamazoncomjpaws-‐‑‒meister

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

39

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

40

AWSのセキュリティの考え方

第三者認証

SOC 1SSAE 16ISAE 3402 ISO 27001 PCI DSS HIPAA ITAR

FISMA Moderate FIPS 140-2 ファシリティ

DC電源ネットワーク冗長化

Your Apps

Webサイトアプリケーションこれまでと同様のセキュリティを

お客様SI様で実現可能

インフラよりハイレベルの

セキュリティをAWSが提供

シェアードレスポンシビリティモデル(責任共有モデル)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

41

EC2の責任共有モデル

物理インタフェース

ファイアウォール

      ハイバーバイザー

Sm

all

Larg

e

hellip

Sm

all Amazon EC2

インスタンス

物理ホスト

ユーザーが 責任を持って 管理する

AWSが 責任を持って 管理する

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

42

ファイアウォールを実現するSecurity Group

  インスタンスのINOUTトラフィックを制限するファイアウォール機能

  デフォルトIN向けは全トラフィック閉

  必要な受信アクセスに対してアクセスルールを定義する

bull  プロトコル( TCPUDP)bull  宛先ポートbull  アクセス元IP Security Group

  ルールをひとまとめにしたテンプレートを Security Groupと呼ぶ

EC2 インスタンス

ポート22(SSH)

ポート80(HTTP)

EC2ファイアウォール

Security Group

ポート25(SMTP)

ポート22(SSH)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

43

Security Groupの使い方   インスタンスの用途に応じたSecurity Groupを用意する

bull  Webサーバ用DBサーバ用メールサーバ用等   アクセス元にSecurity Groupも設定して限定可能

Webサーバ

Webサーバ

DBサーバ

sg-1234

22 00000 80 00000 25 sg-1234

sg-1234

sg-1234

sg-abcd sg-abcd

22 00000 3306 sg-1234

Webサーバ

sg-xyz

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

44

セキュリティ証明書

仮想サーバ(Amazon EC2)Windows( スタンダード)

コマンドライン SDK利利用

SSH公開鍵認証

仮想デスクトップ

ターミナル

REST SOAPAPI

Webコンソール

①EC2インスタンスへのアクセスrarr鍵認証

②Webコンソールへのアクセス

rarrパスワード認証 多要素認証 IAM

③APIへのアクセスrarrアクセスキー X509証明書 IAM

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

45

Key Pair(キーペア)を用いた鍵認証   鍵認証はユーザ名パスワードの認証よりも安全な認証方式

ダウンロードされた秘密鍵

①キーペア作成

②インスタンス起動時にemsp emsp emsp 公開鍵をコピー

公開鍵

③公開鍵秘密鍵のペアが合致するとログイン可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

46

EC2のSLA13

sect  EC2の可用性が9995 sect 上記に満たない場合はServiceクレジットを返還する

sect 詳細は sect  httpawsamazoncomec2-sla

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

47

AWSセキュリティセンター 13

 日本語のホワイトペーパー bull  セキュリティ概要 bull  リスクとコンプライアンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

48

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

49

最近追加された機能

  VM Import for Linux   IAM EC2 Resource Permissions   リザーブドインスタンスの変更更可能に   SR-‐‑‒IOVネットワークDriverネットワーク性能向上

bull  C3 I2 R3インスタンスで対応

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

50

インスタンスのさらなる追加

  一般的な目的なら M3   Compute Optimizedなら C3   Memory Optimizedなら R3(もうすぐ)   GPUが必要なら G2   IOPS重視なら I2   Disk Based Storage ならHS1

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

51

Intel Processor Features

  m3 c3 cc2 g2 cr1 i2 r3の全てが対応

  AES New Instructions (AES-‐‑‒NI)bull  c1 cg1 m2でも対応

  Advanced Vector Extensions (Intel AVX)bull  HVMでのみ対応

  Turbo Boost Technology

  詳細は httpawsamazoncomec2instance-‐‑‒types

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

52

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

53

故障のための設計 Design for Failure   故障に備えた設計をしておく

  すべてが故障しうると考えシステム全体での保守的設計   SPOF(単一障害点)の排除   障害からの復復旧(対応品質)を重視する

  EC2における故障のための設計   AMIを常にとっておく   EBSスナップショットでバックアップ   複数アベイラビリティゾーンへの分散   ELBでサーバを冗長化Auto Scalingで自動復復帰   Reserved Instanceでキャパシティ保障

  他の冗長性高いサービスとの組み合わせ   S3 SimpleDB RDS他

httpwwwslidesharenetkentamagawaaws-‐‑‒7991623

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

54

定期的なバックアップ

  EC2のAMIを定期的に作成する   (参考) 無停止でAMI取得

Cloudpackさんブログhttpblogcloudpackjp201103aws-‐‑‒news-‐‑‒ec2-‐‑‒instance-‐‑‒no-‐‑‒reboot-‐‑‒amihtml

  データボリュームとしてのEBSの場合EBSのスナップショットを定期的に作成

  スクリプトを書いて定期的なバックアップを行行うことも可能 Coderockさんブログ

httpblogdateofrockcom201003auto-‐‑‒backup-‐‑‒amazon-‐‑‒ebs-‐‑‒with-‐‑‒rubyhtml   サーバーワークスさんブログ

httpblogserverworkscojptech20110721awssdk-‐‑‒for-‐‑‒ruby-‐‑‒create-‐‑‒snapshot

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

55

Instance StorageにSSDを積んだインスタンスが増えてきた

  EC2のタイプによって選択できるInstance Storeは以下の通り

Instance Type Instance Store Volumesm1small 1 x 160 GBdaggerm1medium 1 x 410 GBm1large 2 x 420 GB (840 GB)m1xlarge 4 x 420 GB (1680 GB)m2xlarge 1 x 420 GBm22xlarge 1 x 850 GBm24xlarge 2 x 840 GB (1680 GB)m3medium 1 x 4 GB SSDm3large 1 x 32 GB SSDm3xlarge 2 x 40 GB SSD (80 GB)m32xlarge 2 x 80 GB SSD (160 GB)

t1micro None (use Amazon EBS volumes)

c1medium 1 x 350 GBdaggerc1xlarge 4 x 420 GB (1680 GB)

Instance Type Instance Store Volumes

c3large 2 x 16 GB SSD (32 GB)c3xlarge 2 x 40 GB SSD (80 GB)c32xlarge 2 x 80 GB SSD (160 GB)c34xlarge 2 x 160 GB SSD (320 GB)c38xlarge 2 x 320 GB SSD (640 GB)cc28xlarge 4 x 840 GB (3360 GB)cg14xlarge 2 x 840 GB (1680 GB)cr18xlarge 2 x 120 GB SSD (240 GB)hi14xlarge 2 x 1024 GB SSD (2048 GB)hs18xlarge 24 x 2048 GB (49 TB)i2xlarge 1 x 800 GB SSDi22xlarge 2 x 800 GB SSD (1600 GB)i24xlarge 4 x 800 GB SSD (3200 GB)i28xlarge 8 x 800 GB SSD (6400 GB)

2014年年1月29日時点

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

56

Instance Storageを使うべきなのは

 高IOPS高帯域なストレージが必要な場合

 消えても良良い一次データの置き場として使う場合

 ストレージ冗長化を準備できる場合

S3活かしたいメリット

考慮すべき制約

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

57

EC2へのファイル転送は

  SCPを使う scp pk-‐‑‒XXXpem rootec2-‐‑‒XXXamazonawscomxxx

  Windowsの場合はWinSCPなど   S3経由で共有する

  S3にアップロードしEC2からwgetでアクセスする   FTPを立立ち上げる

  EC2側でFTPサーバーを立立ち上げておく

  高速に送信したい   Tsunami UDP Aspera等のソリューション

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

58

VM Import Export

  複数プラットフォームのVMイメージをAmazon EC2に移行行(インポートエクスポート)可能

httpawstypepadcomaws_japan201012vm-‐‑‒import-‐‑‒bring-‐‑‒your-‐‑‒vmware-‐‑‒images-‐‑‒to-‐‑‒the-‐‑‒cloudhtml

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

59

稼働EC2インスタンスからメタデータ取得

  ami-‐‑‒id   ami-‐‑‒launch-‐‑‒index   ami-‐‑‒manifest-‐‑‒path   block-‐‑‒device-‐‑‒mapping   hostname   instance-‐‑‒action   instance-‐‑‒id   Instance-‐‑‒type   kernel-‐‑‒id

  local-‐‑‒hostname   local-‐‑‒ipv4   mac   network   placement   profile   public-‐‑‒hostname   public-‐‑‒ipv4   public-‐‑‒keys   reservation-‐‑‒id

curl http169254169254latestmeta-‐‑‒data

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

60

起動時にパラメーターを渡す   起動時に16KB以内で任意のものを渡せる

  ChefやPuppetなどを利利用して自己構成できるAMIに   参照emsp AWSマイスターemsp CloudFormation資料料httpwwwslidesharenetkentamagawacloudformation-‐‑‒aws5

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

61

EC2コマンドラインツール amp AWS SDKs

  コマンドラインからEC2のAPIにアクセスできるツール   ツールをインストールしセキュリティ証明書を配置

  AWS SDKs httpawsamazoncomcode

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

62

マネージメントコンソールだけでなくAPIからプログラマブルにアクセス

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1a --instance-type m1small

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1b --instance-type m1small

Tokyo リージョン

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

63

EC2のスケジュールイベント表示機能

  EC2インスタンスが稼働しているハードかソフトにメンテナンスが必要な場合に情報を提供する仕組み

  インスタンスリブートシステムリブートリタイヤ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

64

EC2のステータスチェック機能

  下記の2種類のチェックを自動テストで実行行し情報を提示   システムステータスチェック

  EC2インスタンスにネットワークパケットが通るかチェック   インスタンスステータスチェック

  EC2インスタンスのOSがネットワークパケットを受け取るかチェック

  もし状況に乖離離がある場合はレポートできます

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

65

AWS制限増加申請

  EC2を誤って大量量に作成しないよう最大インスタンス数の上限を20に制限しています

  制限増加申請フォームで各種制限の増加を行行えますbull  httpawsamazoncomjpcontact-‐‑‒usemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

66

既存EBSボリュームのサイズ変更更

  例例 10GB -‐‑‒gt 100GB変更更への流流れ   EBSをデタッチする   EBSからS3にスナップショットを作成する

  新たなボリュームサイズを指定してEBSを作成する

  EBSをアタッチする   マウントしてリサイズする

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

スナップショット

EBS (10GB)

EBS (100GB)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

67

EBSとS3

EBSは複数EC2にアタッチ不不可   単独のEC2インスタンスへのブロックデバイスとしての使い方

  NFSのような使い方をする際はEC2にミドルウェアを導入(GlusterFS等)

S3は複数のEC2からアクセス可   ただしWrite Once Read A Lotな使い方に向いている

  アップロード並列列化も使える   耐久性の設計は99999999999で非常に高い

Copyright copy 2011 Amazon Web Services

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

バケット

EBS

EC2インスタンス

HTTPHTTPS

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

68

EIP使用時の注意点

  グローバルIP(EIP)を用いた場合インターネット経由のアクセスとなり課金発生するケースがある

  名前解決したいサーバに固定IPを付与する13   各サーバは固定グローバルIPを元に

AWSのDNSに名前を問い合わせ13   問い合わせた結果返ってくる外部DNS名でサーバにアクセスを行う13   EC2内部で外部DNS名を使ってアクセスすると プライベートIPアドレスに変換されるため 目的のサーバにプライベートIPでアクセスできる13

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

69

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

70

AWSの課金金の仕組みインターネット

ELB

EC2

EBS

S3

データ転送量量

ELB利利用料料データ処理理量量

インスタンスタイプ別利利用料料

EBSの利利用料料

S3の利利用料料

大半を占める

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

71

Simple Monthly Calculator

  Web上にある計算機を使って概算費用を計算できますsect  httpcalculators3amazonawscomcalc5htmllng=ja_JP

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

72

複数の価格モデル

 課金金モデルが選べるsect 通常の時間課金金のオンデマンドインスタンス

sect ある程度度継続してEC2を使う(1年年3年年)EC2リザーブドインスタンス

sect 入札を利利用してより安く使うEC2スポットインスタンス

rarrマイスターシリーズ RIampスポットインスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

73

AWS無料料試用枠

  AWSでは無料料試用枠を用意していますbull  httpawsamazoncomjpfreeemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

74

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

75

Appendix

  参考資料料bull  Amazon Glacier Developer Guidehttpdocsamazonwebservicescomamazonglacierlatestdevintroductionhtml

bull  Amazon Glacier FAQhttpawsamazoncomjpglacierfaqs

bull  Amazon Glaceir価格httpawsamazoncomjpglacierpricing

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

76

QampA

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 16: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

16

AWSサービスの選択   Webコンソールでコントロールするサービスを選ぶ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

17

リージョン選択   日本にいながら世界中のどのリージョンも選択できる

XXXX

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

18

AMI選択   任意のAMIを選ぶことで好みの環境 (OSミドルウェアアプリデータ) を選択できる

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

19

台数インスタンスタイプアベイラビリティゾーンの指定

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

20

EBSの設定

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

21

Key Pair選択   いわゆる公開鍵方式でサーバーにアクセスする初回時は秘密鍵を手元にダウンロードする

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

22

Security Groups選択

  いわゆるファイアウォールの設定作っておいたグループをサーバーに割り当てる

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

23

起動完了了

  起動完了了画面を確認し起動ウィザードを終了了

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

24

起動したインスタンスの情報確認XXXXX

パブリックDNS名

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

25

ターミナルでアクセス

ログインの際のアカウント名はAMIによって違うので注意 例) Amazon Linux -gt ec2-user その他Linuxの多く -gt root admin等

パブリックDNS名

秘密鍵

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

26

今日のAgenda

 Amazon EC2とは  Amazon EC2の基本

bull  触ってみようbull  基本コンセプト

 Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

27

Amazon Machine Image (AMI)

  AMIはインスタンス作成に使用するイメージテンプレート   AWS公式AMIやサードパーティもAMIを提供

bull  httpsawsamazoncomamisbull  httpsawsamazoncommarketplaceemsp 

  選択したAMIから起動する   EC2インスタンスから任意のタイミングでカスタムAMIを作成できる

launch

Amazon Machine Image (AMI)

Amazon EC2インスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

28

AMIとインスタンスAZの関係

インスタンス

Amazon S3

AMI

Availability Zone-1a Availability Zone-1b

カスタム AMI

AMIからインスタンスを起動

カスタムAMIを使ってインスタンスを複数台起動

カスタムAMIを作成必要に応じて共有設定

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

29

AMIの取得AMIからの起動

Copyright copy 2011 Amazon Web Services

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

30

EC2インスタンスのライフサイクル   起動したインスタンスは3つの状態を持つ

bull  Running 実行行中課金金されるbull  Stopped 停止中課金金されないbull  Terminated 終了了StopStartはできない

Running

Terminated

Stopped

StartStop

Terminate

launch

Terminate

Amazon Machine Image (AMI)

Amazon EC2インスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

31

EC2インスタンスの停止と終了了

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

32

EC2インスタンスのタイプ変更Stop(停止)しているといつでもタイプ(スペック)を変更更できる

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

33

EBSボリュームのアタッチ

Copyright copy 2011 Amazon Web Services

EC2インスタンスと同じゾーンに作ることを注意 スナップショットから複製も可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

34

EC2インスタンスのアドレス

  全てのインスタンスが下記を持つsect  Private IPアドレス(VPC内のサブネットから割り当てる)sect  Private DNS名(internal)sect  Public DNS名 (amazonawscom)

  public IPアドレスをオプションで付けられる   固定されたPublic IP Addresses はEIPと呼ぶ

sect  稼働しているEC2インスタンスに瞬時に付け外しが可能sect  インスタンスにアサインしているときは料料金金はかからない

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

35

EIPの割り当て

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

36

EIPの使いどころ

  通常のケースはEIPは必要なくEC2のPublic DNS名を用いてCNAMEで名前変換を行行う

  Route 53(名前解決サービス)でPublic DNSを用いる

  固定IPアドレスが必要なときに限りEIPを用いる   メールサーバー監視サーバー等

  メールサーバの送信制限解除逆引き申請が必要な場合は下記から申請を行行うhttpsaws-‐‑‒portalamazoncomgpawshtml-‐‑‒forms-‐‑‒controllercontactusec2-‐‑‒email-‐‑‒limit-‐‑‒rdns-‐‑‒request

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

37

リージョン間コピー(AMIEBS)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

38

Amazon EC2の関連サービス関連情報   監視負荷分散自動スケール

rarrCloudWatchELBAutoScaling   閉域網での利利用仮想ネットワーキング

rarrAmazon VPC (Virtual Private Cloud)   ① 社内ネットワークからVPN接続   ② ルーティングイントラIPアドレス仮想NIC等々

  占有サーバ rarrAmazon Dedicated Instance   専用線接続 rarrAmazon Direct Connect   Windowsemsp emsp  rarrWindowsインスタンス   スパコンrarrHPCインスタンス   アクセス管理理emsp  rarrIAM (Identity and Access Management)   料料金金関係emsp  rarrConsolidated Billing資料料集emsp httpawsamazoncomjpaws-‐‑‒meister

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

39

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

40

AWSのセキュリティの考え方

第三者認証

SOC 1SSAE 16ISAE 3402 ISO 27001 PCI DSS HIPAA ITAR

FISMA Moderate FIPS 140-2 ファシリティ

DC電源ネットワーク冗長化

Your Apps

Webサイトアプリケーションこれまでと同様のセキュリティを

お客様SI様で実現可能

インフラよりハイレベルの

セキュリティをAWSが提供

シェアードレスポンシビリティモデル(責任共有モデル)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

41

EC2の責任共有モデル

物理インタフェース

ファイアウォール

      ハイバーバイザー

Sm

all

Larg

e

hellip

Sm

all Amazon EC2

インスタンス

物理ホスト

ユーザーが 責任を持って 管理する

AWSが 責任を持って 管理する

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

42

ファイアウォールを実現するSecurity Group

  インスタンスのINOUTトラフィックを制限するファイアウォール機能

  デフォルトIN向けは全トラフィック閉

  必要な受信アクセスに対してアクセスルールを定義する

bull  プロトコル( TCPUDP)bull  宛先ポートbull  アクセス元IP Security Group

  ルールをひとまとめにしたテンプレートを Security Groupと呼ぶ

EC2 インスタンス

ポート22(SSH)

ポート80(HTTP)

EC2ファイアウォール

Security Group

ポート25(SMTP)

ポート22(SSH)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

43

Security Groupの使い方   インスタンスの用途に応じたSecurity Groupを用意する

bull  Webサーバ用DBサーバ用メールサーバ用等   アクセス元にSecurity Groupも設定して限定可能

Webサーバ

Webサーバ

DBサーバ

sg-1234

22 00000 80 00000 25 sg-1234

sg-1234

sg-1234

sg-abcd sg-abcd

22 00000 3306 sg-1234

Webサーバ

sg-xyz

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

44

セキュリティ証明書

仮想サーバ(Amazon EC2)Windows( スタンダード)

コマンドライン SDK利利用

SSH公開鍵認証

仮想デスクトップ

ターミナル

REST SOAPAPI

Webコンソール

①EC2インスタンスへのアクセスrarr鍵認証

②Webコンソールへのアクセス

rarrパスワード認証 多要素認証 IAM

③APIへのアクセスrarrアクセスキー X509証明書 IAM

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

45

Key Pair(キーペア)を用いた鍵認証   鍵認証はユーザ名パスワードの認証よりも安全な認証方式

ダウンロードされた秘密鍵

①キーペア作成

②インスタンス起動時にemsp emsp emsp 公開鍵をコピー

公開鍵

③公開鍵秘密鍵のペアが合致するとログイン可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

46

EC2のSLA13

sect  EC2の可用性が9995 sect 上記に満たない場合はServiceクレジットを返還する

sect 詳細は sect  httpawsamazoncomec2-sla

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

47

AWSセキュリティセンター 13

 日本語のホワイトペーパー bull  セキュリティ概要 bull  リスクとコンプライアンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

48

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

49

最近追加された機能

  VM Import for Linux   IAM EC2 Resource Permissions   リザーブドインスタンスの変更更可能に   SR-‐‑‒IOVネットワークDriverネットワーク性能向上

bull  C3 I2 R3インスタンスで対応

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

50

インスタンスのさらなる追加

  一般的な目的なら M3   Compute Optimizedなら C3   Memory Optimizedなら R3(もうすぐ)   GPUが必要なら G2   IOPS重視なら I2   Disk Based Storage ならHS1

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

51

Intel Processor Features

  m3 c3 cc2 g2 cr1 i2 r3の全てが対応

  AES New Instructions (AES-‐‑‒NI)bull  c1 cg1 m2でも対応

  Advanced Vector Extensions (Intel AVX)bull  HVMでのみ対応

  Turbo Boost Technology

  詳細は httpawsamazoncomec2instance-‐‑‒types

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

52

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

53

故障のための設計 Design for Failure   故障に備えた設計をしておく

  すべてが故障しうると考えシステム全体での保守的設計   SPOF(単一障害点)の排除   障害からの復復旧(対応品質)を重視する

  EC2における故障のための設計   AMIを常にとっておく   EBSスナップショットでバックアップ   複数アベイラビリティゾーンへの分散   ELBでサーバを冗長化Auto Scalingで自動復復帰   Reserved Instanceでキャパシティ保障

  他の冗長性高いサービスとの組み合わせ   S3 SimpleDB RDS他

httpwwwslidesharenetkentamagawaaws-‐‑‒7991623

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

54

定期的なバックアップ

  EC2のAMIを定期的に作成する   (参考) 無停止でAMI取得

Cloudpackさんブログhttpblogcloudpackjp201103aws-‐‑‒news-‐‑‒ec2-‐‑‒instance-‐‑‒no-‐‑‒reboot-‐‑‒amihtml

  データボリュームとしてのEBSの場合EBSのスナップショットを定期的に作成

  スクリプトを書いて定期的なバックアップを行行うことも可能 Coderockさんブログ

httpblogdateofrockcom201003auto-‐‑‒backup-‐‑‒amazon-‐‑‒ebs-‐‑‒with-‐‑‒rubyhtml   サーバーワークスさんブログ

httpblogserverworkscojptech20110721awssdk-‐‑‒for-‐‑‒ruby-‐‑‒create-‐‑‒snapshot

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

55

Instance StorageにSSDを積んだインスタンスが増えてきた

  EC2のタイプによって選択できるInstance Storeは以下の通り

Instance Type Instance Store Volumesm1small 1 x 160 GBdaggerm1medium 1 x 410 GBm1large 2 x 420 GB (840 GB)m1xlarge 4 x 420 GB (1680 GB)m2xlarge 1 x 420 GBm22xlarge 1 x 850 GBm24xlarge 2 x 840 GB (1680 GB)m3medium 1 x 4 GB SSDm3large 1 x 32 GB SSDm3xlarge 2 x 40 GB SSD (80 GB)m32xlarge 2 x 80 GB SSD (160 GB)

t1micro None (use Amazon EBS volumes)

c1medium 1 x 350 GBdaggerc1xlarge 4 x 420 GB (1680 GB)

Instance Type Instance Store Volumes

c3large 2 x 16 GB SSD (32 GB)c3xlarge 2 x 40 GB SSD (80 GB)c32xlarge 2 x 80 GB SSD (160 GB)c34xlarge 2 x 160 GB SSD (320 GB)c38xlarge 2 x 320 GB SSD (640 GB)cc28xlarge 4 x 840 GB (3360 GB)cg14xlarge 2 x 840 GB (1680 GB)cr18xlarge 2 x 120 GB SSD (240 GB)hi14xlarge 2 x 1024 GB SSD (2048 GB)hs18xlarge 24 x 2048 GB (49 TB)i2xlarge 1 x 800 GB SSDi22xlarge 2 x 800 GB SSD (1600 GB)i24xlarge 4 x 800 GB SSD (3200 GB)i28xlarge 8 x 800 GB SSD (6400 GB)

2014年年1月29日時点

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

56

Instance Storageを使うべきなのは

 高IOPS高帯域なストレージが必要な場合

 消えても良良い一次データの置き場として使う場合

 ストレージ冗長化を準備できる場合

S3活かしたいメリット

考慮すべき制約

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

57

EC2へのファイル転送は

  SCPを使う scp pk-‐‑‒XXXpem rootec2-‐‑‒XXXamazonawscomxxx

  Windowsの場合はWinSCPなど   S3経由で共有する

  S3にアップロードしEC2からwgetでアクセスする   FTPを立立ち上げる

  EC2側でFTPサーバーを立立ち上げておく

  高速に送信したい   Tsunami UDP Aspera等のソリューション

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

58

VM Import Export

  複数プラットフォームのVMイメージをAmazon EC2に移行行(インポートエクスポート)可能

httpawstypepadcomaws_japan201012vm-‐‑‒import-‐‑‒bring-‐‑‒your-‐‑‒vmware-‐‑‒images-‐‑‒to-‐‑‒the-‐‑‒cloudhtml

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

59

稼働EC2インスタンスからメタデータ取得

  ami-‐‑‒id   ami-‐‑‒launch-‐‑‒index   ami-‐‑‒manifest-‐‑‒path   block-‐‑‒device-‐‑‒mapping   hostname   instance-‐‑‒action   instance-‐‑‒id   Instance-‐‑‒type   kernel-‐‑‒id

  local-‐‑‒hostname   local-‐‑‒ipv4   mac   network   placement   profile   public-‐‑‒hostname   public-‐‑‒ipv4   public-‐‑‒keys   reservation-‐‑‒id

curl http169254169254latestmeta-‐‑‒data

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

60

起動時にパラメーターを渡す   起動時に16KB以内で任意のものを渡せる

  ChefやPuppetなどを利利用して自己構成できるAMIに   参照emsp AWSマイスターemsp CloudFormation資料料httpwwwslidesharenetkentamagawacloudformation-‐‑‒aws5

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

61

EC2コマンドラインツール amp AWS SDKs

  コマンドラインからEC2のAPIにアクセスできるツール   ツールをインストールしセキュリティ証明書を配置

  AWS SDKs httpawsamazoncomcode

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

62

マネージメントコンソールだけでなくAPIからプログラマブルにアクセス

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1a --instance-type m1small

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1b --instance-type m1small

Tokyo リージョン

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

63

EC2のスケジュールイベント表示機能

  EC2インスタンスが稼働しているハードかソフトにメンテナンスが必要な場合に情報を提供する仕組み

  インスタンスリブートシステムリブートリタイヤ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

64

EC2のステータスチェック機能

  下記の2種類のチェックを自動テストで実行行し情報を提示   システムステータスチェック

  EC2インスタンスにネットワークパケットが通るかチェック   インスタンスステータスチェック

  EC2インスタンスのOSがネットワークパケットを受け取るかチェック

  もし状況に乖離離がある場合はレポートできます

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

65

AWS制限増加申請

  EC2を誤って大量量に作成しないよう最大インスタンス数の上限を20に制限しています

  制限増加申請フォームで各種制限の増加を行行えますbull  httpawsamazoncomjpcontact-‐‑‒usemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

66

既存EBSボリュームのサイズ変更更

  例例 10GB -‐‑‒gt 100GB変更更への流流れ   EBSをデタッチする   EBSからS3にスナップショットを作成する

  新たなボリュームサイズを指定してEBSを作成する

  EBSをアタッチする   マウントしてリサイズする

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

スナップショット

EBS (10GB)

EBS (100GB)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

67

EBSとS3

EBSは複数EC2にアタッチ不不可   単独のEC2インスタンスへのブロックデバイスとしての使い方

  NFSのような使い方をする際はEC2にミドルウェアを導入(GlusterFS等)

S3は複数のEC2からアクセス可   ただしWrite Once Read A Lotな使い方に向いている

  アップロード並列列化も使える   耐久性の設計は99999999999で非常に高い

Copyright copy 2011 Amazon Web Services

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

バケット

EBS

EC2インスタンス

HTTPHTTPS

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

68

EIP使用時の注意点

  グローバルIP(EIP)を用いた場合インターネット経由のアクセスとなり課金発生するケースがある

  名前解決したいサーバに固定IPを付与する13   各サーバは固定グローバルIPを元に

AWSのDNSに名前を問い合わせ13   問い合わせた結果返ってくる外部DNS名でサーバにアクセスを行う13   EC2内部で外部DNS名を使ってアクセスすると プライベートIPアドレスに変換されるため 目的のサーバにプライベートIPでアクセスできる13

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

69

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

70

AWSの課金金の仕組みインターネット

ELB

EC2

EBS

S3

データ転送量量

ELB利利用料料データ処理理量量

インスタンスタイプ別利利用料料

EBSの利利用料料

S3の利利用料料

大半を占める

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

71

Simple Monthly Calculator

  Web上にある計算機を使って概算費用を計算できますsect  httpcalculators3amazonawscomcalc5htmllng=ja_JP

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

72

複数の価格モデル

 課金金モデルが選べるsect 通常の時間課金金のオンデマンドインスタンス

sect ある程度度継続してEC2を使う(1年年3年年)EC2リザーブドインスタンス

sect 入札を利利用してより安く使うEC2スポットインスタンス

rarrマイスターシリーズ RIampスポットインスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

73

AWS無料料試用枠

  AWSでは無料料試用枠を用意していますbull  httpawsamazoncomjpfreeemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

74

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

75

Appendix

  参考資料料bull  Amazon Glacier Developer Guidehttpdocsamazonwebservicescomamazonglacierlatestdevintroductionhtml

bull  Amazon Glacier FAQhttpawsamazoncomjpglacierfaqs

bull  Amazon Glaceir価格httpawsamazoncomjpglacierpricing

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

76

QampA

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 17: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

17

リージョン選択   日本にいながら世界中のどのリージョンも選択できる

XXXX

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

18

AMI選択   任意のAMIを選ぶことで好みの環境 (OSミドルウェアアプリデータ) を選択できる

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

19

台数インスタンスタイプアベイラビリティゾーンの指定

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

20

EBSの設定

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

21

Key Pair選択   いわゆる公開鍵方式でサーバーにアクセスする初回時は秘密鍵を手元にダウンロードする

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

22

Security Groups選択

  いわゆるファイアウォールの設定作っておいたグループをサーバーに割り当てる

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

23

起動完了了

  起動完了了画面を確認し起動ウィザードを終了了

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

24

起動したインスタンスの情報確認XXXXX

パブリックDNS名

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

25

ターミナルでアクセス

ログインの際のアカウント名はAMIによって違うので注意 例) Amazon Linux -gt ec2-user その他Linuxの多く -gt root admin等

パブリックDNS名

秘密鍵

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

26

今日のAgenda

 Amazon EC2とは  Amazon EC2の基本

bull  触ってみようbull  基本コンセプト

 Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

27

Amazon Machine Image (AMI)

  AMIはインスタンス作成に使用するイメージテンプレート   AWS公式AMIやサードパーティもAMIを提供

bull  httpsawsamazoncomamisbull  httpsawsamazoncommarketplaceemsp 

  選択したAMIから起動する   EC2インスタンスから任意のタイミングでカスタムAMIを作成できる

launch

Amazon Machine Image (AMI)

Amazon EC2インスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

28

AMIとインスタンスAZの関係

インスタンス

Amazon S3

AMI

Availability Zone-1a Availability Zone-1b

カスタム AMI

AMIからインスタンスを起動

カスタムAMIを使ってインスタンスを複数台起動

カスタムAMIを作成必要に応じて共有設定

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

29

AMIの取得AMIからの起動

Copyright copy 2011 Amazon Web Services

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

30

EC2インスタンスのライフサイクル   起動したインスタンスは3つの状態を持つ

bull  Running 実行行中課金金されるbull  Stopped 停止中課金金されないbull  Terminated 終了了StopStartはできない

Running

Terminated

Stopped

StartStop

Terminate

launch

Terminate

Amazon Machine Image (AMI)

Amazon EC2インスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

31

EC2インスタンスの停止と終了了

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

32

EC2インスタンスのタイプ変更Stop(停止)しているといつでもタイプ(スペック)を変更更できる

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

33

EBSボリュームのアタッチ

Copyright copy 2011 Amazon Web Services

EC2インスタンスと同じゾーンに作ることを注意 スナップショットから複製も可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

34

EC2インスタンスのアドレス

  全てのインスタンスが下記を持つsect  Private IPアドレス(VPC内のサブネットから割り当てる)sect  Private DNS名(internal)sect  Public DNS名 (amazonawscom)

  public IPアドレスをオプションで付けられる   固定されたPublic IP Addresses はEIPと呼ぶ

sect  稼働しているEC2インスタンスに瞬時に付け外しが可能sect  インスタンスにアサインしているときは料料金金はかからない

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

35

EIPの割り当て

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

36

EIPの使いどころ

  通常のケースはEIPは必要なくEC2のPublic DNS名を用いてCNAMEで名前変換を行行う

  Route 53(名前解決サービス)でPublic DNSを用いる

  固定IPアドレスが必要なときに限りEIPを用いる   メールサーバー監視サーバー等

  メールサーバの送信制限解除逆引き申請が必要な場合は下記から申請を行行うhttpsaws-‐‑‒portalamazoncomgpawshtml-‐‑‒forms-‐‑‒controllercontactusec2-‐‑‒email-‐‑‒limit-‐‑‒rdns-‐‑‒request

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

37

リージョン間コピー(AMIEBS)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

38

Amazon EC2の関連サービス関連情報   監視負荷分散自動スケール

rarrCloudWatchELBAutoScaling   閉域網での利利用仮想ネットワーキング

rarrAmazon VPC (Virtual Private Cloud)   ① 社内ネットワークからVPN接続   ② ルーティングイントラIPアドレス仮想NIC等々

  占有サーバ rarrAmazon Dedicated Instance   専用線接続 rarrAmazon Direct Connect   Windowsemsp emsp  rarrWindowsインスタンス   スパコンrarrHPCインスタンス   アクセス管理理emsp  rarrIAM (Identity and Access Management)   料料金金関係emsp  rarrConsolidated Billing資料料集emsp httpawsamazoncomjpaws-‐‑‒meister

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

39

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

40

AWSのセキュリティの考え方

第三者認証

SOC 1SSAE 16ISAE 3402 ISO 27001 PCI DSS HIPAA ITAR

FISMA Moderate FIPS 140-2 ファシリティ

DC電源ネットワーク冗長化

Your Apps

Webサイトアプリケーションこれまでと同様のセキュリティを

お客様SI様で実現可能

インフラよりハイレベルの

セキュリティをAWSが提供

シェアードレスポンシビリティモデル(責任共有モデル)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

41

EC2の責任共有モデル

物理インタフェース

ファイアウォール

      ハイバーバイザー

Sm

all

Larg

e

hellip

Sm

all Amazon EC2

インスタンス

物理ホスト

ユーザーが 責任を持って 管理する

AWSが 責任を持って 管理する

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

42

ファイアウォールを実現するSecurity Group

  インスタンスのINOUTトラフィックを制限するファイアウォール機能

  デフォルトIN向けは全トラフィック閉

  必要な受信アクセスに対してアクセスルールを定義する

bull  プロトコル( TCPUDP)bull  宛先ポートbull  アクセス元IP Security Group

  ルールをひとまとめにしたテンプレートを Security Groupと呼ぶ

EC2 インスタンス

ポート22(SSH)

ポート80(HTTP)

EC2ファイアウォール

Security Group

ポート25(SMTP)

ポート22(SSH)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

43

Security Groupの使い方   インスタンスの用途に応じたSecurity Groupを用意する

bull  Webサーバ用DBサーバ用メールサーバ用等   アクセス元にSecurity Groupも設定して限定可能

Webサーバ

Webサーバ

DBサーバ

sg-1234

22 00000 80 00000 25 sg-1234

sg-1234

sg-1234

sg-abcd sg-abcd

22 00000 3306 sg-1234

Webサーバ

sg-xyz

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

44

セキュリティ証明書

仮想サーバ(Amazon EC2)Windows( スタンダード)

コマンドライン SDK利利用

SSH公開鍵認証

仮想デスクトップ

ターミナル

REST SOAPAPI

Webコンソール

①EC2インスタンスへのアクセスrarr鍵認証

②Webコンソールへのアクセス

rarrパスワード認証 多要素認証 IAM

③APIへのアクセスrarrアクセスキー X509証明書 IAM

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

45

Key Pair(キーペア)を用いた鍵認証   鍵認証はユーザ名パスワードの認証よりも安全な認証方式

ダウンロードされた秘密鍵

①キーペア作成

②インスタンス起動時にemsp emsp emsp 公開鍵をコピー

公開鍵

③公開鍵秘密鍵のペアが合致するとログイン可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

46

EC2のSLA13

sect  EC2の可用性が9995 sect 上記に満たない場合はServiceクレジットを返還する

sect 詳細は sect  httpawsamazoncomec2-sla

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

47

AWSセキュリティセンター 13

 日本語のホワイトペーパー bull  セキュリティ概要 bull  リスクとコンプライアンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

48

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

49

最近追加された機能

  VM Import for Linux   IAM EC2 Resource Permissions   リザーブドインスタンスの変更更可能に   SR-‐‑‒IOVネットワークDriverネットワーク性能向上

bull  C3 I2 R3インスタンスで対応

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

50

インスタンスのさらなる追加

  一般的な目的なら M3   Compute Optimizedなら C3   Memory Optimizedなら R3(もうすぐ)   GPUが必要なら G2   IOPS重視なら I2   Disk Based Storage ならHS1

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

51

Intel Processor Features

  m3 c3 cc2 g2 cr1 i2 r3の全てが対応

  AES New Instructions (AES-‐‑‒NI)bull  c1 cg1 m2でも対応

  Advanced Vector Extensions (Intel AVX)bull  HVMでのみ対応

  Turbo Boost Technology

  詳細は httpawsamazoncomec2instance-‐‑‒types

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

52

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

53

故障のための設計 Design for Failure   故障に備えた設計をしておく

  すべてが故障しうると考えシステム全体での保守的設計   SPOF(単一障害点)の排除   障害からの復復旧(対応品質)を重視する

  EC2における故障のための設計   AMIを常にとっておく   EBSスナップショットでバックアップ   複数アベイラビリティゾーンへの分散   ELBでサーバを冗長化Auto Scalingで自動復復帰   Reserved Instanceでキャパシティ保障

  他の冗長性高いサービスとの組み合わせ   S3 SimpleDB RDS他

httpwwwslidesharenetkentamagawaaws-‐‑‒7991623

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

54

定期的なバックアップ

  EC2のAMIを定期的に作成する   (参考) 無停止でAMI取得

Cloudpackさんブログhttpblogcloudpackjp201103aws-‐‑‒news-‐‑‒ec2-‐‑‒instance-‐‑‒no-‐‑‒reboot-‐‑‒amihtml

  データボリュームとしてのEBSの場合EBSのスナップショットを定期的に作成

  スクリプトを書いて定期的なバックアップを行行うことも可能 Coderockさんブログ

httpblogdateofrockcom201003auto-‐‑‒backup-‐‑‒amazon-‐‑‒ebs-‐‑‒with-‐‑‒rubyhtml   サーバーワークスさんブログ

httpblogserverworkscojptech20110721awssdk-‐‑‒for-‐‑‒ruby-‐‑‒create-‐‑‒snapshot

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

55

Instance StorageにSSDを積んだインスタンスが増えてきた

  EC2のタイプによって選択できるInstance Storeは以下の通り

Instance Type Instance Store Volumesm1small 1 x 160 GBdaggerm1medium 1 x 410 GBm1large 2 x 420 GB (840 GB)m1xlarge 4 x 420 GB (1680 GB)m2xlarge 1 x 420 GBm22xlarge 1 x 850 GBm24xlarge 2 x 840 GB (1680 GB)m3medium 1 x 4 GB SSDm3large 1 x 32 GB SSDm3xlarge 2 x 40 GB SSD (80 GB)m32xlarge 2 x 80 GB SSD (160 GB)

t1micro None (use Amazon EBS volumes)

c1medium 1 x 350 GBdaggerc1xlarge 4 x 420 GB (1680 GB)

Instance Type Instance Store Volumes

c3large 2 x 16 GB SSD (32 GB)c3xlarge 2 x 40 GB SSD (80 GB)c32xlarge 2 x 80 GB SSD (160 GB)c34xlarge 2 x 160 GB SSD (320 GB)c38xlarge 2 x 320 GB SSD (640 GB)cc28xlarge 4 x 840 GB (3360 GB)cg14xlarge 2 x 840 GB (1680 GB)cr18xlarge 2 x 120 GB SSD (240 GB)hi14xlarge 2 x 1024 GB SSD (2048 GB)hs18xlarge 24 x 2048 GB (49 TB)i2xlarge 1 x 800 GB SSDi22xlarge 2 x 800 GB SSD (1600 GB)i24xlarge 4 x 800 GB SSD (3200 GB)i28xlarge 8 x 800 GB SSD (6400 GB)

2014年年1月29日時点

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

56

Instance Storageを使うべきなのは

 高IOPS高帯域なストレージが必要な場合

 消えても良良い一次データの置き場として使う場合

 ストレージ冗長化を準備できる場合

S3活かしたいメリット

考慮すべき制約

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

57

EC2へのファイル転送は

  SCPを使う scp pk-‐‑‒XXXpem rootec2-‐‑‒XXXamazonawscomxxx

  Windowsの場合はWinSCPなど   S3経由で共有する

  S3にアップロードしEC2からwgetでアクセスする   FTPを立立ち上げる

  EC2側でFTPサーバーを立立ち上げておく

  高速に送信したい   Tsunami UDP Aspera等のソリューション

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

58

VM Import Export

  複数プラットフォームのVMイメージをAmazon EC2に移行行(インポートエクスポート)可能

httpawstypepadcomaws_japan201012vm-‐‑‒import-‐‑‒bring-‐‑‒your-‐‑‒vmware-‐‑‒images-‐‑‒to-‐‑‒the-‐‑‒cloudhtml

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

59

稼働EC2インスタンスからメタデータ取得

  ami-‐‑‒id   ami-‐‑‒launch-‐‑‒index   ami-‐‑‒manifest-‐‑‒path   block-‐‑‒device-‐‑‒mapping   hostname   instance-‐‑‒action   instance-‐‑‒id   Instance-‐‑‒type   kernel-‐‑‒id

  local-‐‑‒hostname   local-‐‑‒ipv4   mac   network   placement   profile   public-‐‑‒hostname   public-‐‑‒ipv4   public-‐‑‒keys   reservation-‐‑‒id

curl http169254169254latestmeta-‐‑‒data

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

60

起動時にパラメーターを渡す   起動時に16KB以内で任意のものを渡せる

  ChefやPuppetなどを利利用して自己構成できるAMIに   参照emsp AWSマイスターemsp CloudFormation資料料httpwwwslidesharenetkentamagawacloudformation-‐‑‒aws5

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

61

EC2コマンドラインツール amp AWS SDKs

  コマンドラインからEC2のAPIにアクセスできるツール   ツールをインストールしセキュリティ証明書を配置

  AWS SDKs httpawsamazoncomcode

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

62

マネージメントコンソールだけでなくAPIからプログラマブルにアクセス

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1a --instance-type m1small

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1b --instance-type m1small

Tokyo リージョン

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

63

EC2のスケジュールイベント表示機能

  EC2インスタンスが稼働しているハードかソフトにメンテナンスが必要な場合に情報を提供する仕組み

  インスタンスリブートシステムリブートリタイヤ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

64

EC2のステータスチェック機能

  下記の2種類のチェックを自動テストで実行行し情報を提示   システムステータスチェック

  EC2インスタンスにネットワークパケットが通るかチェック   インスタンスステータスチェック

  EC2インスタンスのOSがネットワークパケットを受け取るかチェック

  もし状況に乖離離がある場合はレポートできます

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

65

AWS制限増加申請

  EC2を誤って大量量に作成しないよう最大インスタンス数の上限を20に制限しています

  制限増加申請フォームで各種制限の増加を行行えますbull  httpawsamazoncomjpcontact-‐‑‒usemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

66

既存EBSボリュームのサイズ変更更

  例例 10GB -‐‑‒gt 100GB変更更への流流れ   EBSをデタッチする   EBSからS3にスナップショットを作成する

  新たなボリュームサイズを指定してEBSを作成する

  EBSをアタッチする   マウントしてリサイズする

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

スナップショット

EBS (10GB)

EBS (100GB)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

67

EBSとS3

EBSは複数EC2にアタッチ不不可   単独のEC2インスタンスへのブロックデバイスとしての使い方

  NFSのような使い方をする際はEC2にミドルウェアを導入(GlusterFS等)

S3は複数のEC2からアクセス可   ただしWrite Once Read A Lotな使い方に向いている

  アップロード並列列化も使える   耐久性の設計は99999999999で非常に高い

Copyright copy 2011 Amazon Web Services

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

バケット

EBS

EC2インスタンス

HTTPHTTPS

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

68

EIP使用時の注意点

  グローバルIP(EIP)を用いた場合インターネット経由のアクセスとなり課金発生するケースがある

  名前解決したいサーバに固定IPを付与する13   各サーバは固定グローバルIPを元に

AWSのDNSに名前を問い合わせ13   問い合わせた結果返ってくる外部DNS名でサーバにアクセスを行う13   EC2内部で外部DNS名を使ってアクセスすると プライベートIPアドレスに変換されるため 目的のサーバにプライベートIPでアクセスできる13

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

69

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

70

AWSの課金金の仕組みインターネット

ELB

EC2

EBS

S3

データ転送量量

ELB利利用料料データ処理理量量

インスタンスタイプ別利利用料料

EBSの利利用料料

S3の利利用料料

大半を占める

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

71

Simple Monthly Calculator

  Web上にある計算機を使って概算費用を計算できますsect  httpcalculators3amazonawscomcalc5htmllng=ja_JP

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

72

複数の価格モデル

 課金金モデルが選べるsect 通常の時間課金金のオンデマンドインスタンス

sect ある程度度継続してEC2を使う(1年年3年年)EC2リザーブドインスタンス

sect 入札を利利用してより安く使うEC2スポットインスタンス

rarrマイスターシリーズ RIampスポットインスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

73

AWS無料料試用枠

  AWSでは無料料試用枠を用意していますbull  httpawsamazoncomjpfreeemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

74

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

75

Appendix

  参考資料料bull  Amazon Glacier Developer Guidehttpdocsamazonwebservicescomamazonglacierlatestdevintroductionhtml

bull  Amazon Glacier FAQhttpawsamazoncomjpglacierfaqs

bull  Amazon Glaceir価格httpawsamazoncomjpglacierpricing

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

76

QampA

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 18: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

18

AMI選択   任意のAMIを選ぶことで好みの環境 (OSミドルウェアアプリデータ) を選択できる

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

19

台数インスタンスタイプアベイラビリティゾーンの指定

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

20

EBSの設定

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

21

Key Pair選択   いわゆる公開鍵方式でサーバーにアクセスする初回時は秘密鍵を手元にダウンロードする

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

22

Security Groups選択

  いわゆるファイアウォールの設定作っておいたグループをサーバーに割り当てる

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

23

起動完了了

  起動完了了画面を確認し起動ウィザードを終了了

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

24

起動したインスタンスの情報確認XXXXX

パブリックDNS名

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

25

ターミナルでアクセス

ログインの際のアカウント名はAMIによって違うので注意 例) Amazon Linux -gt ec2-user その他Linuxの多く -gt root admin等

パブリックDNS名

秘密鍵

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

26

今日のAgenda

 Amazon EC2とは  Amazon EC2の基本

bull  触ってみようbull  基本コンセプト

 Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

27

Amazon Machine Image (AMI)

  AMIはインスタンス作成に使用するイメージテンプレート   AWS公式AMIやサードパーティもAMIを提供

bull  httpsawsamazoncomamisbull  httpsawsamazoncommarketplaceemsp 

  選択したAMIから起動する   EC2インスタンスから任意のタイミングでカスタムAMIを作成できる

launch

Amazon Machine Image (AMI)

Amazon EC2インスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

28

AMIとインスタンスAZの関係

インスタンス

Amazon S3

AMI

Availability Zone-1a Availability Zone-1b

カスタム AMI

AMIからインスタンスを起動

カスタムAMIを使ってインスタンスを複数台起動

カスタムAMIを作成必要に応じて共有設定

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

29

AMIの取得AMIからの起動

Copyright copy 2011 Amazon Web Services

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

30

EC2インスタンスのライフサイクル   起動したインスタンスは3つの状態を持つ

bull  Running 実行行中課金金されるbull  Stopped 停止中課金金されないbull  Terminated 終了了StopStartはできない

Running

Terminated

Stopped

StartStop

Terminate

launch

Terminate

Amazon Machine Image (AMI)

Amazon EC2インスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

31

EC2インスタンスの停止と終了了

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

32

EC2インスタンスのタイプ変更Stop(停止)しているといつでもタイプ(スペック)を変更更できる

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

33

EBSボリュームのアタッチ

Copyright copy 2011 Amazon Web Services

EC2インスタンスと同じゾーンに作ることを注意 スナップショットから複製も可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

34

EC2インスタンスのアドレス

  全てのインスタンスが下記を持つsect  Private IPアドレス(VPC内のサブネットから割り当てる)sect  Private DNS名(internal)sect  Public DNS名 (amazonawscom)

  public IPアドレスをオプションで付けられる   固定されたPublic IP Addresses はEIPと呼ぶ

sect  稼働しているEC2インスタンスに瞬時に付け外しが可能sect  インスタンスにアサインしているときは料料金金はかからない

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

35

EIPの割り当て

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

36

EIPの使いどころ

  通常のケースはEIPは必要なくEC2のPublic DNS名を用いてCNAMEで名前変換を行行う

  Route 53(名前解決サービス)でPublic DNSを用いる

  固定IPアドレスが必要なときに限りEIPを用いる   メールサーバー監視サーバー等

  メールサーバの送信制限解除逆引き申請が必要な場合は下記から申請を行行うhttpsaws-‐‑‒portalamazoncomgpawshtml-‐‑‒forms-‐‑‒controllercontactusec2-‐‑‒email-‐‑‒limit-‐‑‒rdns-‐‑‒request

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

37

リージョン間コピー(AMIEBS)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

38

Amazon EC2の関連サービス関連情報   監視負荷分散自動スケール

rarrCloudWatchELBAutoScaling   閉域網での利利用仮想ネットワーキング

rarrAmazon VPC (Virtual Private Cloud)   ① 社内ネットワークからVPN接続   ② ルーティングイントラIPアドレス仮想NIC等々

  占有サーバ rarrAmazon Dedicated Instance   専用線接続 rarrAmazon Direct Connect   Windowsemsp emsp  rarrWindowsインスタンス   スパコンrarrHPCインスタンス   アクセス管理理emsp  rarrIAM (Identity and Access Management)   料料金金関係emsp  rarrConsolidated Billing資料料集emsp httpawsamazoncomjpaws-‐‑‒meister

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

39

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

40

AWSのセキュリティの考え方

第三者認証

SOC 1SSAE 16ISAE 3402 ISO 27001 PCI DSS HIPAA ITAR

FISMA Moderate FIPS 140-2 ファシリティ

DC電源ネットワーク冗長化

Your Apps

Webサイトアプリケーションこれまでと同様のセキュリティを

お客様SI様で実現可能

インフラよりハイレベルの

セキュリティをAWSが提供

シェアードレスポンシビリティモデル(責任共有モデル)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

41

EC2の責任共有モデル

物理インタフェース

ファイアウォール

      ハイバーバイザー

Sm

all

Larg

e

hellip

Sm

all Amazon EC2

インスタンス

物理ホスト

ユーザーが 責任を持って 管理する

AWSが 責任を持って 管理する

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

42

ファイアウォールを実現するSecurity Group

  インスタンスのINOUTトラフィックを制限するファイアウォール機能

  デフォルトIN向けは全トラフィック閉

  必要な受信アクセスに対してアクセスルールを定義する

bull  プロトコル( TCPUDP)bull  宛先ポートbull  アクセス元IP Security Group

  ルールをひとまとめにしたテンプレートを Security Groupと呼ぶ

EC2 インスタンス

ポート22(SSH)

ポート80(HTTP)

EC2ファイアウォール

Security Group

ポート25(SMTP)

ポート22(SSH)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

43

Security Groupの使い方   インスタンスの用途に応じたSecurity Groupを用意する

bull  Webサーバ用DBサーバ用メールサーバ用等   アクセス元にSecurity Groupも設定して限定可能

Webサーバ

Webサーバ

DBサーバ

sg-1234

22 00000 80 00000 25 sg-1234

sg-1234

sg-1234

sg-abcd sg-abcd

22 00000 3306 sg-1234

Webサーバ

sg-xyz

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

44

セキュリティ証明書

仮想サーバ(Amazon EC2)Windows( スタンダード)

コマンドライン SDK利利用

SSH公開鍵認証

仮想デスクトップ

ターミナル

REST SOAPAPI

Webコンソール

①EC2インスタンスへのアクセスrarr鍵認証

②Webコンソールへのアクセス

rarrパスワード認証 多要素認証 IAM

③APIへのアクセスrarrアクセスキー X509証明書 IAM

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

45

Key Pair(キーペア)を用いた鍵認証   鍵認証はユーザ名パスワードの認証よりも安全な認証方式

ダウンロードされた秘密鍵

①キーペア作成

②インスタンス起動時にemsp emsp emsp 公開鍵をコピー

公開鍵

③公開鍵秘密鍵のペアが合致するとログイン可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

46

EC2のSLA13

sect  EC2の可用性が9995 sect 上記に満たない場合はServiceクレジットを返還する

sect 詳細は sect  httpawsamazoncomec2-sla

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

47

AWSセキュリティセンター 13

 日本語のホワイトペーパー bull  セキュリティ概要 bull  リスクとコンプライアンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

48

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

49

最近追加された機能

  VM Import for Linux   IAM EC2 Resource Permissions   リザーブドインスタンスの変更更可能に   SR-‐‑‒IOVネットワークDriverネットワーク性能向上

bull  C3 I2 R3インスタンスで対応

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

50

インスタンスのさらなる追加

  一般的な目的なら M3   Compute Optimizedなら C3   Memory Optimizedなら R3(もうすぐ)   GPUが必要なら G2   IOPS重視なら I2   Disk Based Storage ならHS1

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

51

Intel Processor Features

  m3 c3 cc2 g2 cr1 i2 r3の全てが対応

  AES New Instructions (AES-‐‑‒NI)bull  c1 cg1 m2でも対応

  Advanced Vector Extensions (Intel AVX)bull  HVMでのみ対応

  Turbo Boost Technology

  詳細は httpawsamazoncomec2instance-‐‑‒types

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

52

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

53

故障のための設計 Design for Failure   故障に備えた設計をしておく

  すべてが故障しうると考えシステム全体での保守的設計   SPOF(単一障害点)の排除   障害からの復復旧(対応品質)を重視する

  EC2における故障のための設計   AMIを常にとっておく   EBSスナップショットでバックアップ   複数アベイラビリティゾーンへの分散   ELBでサーバを冗長化Auto Scalingで自動復復帰   Reserved Instanceでキャパシティ保障

  他の冗長性高いサービスとの組み合わせ   S3 SimpleDB RDS他

httpwwwslidesharenetkentamagawaaws-‐‑‒7991623

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

54

定期的なバックアップ

  EC2のAMIを定期的に作成する   (参考) 無停止でAMI取得

Cloudpackさんブログhttpblogcloudpackjp201103aws-‐‑‒news-‐‑‒ec2-‐‑‒instance-‐‑‒no-‐‑‒reboot-‐‑‒amihtml

  データボリュームとしてのEBSの場合EBSのスナップショットを定期的に作成

  スクリプトを書いて定期的なバックアップを行行うことも可能 Coderockさんブログ

httpblogdateofrockcom201003auto-‐‑‒backup-‐‑‒amazon-‐‑‒ebs-‐‑‒with-‐‑‒rubyhtml   サーバーワークスさんブログ

httpblogserverworkscojptech20110721awssdk-‐‑‒for-‐‑‒ruby-‐‑‒create-‐‑‒snapshot

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

55

Instance StorageにSSDを積んだインスタンスが増えてきた

  EC2のタイプによって選択できるInstance Storeは以下の通り

Instance Type Instance Store Volumesm1small 1 x 160 GBdaggerm1medium 1 x 410 GBm1large 2 x 420 GB (840 GB)m1xlarge 4 x 420 GB (1680 GB)m2xlarge 1 x 420 GBm22xlarge 1 x 850 GBm24xlarge 2 x 840 GB (1680 GB)m3medium 1 x 4 GB SSDm3large 1 x 32 GB SSDm3xlarge 2 x 40 GB SSD (80 GB)m32xlarge 2 x 80 GB SSD (160 GB)

t1micro None (use Amazon EBS volumes)

c1medium 1 x 350 GBdaggerc1xlarge 4 x 420 GB (1680 GB)

Instance Type Instance Store Volumes

c3large 2 x 16 GB SSD (32 GB)c3xlarge 2 x 40 GB SSD (80 GB)c32xlarge 2 x 80 GB SSD (160 GB)c34xlarge 2 x 160 GB SSD (320 GB)c38xlarge 2 x 320 GB SSD (640 GB)cc28xlarge 4 x 840 GB (3360 GB)cg14xlarge 2 x 840 GB (1680 GB)cr18xlarge 2 x 120 GB SSD (240 GB)hi14xlarge 2 x 1024 GB SSD (2048 GB)hs18xlarge 24 x 2048 GB (49 TB)i2xlarge 1 x 800 GB SSDi22xlarge 2 x 800 GB SSD (1600 GB)i24xlarge 4 x 800 GB SSD (3200 GB)i28xlarge 8 x 800 GB SSD (6400 GB)

2014年年1月29日時点

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

56

Instance Storageを使うべきなのは

 高IOPS高帯域なストレージが必要な場合

 消えても良良い一次データの置き場として使う場合

 ストレージ冗長化を準備できる場合

S3活かしたいメリット

考慮すべき制約

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

57

EC2へのファイル転送は

  SCPを使う scp pk-‐‑‒XXXpem rootec2-‐‑‒XXXamazonawscomxxx

  Windowsの場合はWinSCPなど   S3経由で共有する

  S3にアップロードしEC2からwgetでアクセスする   FTPを立立ち上げる

  EC2側でFTPサーバーを立立ち上げておく

  高速に送信したい   Tsunami UDP Aspera等のソリューション

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

58

VM Import Export

  複数プラットフォームのVMイメージをAmazon EC2に移行行(インポートエクスポート)可能

httpawstypepadcomaws_japan201012vm-‐‑‒import-‐‑‒bring-‐‑‒your-‐‑‒vmware-‐‑‒images-‐‑‒to-‐‑‒the-‐‑‒cloudhtml

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

59

稼働EC2インスタンスからメタデータ取得

  ami-‐‑‒id   ami-‐‑‒launch-‐‑‒index   ami-‐‑‒manifest-‐‑‒path   block-‐‑‒device-‐‑‒mapping   hostname   instance-‐‑‒action   instance-‐‑‒id   Instance-‐‑‒type   kernel-‐‑‒id

  local-‐‑‒hostname   local-‐‑‒ipv4   mac   network   placement   profile   public-‐‑‒hostname   public-‐‑‒ipv4   public-‐‑‒keys   reservation-‐‑‒id

curl http169254169254latestmeta-‐‑‒data

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

60

起動時にパラメーターを渡す   起動時に16KB以内で任意のものを渡せる

  ChefやPuppetなどを利利用して自己構成できるAMIに   参照emsp AWSマイスターemsp CloudFormation資料料httpwwwslidesharenetkentamagawacloudformation-‐‑‒aws5

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

61

EC2コマンドラインツール amp AWS SDKs

  コマンドラインからEC2のAPIにアクセスできるツール   ツールをインストールしセキュリティ証明書を配置

  AWS SDKs httpawsamazoncomcode

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

62

マネージメントコンソールだけでなくAPIからプログラマブルにアクセス

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1a --instance-type m1small

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1b --instance-type m1small

Tokyo リージョン

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

63

EC2のスケジュールイベント表示機能

  EC2インスタンスが稼働しているハードかソフトにメンテナンスが必要な場合に情報を提供する仕組み

  インスタンスリブートシステムリブートリタイヤ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

64

EC2のステータスチェック機能

  下記の2種類のチェックを自動テストで実行行し情報を提示   システムステータスチェック

  EC2インスタンスにネットワークパケットが通るかチェック   インスタンスステータスチェック

  EC2インスタンスのOSがネットワークパケットを受け取るかチェック

  もし状況に乖離離がある場合はレポートできます

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

65

AWS制限増加申請

  EC2を誤って大量量に作成しないよう最大インスタンス数の上限を20に制限しています

  制限増加申請フォームで各種制限の増加を行行えますbull  httpawsamazoncomjpcontact-‐‑‒usemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

66

既存EBSボリュームのサイズ変更更

  例例 10GB -‐‑‒gt 100GB変更更への流流れ   EBSをデタッチする   EBSからS3にスナップショットを作成する

  新たなボリュームサイズを指定してEBSを作成する

  EBSをアタッチする   マウントしてリサイズする

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

スナップショット

EBS (10GB)

EBS (100GB)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

67

EBSとS3

EBSは複数EC2にアタッチ不不可   単独のEC2インスタンスへのブロックデバイスとしての使い方

  NFSのような使い方をする際はEC2にミドルウェアを導入(GlusterFS等)

S3は複数のEC2からアクセス可   ただしWrite Once Read A Lotな使い方に向いている

  アップロード並列列化も使える   耐久性の設計は99999999999で非常に高い

Copyright copy 2011 Amazon Web Services

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

バケット

EBS

EC2インスタンス

HTTPHTTPS

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

68

EIP使用時の注意点

  グローバルIP(EIP)を用いた場合インターネット経由のアクセスとなり課金発生するケースがある

  名前解決したいサーバに固定IPを付与する13   各サーバは固定グローバルIPを元に

AWSのDNSに名前を問い合わせ13   問い合わせた結果返ってくる外部DNS名でサーバにアクセスを行う13   EC2内部で外部DNS名を使ってアクセスすると プライベートIPアドレスに変換されるため 目的のサーバにプライベートIPでアクセスできる13

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

69

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

70

AWSの課金金の仕組みインターネット

ELB

EC2

EBS

S3

データ転送量量

ELB利利用料料データ処理理量量

インスタンスタイプ別利利用料料

EBSの利利用料料

S3の利利用料料

大半を占める

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

71

Simple Monthly Calculator

  Web上にある計算機を使って概算費用を計算できますsect  httpcalculators3amazonawscomcalc5htmllng=ja_JP

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

72

複数の価格モデル

 課金金モデルが選べるsect 通常の時間課金金のオンデマンドインスタンス

sect ある程度度継続してEC2を使う(1年年3年年)EC2リザーブドインスタンス

sect 入札を利利用してより安く使うEC2スポットインスタンス

rarrマイスターシリーズ RIampスポットインスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

73

AWS無料料試用枠

  AWSでは無料料試用枠を用意していますbull  httpawsamazoncomjpfreeemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

74

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

75

Appendix

  参考資料料bull  Amazon Glacier Developer Guidehttpdocsamazonwebservicescomamazonglacierlatestdevintroductionhtml

bull  Amazon Glacier FAQhttpawsamazoncomjpglacierfaqs

bull  Amazon Glaceir価格httpawsamazoncomjpglacierpricing

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

76

QampA

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 19: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

19

台数インスタンスタイプアベイラビリティゾーンの指定

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

20

EBSの設定

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

21

Key Pair選択   いわゆる公開鍵方式でサーバーにアクセスする初回時は秘密鍵を手元にダウンロードする

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

22

Security Groups選択

  いわゆるファイアウォールの設定作っておいたグループをサーバーに割り当てる

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

23

起動完了了

  起動完了了画面を確認し起動ウィザードを終了了

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

24

起動したインスタンスの情報確認XXXXX

パブリックDNS名

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

25

ターミナルでアクセス

ログインの際のアカウント名はAMIによって違うので注意 例) Amazon Linux -gt ec2-user その他Linuxの多く -gt root admin等

パブリックDNS名

秘密鍵

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

26

今日のAgenda

 Amazon EC2とは  Amazon EC2の基本

bull  触ってみようbull  基本コンセプト

 Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

27

Amazon Machine Image (AMI)

  AMIはインスタンス作成に使用するイメージテンプレート   AWS公式AMIやサードパーティもAMIを提供

bull  httpsawsamazoncomamisbull  httpsawsamazoncommarketplaceemsp 

  選択したAMIから起動する   EC2インスタンスから任意のタイミングでカスタムAMIを作成できる

launch

Amazon Machine Image (AMI)

Amazon EC2インスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

28

AMIとインスタンスAZの関係

インスタンス

Amazon S3

AMI

Availability Zone-1a Availability Zone-1b

カスタム AMI

AMIからインスタンスを起動

カスタムAMIを使ってインスタンスを複数台起動

カスタムAMIを作成必要に応じて共有設定

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

29

AMIの取得AMIからの起動

Copyright copy 2011 Amazon Web Services

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

30

EC2インスタンスのライフサイクル   起動したインスタンスは3つの状態を持つ

bull  Running 実行行中課金金されるbull  Stopped 停止中課金金されないbull  Terminated 終了了StopStartはできない

Running

Terminated

Stopped

StartStop

Terminate

launch

Terminate

Amazon Machine Image (AMI)

Amazon EC2インスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

31

EC2インスタンスの停止と終了了

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

32

EC2インスタンスのタイプ変更Stop(停止)しているといつでもタイプ(スペック)を変更更できる

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

33

EBSボリュームのアタッチ

Copyright copy 2011 Amazon Web Services

EC2インスタンスと同じゾーンに作ることを注意 スナップショットから複製も可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

34

EC2インスタンスのアドレス

  全てのインスタンスが下記を持つsect  Private IPアドレス(VPC内のサブネットから割り当てる)sect  Private DNS名(internal)sect  Public DNS名 (amazonawscom)

  public IPアドレスをオプションで付けられる   固定されたPublic IP Addresses はEIPと呼ぶ

sect  稼働しているEC2インスタンスに瞬時に付け外しが可能sect  インスタンスにアサインしているときは料料金金はかからない

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

35

EIPの割り当て

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

36

EIPの使いどころ

  通常のケースはEIPは必要なくEC2のPublic DNS名を用いてCNAMEで名前変換を行行う

  Route 53(名前解決サービス)でPublic DNSを用いる

  固定IPアドレスが必要なときに限りEIPを用いる   メールサーバー監視サーバー等

  メールサーバの送信制限解除逆引き申請が必要な場合は下記から申請を行行うhttpsaws-‐‑‒portalamazoncomgpawshtml-‐‑‒forms-‐‑‒controllercontactusec2-‐‑‒email-‐‑‒limit-‐‑‒rdns-‐‑‒request

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

37

リージョン間コピー(AMIEBS)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

38

Amazon EC2の関連サービス関連情報   監視負荷分散自動スケール

rarrCloudWatchELBAutoScaling   閉域網での利利用仮想ネットワーキング

rarrAmazon VPC (Virtual Private Cloud)   ① 社内ネットワークからVPN接続   ② ルーティングイントラIPアドレス仮想NIC等々

  占有サーバ rarrAmazon Dedicated Instance   専用線接続 rarrAmazon Direct Connect   Windowsemsp emsp  rarrWindowsインスタンス   スパコンrarrHPCインスタンス   アクセス管理理emsp  rarrIAM (Identity and Access Management)   料料金金関係emsp  rarrConsolidated Billing資料料集emsp httpawsamazoncomjpaws-‐‑‒meister

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

39

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

40

AWSのセキュリティの考え方

第三者認証

SOC 1SSAE 16ISAE 3402 ISO 27001 PCI DSS HIPAA ITAR

FISMA Moderate FIPS 140-2 ファシリティ

DC電源ネットワーク冗長化

Your Apps

Webサイトアプリケーションこれまでと同様のセキュリティを

お客様SI様で実現可能

インフラよりハイレベルの

セキュリティをAWSが提供

シェアードレスポンシビリティモデル(責任共有モデル)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

41

EC2の責任共有モデル

物理インタフェース

ファイアウォール

      ハイバーバイザー

Sm

all

Larg

e

hellip

Sm

all Amazon EC2

インスタンス

物理ホスト

ユーザーが 責任を持って 管理する

AWSが 責任を持って 管理する

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

42

ファイアウォールを実現するSecurity Group

  インスタンスのINOUTトラフィックを制限するファイアウォール機能

  デフォルトIN向けは全トラフィック閉

  必要な受信アクセスに対してアクセスルールを定義する

bull  プロトコル( TCPUDP)bull  宛先ポートbull  アクセス元IP Security Group

  ルールをひとまとめにしたテンプレートを Security Groupと呼ぶ

EC2 インスタンス

ポート22(SSH)

ポート80(HTTP)

EC2ファイアウォール

Security Group

ポート25(SMTP)

ポート22(SSH)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

43

Security Groupの使い方   インスタンスの用途に応じたSecurity Groupを用意する

bull  Webサーバ用DBサーバ用メールサーバ用等   アクセス元にSecurity Groupも設定して限定可能

Webサーバ

Webサーバ

DBサーバ

sg-1234

22 00000 80 00000 25 sg-1234

sg-1234

sg-1234

sg-abcd sg-abcd

22 00000 3306 sg-1234

Webサーバ

sg-xyz

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

44

セキュリティ証明書

仮想サーバ(Amazon EC2)Windows( スタンダード)

コマンドライン SDK利利用

SSH公開鍵認証

仮想デスクトップ

ターミナル

REST SOAPAPI

Webコンソール

①EC2インスタンスへのアクセスrarr鍵認証

②Webコンソールへのアクセス

rarrパスワード認証 多要素認証 IAM

③APIへのアクセスrarrアクセスキー X509証明書 IAM

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

45

Key Pair(キーペア)を用いた鍵認証   鍵認証はユーザ名パスワードの認証よりも安全な認証方式

ダウンロードされた秘密鍵

①キーペア作成

②インスタンス起動時にemsp emsp emsp 公開鍵をコピー

公開鍵

③公開鍵秘密鍵のペアが合致するとログイン可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

46

EC2のSLA13

sect  EC2の可用性が9995 sect 上記に満たない場合はServiceクレジットを返還する

sect 詳細は sect  httpawsamazoncomec2-sla

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

47

AWSセキュリティセンター 13

 日本語のホワイトペーパー bull  セキュリティ概要 bull  リスクとコンプライアンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

48

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

49

最近追加された機能

  VM Import for Linux   IAM EC2 Resource Permissions   リザーブドインスタンスの変更更可能に   SR-‐‑‒IOVネットワークDriverネットワーク性能向上

bull  C3 I2 R3インスタンスで対応

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

50

インスタンスのさらなる追加

  一般的な目的なら M3   Compute Optimizedなら C3   Memory Optimizedなら R3(もうすぐ)   GPUが必要なら G2   IOPS重視なら I2   Disk Based Storage ならHS1

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

51

Intel Processor Features

  m3 c3 cc2 g2 cr1 i2 r3の全てが対応

  AES New Instructions (AES-‐‑‒NI)bull  c1 cg1 m2でも対応

  Advanced Vector Extensions (Intel AVX)bull  HVMでのみ対応

  Turbo Boost Technology

  詳細は httpawsamazoncomec2instance-‐‑‒types

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

52

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

53

故障のための設計 Design for Failure   故障に備えた設計をしておく

  すべてが故障しうると考えシステム全体での保守的設計   SPOF(単一障害点)の排除   障害からの復復旧(対応品質)を重視する

  EC2における故障のための設計   AMIを常にとっておく   EBSスナップショットでバックアップ   複数アベイラビリティゾーンへの分散   ELBでサーバを冗長化Auto Scalingで自動復復帰   Reserved Instanceでキャパシティ保障

  他の冗長性高いサービスとの組み合わせ   S3 SimpleDB RDS他

httpwwwslidesharenetkentamagawaaws-‐‑‒7991623

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

54

定期的なバックアップ

  EC2のAMIを定期的に作成する   (参考) 無停止でAMI取得

Cloudpackさんブログhttpblogcloudpackjp201103aws-‐‑‒news-‐‑‒ec2-‐‑‒instance-‐‑‒no-‐‑‒reboot-‐‑‒amihtml

  データボリュームとしてのEBSの場合EBSのスナップショットを定期的に作成

  スクリプトを書いて定期的なバックアップを行行うことも可能 Coderockさんブログ

httpblogdateofrockcom201003auto-‐‑‒backup-‐‑‒amazon-‐‑‒ebs-‐‑‒with-‐‑‒rubyhtml   サーバーワークスさんブログ

httpblogserverworkscojptech20110721awssdk-‐‑‒for-‐‑‒ruby-‐‑‒create-‐‑‒snapshot

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

55

Instance StorageにSSDを積んだインスタンスが増えてきた

  EC2のタイプによって選択できるInstance Storeは以下の通り

Instance Type Instance Store Volumesm1small 1 x 160 GBdaggerm1medium 1 x 410 GBm1large 2 x 420 GB (840 GB)m1xlarge 4 x 420 GB (1680 GB)m2xlarge 1 x 420 GBm22xlarge 1 x 850 GBm24xlarge 2 x 840 GB (1680 GB)m3medium 1 x 4 GB SSDm3large 1 x 32 GB SSDm3xlarge 2 x 40 GB SSD (80 GB)m32xlarge 2 x 80 GB SSD (160 GB)

t1micro None (use Amazon EBS volumes)

c1medium 1 x 350 GBdaggerc1xlarge 4 x 420 GB (1680 GB)

Instance Type Instance Store Volumes

c3large 2 x 16 GB SSD (32 GB)c3xlarge 2 x 40 GB SSD (80 GB)c32xlarge 2 x 80 GB SSD (160 GB)c34xlarge 2 x 160 GB SSD (320 GB)c38xlarge 2 x 320 GB SSD (640 GB)cc28xlarge 4 x 840 GB (3360 GB)cg14xlarge 2 x 840 GB (1680 GB)cr18xlarge 2 x 120 GB SSD (240 GB)hi14xlarge 2 x 1024 GB SSD (2048 GB)hs18xlarge 24 x 2048 GB (49 TB)i2xlarge 1 x 800 GB SSDi22xlarge 2 x 800 GB SSD (1600 GB)i24xlarge 4 x 800 GB SSD (3200 GB)i28xlarge 8 x 800 GB SSD (6400 GB)

2014年年1月29日時点

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

56

Instance Storageを使うべきなのは

 高IOPS高帯域なストレージが必要な場合

 消えても良良い一次データの置き場として使う場合

 ストレージ冗長化を準備できる場合

S3活かしたいメリット

考慮すべき制約

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

57

EC2へのファイル転送は

  SCPを使う scp pk-‐‑‒XXXpem rootec2-‐‑‒XXXamazonawscomxxx

  Windowsの場合はWinSCPなど   S3経由で共有する

  S3にアップロードしEC2からwgetでアクセスする   FTPを立立ち上げる

  EC2側でFTPサーバーを立立ち上げておく

  高速に送信したい   Tsunami UDP Aspera等のソリューション

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

58

VM Import Export

  複数プラットフォームのVMイメージをAmazon EC2に移行行(インポートエクスポート)可能

httpawstypepadcomaws_japan201012vm-‐‑‒import-‐‑‒bring-‐‑‒your-‐‑‒vmware-‐‑‒images-‐‑‒to-‐‑‒the-‐‑‒cloudhtml

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

59

稼働EC2インスタンスからメタデータ取得

  ami-‐‑‒id   ami-‐‑‒launch-‐‑‒index   ami-‐‑‒manifest-‐‑‒path   block-‐‑‒device-‐‑‒mapping   hostname   instance-‐‑‒action   instance-‐‑‒id   Instance-‐‑‒type   kernel-‐‑‒id

  local-‐‑‒hostname   local-‐‑‒ipv4   mac   network   placement   profile   public-‐‑‒hostname   public-‐‑‒ipv4   public-‐‑‒keys   reservation-‐‑‒id

curl http169254169254latestmeta-‐‑‒data

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

60

起動時にパラメーターを渡す   起動時に16KB以内で任意のものを渡せる

  ChefやPuppetなどを利利用して自己構成できるAMIに   参照emsp AWSマイスターemsp CloudFormation資料料httpwwwslidesharenetkentamagawacloudformation-‐‑‒aws5

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

61

EC2コマンドラインツール amp AWS SDKs

  コマンドラインからEC2のAPIにアクセスできるツール   ツールをインストールしセキュリティ証明書を配置

  AWS SDKs httpawsamazoncomcode

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

62

マネージメントコンソールだけでなくAPIからプログラマブルにアクセス

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1a --instance-type m1small

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1b --instance-type m1small

Tokyo リージョン

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

63

EC2のスケジュールイベント表示機能

  EC2インスタンスが稼働しているハードかソフトにメンテナンスが必要な場合に情報を提供する仕組み

  インスタンスリブートシステムリブートリタイヤ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

64

EC2のステータスチェック機能

  下記の2種類のチェックを自動テストで実行行し情報を提示   システムステータスチェック

  EC2インスタンスにネットワークパケットが通るかチェック   インスタンスステータスチェック

  EC2インスタンスのOSがネットワークパケットを受け取るかチェック

  もし状況に乖離離がある場合はレポートできます

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

65

AWS制限増加申請

  EC2を誤って大量量に作成しないよう最大インスタンス数の上限を20に制限しています

  制限増加申請フォームで各種制限の増加を行行えますbull  httpawsamazoncomjpcontact-‐‑‒usemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

66

既存EBSボリュームのサイズ変更更

  例例 10GB -‐‑‒gt 100GB変更更への流流れ   EBSをデタッチする   EBSからS3にスナップショットを作成する

  新たなボリュームサイズを指定してEBSを作成する

  EBSをアタッチする   マウントしてリサイズする

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

スナップショット

EBS (10GB)

EBS (100GB)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

67

EBSとS3

EBSは複数EC2にアタッチ不不可   単独のEC2インスタンスへのブロックデバイスとしての使い方

  NFSのような使い方をする際はEC2にミドルウェアを導入(GlusterFS等)

S3は複数のEC2からアクセス可   ただしWrite Once Read A Lotな使い方に向いている

  アップロード並列列化も使える   耐久性の設計は99999999999で非常に高い

Copyright copy 2011 Amazon Web Services

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

バケット

EBS

EC2インスタンス

HTTPHTTPS

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

68

EIP使用時の注意点

  グローバルIP(EIP)を用いた場合インターネット経由のアクセスとなり課金発生するケースがある

  名前解決したいサーバに固定IPを付与する13   各サーバは固定グローバルIPを元に

AWSのDNSに名前を問い合わせ13   問い合わせた結果返ってくる外部DNS名でサーバにアクセスを行う13   EC2内部で外部DNS名を使ってアクセスすると プライベートIPアドレスに変換されるため 目的のサーバにプライベートIPでアクセスできる13

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

69

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

70

AWSの課金金の仕組みインターネット

ELB

EC2

EBS

S3

データ転送量量

ELB利利用料料データ処理理量量

インスタンスタイプ別利利用料料

EBSの利利用料料

S3の利利用料料

大半を占める

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

71

Simple Monthly Calculator

  Web上にある計算機を使って概算費用を計算できますsect  httpcalculators3amazonawscomcalc5htmllng=ja_JP

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

72

複数の価格モデル

 課金金モデルが選べるsect 通常の時間課金金のオンデマンドインスタンス

sect ある程度度継続してEC2を使う(1年年3年年)EC2リザーブドインスタンス

sect 入札を利利用してより安く使うEC2スポットインスタンス

rarrマイスターシリーズ RIampスポットインスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

73

AWS無料料試用枠

  AWSでは無料料試用枠を用意していますbull  httpawsamazoncomjpfreeemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

74

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

75

Appendix

  参考資料料bull  Amazon Glacier Developer Guidehttpdocsamazonwebservicescomamazonglacierlatestdevintroductionhtml

bull  Amazon Glacier FAQhttpawsamazoncomjpglacierfaqs

bull  Amazon Glaceir価格httpawsamazoncomjpglacierpricing

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

76

QampA

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 20: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

20

EBSの設定

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

21

Key Pair選択   いわゆる公開鍵方式でサーバーにアクセスする初回時は秘密鍵を手元にダウンロードする

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

22

Security Groups選択

  いわゆるファイアウォールの設定作っておいたグループをサーバーに割り当てる

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

23

起動完了了

  起動完了了画面を確認し起動ウィザードを終了了

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

24

起動したインスタンスの情報確認XXXXX

パブリックDNS名

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

25

ターミナルでアクセス

ログインの際のアカウント名はAMIによって違うので注意 例) Amazon Linux -gt ec2-user その他Linuxの多く -gt root admin等

パブリックDNS名

秘密鍵

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

26

今日のAgenda

 Amazon EC2とは  Amazon EC2の基本

bull  触ってみようbull  基本コンセプト

 Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

27

Amazon Machine Image (AMI)

  AMIはインスタンス作成に使用するイメージテンプレート   AWS公式AMIやサードパーティもAMIを提供

bull  httpsawsamazoncomamisbull  httpsawsamazoncommarketplaceemsp 

  選択したAMIから起動する   EC2インスタンスから任意のタイミングでカスタムAMIを作成できる

launch

Amazon Machine Image (AMI)

Amazon EC2インスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

28

AMIとインスタンスAZの関係

インスタンス

Amazon S3

AMI

Availability Zone-1a Availability Zone-1b

カスタム AMI

AMIからインスタンスを起動

カスタムAMIを使ってインスタンスを複数台起動

カスタムAMIを作成必要に応じて共有設定

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

29

AMIの取得AMIからの起動

Copyright copy 2011 Amazon Web Services

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

30

EC2インスタンスのライフサイクル   起動したインスタンスは3つの状態を持つ

bull  Running 実行行中課金金されるbull  Stopped 停止中課金金されないbull  Terminated 終了了StopStartはできない

Running

Terminated

Stopped

StartStop

Terminate

launch

Terminate

Amazon Machine Image (AMI)

Amazon EC2インスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

31

EC2インスタンスの停止と終了了

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

32

EC2インスタンスのタイプ変更Stop(停止)しているといつでもタイプ(スペック)を変更更できる

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

33

EBSボリュームのアタッチ

Copyright copy 2011 Amazon Web Services

EC2インスタンスと同じゾーンに作ることを注意 スナップショットから複製も可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

34

EC2インスタンスのアドレス

  全てのインスタンスが下記を持つsect  Private IPアドレス(VPC内のサブネットから割り当てる)sect  Private DNS名(internal)sect  Public DNS名 (amazonawscom)

  public IPアドレスをオプションで付けられる   固定されたPublic IP Addresses はEIPと呼ぶ

sect  稼働しているEC2インスタンスに瞬時に付け外しが可能sect  インスタンスにアサインしているときは料料金金はかからない

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

35

EIPの割り当て

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

36

EIPの使いどころ

  通常のケースはEIPは必要なくEC2のPublic DNS名を用いてCNAMEで名前変換を行行う

  Route 53(名前解決サービス)でPublic DNSを用いる

  固定IPアドレスが必要なときに限りEIPを用いる   メールサーバー監視サーバー等

  メールサーバの送信制限解除逆引き申請が必要な場合は下記から申請を行行うhttpsaws-‐‑‒portalamazoncomgpawshtml-‐‑‒forms-‐‑‒controllercontactusec2-‐‑‒email-‐‑‒limit-‐‑‒rdns-‐‑‒request

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

37

リージョン間コピー(AMIEBS)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

38

Amazon EC2の関連サービス関連情報   監視負荷分散自動スケール

rarrCloudWatchELBAutoScaling   閉域網での利利用仮想ネットワーキング

rarrAmazon VPC (Virtual Private Cloud)   ① 社内ネットワークからVPN接続   ② ルーティングイントラIPアドレス仮想NIC等々

  占有サーバ rarrAmazon Dedicated Instance   専用線接続 rarrAmazon Direct Connect   Windowsemsp emsp  rarrWindowsインスタンス   スパコンrarrHPCインスタンス   アクセス管理理emsp  rarrIAM (Identity and Access Management)   料料金金関係emsp  rarrConsolidated Billing資料料集emsp httpawsamazoncomjpaws-‐‑‒meister

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

39

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

40

AWSのセキュリティの考え方

第三者認証

SOC 1SSAE 16ISAE 3402 ISO 27001 PCI DSS HIPAA ITAR

FISMA Moderate FIPS 140-2 ファシリティ

DC電源ネットワーク冗長化

Your Apps

Webサイトアプリケーションこれまでと同様のセキュリティを

お客様SI様で実現可能

インフラよりハイレベルの

セキュリティをAWSが提供

シェアードレスポンシビリティモデル(責任共有モデル)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

41

EC2の責任共有モデル

物理インタフェース

ファイアウォール

      ハイバーバイザー

Sm

all

Larg

e

hellip

Sm

all Amazon EC2

インスタンス

物理ホスト

ユーザーが 責任を持って 管理する

AWSが 責任を持って 管理する

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

42

ファイアウォールを実現するSecurity Group

  インスタンスのINOUTトラフィックを制限するファイアウォール機能

  デフォルトIN向けは全トラフィック閉

  必要な受信アクセスに対してアクセスルールを定義する

bull  プロトコル( TCPUDP)bull  宛先ポートbull  アクセス元IP Security Group

  ルールをひとまとめにしたテンプレートを Security Groupと呼ぶ

EC2 インスタンス

ポート22(SSH)

ポート80(HTTP)

EC2ファイアウォール

Security Group

ポート25(SMTP)

ポート22(SSH)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

43

Security Groupの使い方   インスタンスの用途に応じたSecurity Groupを用意する

bull  Webサーバ用DBサーバ用メールサーバ用等   アクセス元にSecurity Groupも設定して限定可能

Webサーバ

Webサーバ

DBサーバ

sg-1234

22 00000 80 00000 25 sg-1234

sg-1234

sg-1234

sg-abcd sg-abcd

22 00000 3306 sg-1234

Webサーバ

sg-xyz

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

44

セキュリティ証明書

仮想サーバ(Amazon EC2)Windows( スタンダード)

コマンドライン SDK利利用

SSH公開鍵認証

仮想デスクトップ

ターミナル

REST SOAPAPI

Webコンソール

①EC2インスタンスへのアクセスrarr鍵認証

②Webコンソールへのアクセス

rarrパスワード認証 多要素認証 IAM

③APIへのアクセスrarrアクセスキー X509証明書 IAM

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

45

Key Pair(キーペア)を用いた鍵認証   鍵認証はユーザ名パスワードの認証よりも安全な認証方式

ダウンロードされた秘密鍵

①キーペア作成

②インスタンス起動時にemsp emsp emsp 公開鍵をコピー

公開鍵

③公開鍵秘密鍵のペアが合致するとログイン可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

46

EC2のSLA13

sect  EC2の可用性が9995 sect 上記に満たない場合はServiceクレジットを返還する

sect 詳細は sect  httpawsamazoncomec2-sla

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

47

AWSセキュリティセンター 13

 日本語のホワイトペーパー bull  セキュリティ概要 bull  リスクとコンプライアンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

48

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

49

最近追加された機能

  VM Import for Linux   IAM EC2 Resource Permissions   リザーブドインスタンスの変更更可能に   SR-‐‑‒IOVネットワークDriverネットワーク性能向上

bull  C3 I2 R3インスタンスで対応

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

50

インスタンスのさらなる追加

  一般的な目的なら M3   Compute Optimizedなら C3   Memory Optimizedなら R3(もうすぐ)   GPUが必要なら G2   IOPS重視なら I2   Disk Based Storage ならHS1

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

51

Intel Processor Features

  m3 c3 cc2 g2 cr1 i2 r3の全てが対応

  AES New Instructions (AES-‐‑‒NI)bull  c1 cg1 m2でも対応

  Advanced Vector Extensions (Intel AVX)bull  HVMでのみ対応

  Turbo Boost Technology

  詳細は httpawsamazoncomec2instance-‐‑‒types

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

52

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

53

故障のための設計 Design for Failure   故障に備えた設計をしておく

  すべてが故障しうると考えシステム全体での保守的設計   SPOF(単一障害点)の排除   障害からの復復旧(対応品質)を重視する

  EC2における故障のための設計   AMIを常にとっておく   EBSスナップショットでバックアップ   複数アベイラビリティゾーンへの分散   ELBでサーバを冗長化Auto Scalingで自動復復帰   Reserved Instanceでキャパシティ保障

  他の冗長性高いサービスとの組み合わせ   S3 SimpleDB RDS他

httpwwwslidesharenetkentamagawaaws-‐‑‒7991623

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

54

定期的なバックアップ

  EC2のAMIを定期的に作成する   (参考) 無停止でAMI取得

Cloudpackさんブログhttpblogcloudpackjp201103aws-‐‑‒news-‐‑‒ec2-‐‑‒instance-‐‑‒no-‐‑‒reboot-‐‑‒amihtml

  データボリュームとしてのEBSの場合EBSのスナップショットを定期的に作成

  スクリプトを書いて定期的なバックアップを行行うことも可能 Coderockさんブログ

httpblogdateofrockcom201003auto-‐‑‒backup-‐‑‒amazon-‐‑‒ebs-‐‑‒with-‐‑‒rubyhtml   サーバーワークスさんブログ

httpblogserverworkscojptech20110721awssdk-‐‑‒for-‐‑‒ruby-‐‑‒create-‐‑‒snapshot

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

55

Instance StorageにSSDを積んだインスタンスが増えてきた

  EC2のタイプによって選択できるInstance Storeは以下の通り

Instance Type Instance Store Volumesm1small 1 x 160 GBdaggerm1medium 1 x 410 GBm1large 2 x 420 GB (840 GB)m1xlarge 4 x 420 GB (1680 GB)m2xlarge 1 x 420 GBm22xlarge 1 x 850 GBm24xlarge 2 x 840 GB (1680 GB)m3medium 1 x 4 GB SSDm3large 1 x 32 GB SSDm3xlarge 2 x 40 GB SSD (80 GB)m32xlarge 2 x 80 GB SSD (160 GB)

t1micro None (use Amazon EBS volumes)

c1medium 1 x 350 GBdaggerc1xlarge 4 x 420 GB (1680 GB)

Instance Type Instance Store Volumes

c3large 2 x 16 GB SSD (32 GB)c3xlarge 2 x 40 GB SSD (80 GB)c32xlarge 2 x 80 GB SSD (160 GB)c34xlarge 2 x 160 GB SSD (320 GB)c38xlarge 2 x 320 GB SSD (640 GB)cc28xlarge 4 x 840 GB (3360 GB)cg14xlarge 2 x 840 GB (1680 GB)cr18xlarge 2 x 120 GB SSD (240 GB)hi14xlarge 2 x 1024 GB SSD (2048 GB)hs18xlarge 24 x 2048 GB (49 TB)i2xlarge 1 x 800 GB SSDi22xlarge 2 x 800 GB SSD (1600 GB)i24xlarge 4 x 800 GB SSD (3200 GB)i28xlarge 8 x 800 GB SSD (6400 GB)

2014年年1月29日時点

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

56

Instance Storageを使うべきなのは

 高IOPS高帯域なストレージが必要な場合

 消えても良良い一次データの置き場として使う場合

 ストレージ冗長化を準備できる場合

S3活かしたいメリット

考慮すべき制約

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

57

EC2へのファイル転送は

  SCPを使う scp pk-‐‑‒XXXpem rootec2-‐‑‒XXXamazonawscomxxx

  Windowsの場合はWinSCPなど   S3経由で共有する

  S3にアップロードしEC2からwgetでアクセスする   FTPを立立ち上げる

  EC2側でFTPサーバーを立立ち上げておく

  高速に送信したい   Tsunami UDP Aspera等のソリューション

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

58

VM Import Export

  複数プラットフォームのVMイメージをAmazon EC2に移行行(インポートエクスポート)可能

httpawstypepadcomaws_japan201012vm-‐‑‒import-‐‑‒bring-‐‑‒your-‐‑‒vmware-‐‑‒images-‐‑‒to-‐‑‒the-‐‑‒cloudhtml

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

59

稼働EC2インスタンスからメタデータ取得

  ami-‐‑‒id   ami-‐‑‒launch-‐‑‒index   ami-‐‑‒manifest-‐‑‒path   block-‐‑‒device-‐‑‒mapping   hostname   instance-‐‑‒action   instance-‐‑‒id   Instance-‐‑‒type   kernel-‐‑‒id

  local-‐‑‒hostname   local-‐‑‒ipv4   mac   network   placement   profile   public-‐‑‒hostname   public-‐‑‒ipv4   public-‐‑‒keys   reservation-‐‑‒id

curl http169254169254latestmeta-‐‑‒data

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

60

起動時にパラメーターを渡す   起動時に16KB以内で任意のものを渡せる

  ChefやPuppetなどを利利用して自己構成できるAMIに   参照emsp AWSマイスターemsp CloudFormation資料料httpwwwslidesharenetkentamagawacloudformation-‐‑‒aws5

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

61

EC2コマンドラインツール amp AWS SDKs

  コマンドラインからEC2のAPIにアクセスできるツール   ツールをインストールしセキュリティ証明書を配置

  AWS SDKs httpawsamazoncomcode

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

62

マネージメントコンソールだけでなくAPIからプログラマブルにアクセス

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1a --instance-type m1small

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1b --instance-type m1small

Tokyo リージョン

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

63

EC2のスケジュールイベント表示機能

  EC2インスタンスが稼働しているハードかソフトにメンテナンスが必要な場合に情報を提供する仕組み

  インスタンスリブートシステムリブートリタイヤ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

64

EC2のステータスチェック機能

  下記の2種類のチェックを自動テストで実行行し情報を提示   システムステータスチェック

  EC2インスタンスにネットワークパケットが通るかチェック   インスタンスステータスチェック

  EC2インスタンスのOSがネットワークパケットを受け取るかチェック

  もし状況に乖離離がある場合はレポートできます

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

65

AWS制限増加申請

  EC2を誤って大量量に作成しないよう最大インスタンス数の上限を20に制限しています

  制限増加申請フォームで各種制限の増加を行行えますbull  httpawsamazoncomjpcontact-‐‑‒usemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

66

既存EBSボリュームのサイズ変更更

  例例 10GB -‐‑‒gt 100GB変更更への流流れ   EBSをデタッチする   EBSからS3にスナップショットを作成する

  新たなボリュームサイズを指定してEBSを作成する

  EBSをアタッチする   マウントしてリサイズする

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

スナップショット

EBS (10GB)

EBS (100GB)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

67

EBSとS3

EBSは複数EC2にアタッチ不不可   単独のEC2インスタンスへのブロックデバイスとしての使い方

  NFSのような使い方をする際はEC2にミドルウェアを導入(GlusterFS等)

S3は複数のEC2からアクセス可   ただしWrite Once Read A Lotな使い方に向いている

  アップロード並列列化も使える   耐久性の設計は99999999999で非常に高い

Copyright copy 2011 Amazon Web Services

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

バケット

EBS

EC2インスタンス

HTTPHTTPS

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

68

EIP使用時の注意点

  グローバルIP(EIP)を用いた場合インターネット経由のアクセスとなり課金発生するケースがある

  名前解決したいサーバに固定IPを付与する13   各サーバは固定グローバルIPを元に

AWSのDNSに名前を問い合わせ13   問い合わせた結果返ってくる外部DNS名でサーバにアクセスを行う13   EC2内部で外部DNS名を使ってアクセスすると プライベートIPアドレスに変換されるため 目的のサーバにプライベートIPでアクセスできる13

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

69

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

70

AWSの課金金の仕組みインターネット

ELB

EC2

EBS

S3

データ転送量量

ELB利利用料料データ処理理量量

インスタンスタイプ別利利用料料

EBSの利利用料料

S3の利利用料料

大半を占める

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

71

Simple Monthly Calculator

  Web上にある計算機を使って概算費用を計算できますsect  httpcalculators3amazonawscomcalc5htmllng=ja_JP

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

72

複数の価格モデル

 課金金モデルが選べるsect 通常の時間課金金のオンデマンドインスタンス

sect ある程度度継続してEC2を使う(1年年3年年)EC2リザーブドインスタンス

sect 入札を利利用してより安く使うEC2スポットインスタンス

rarrマイスターシリーズ RIampスポットインスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

73

AWS無料料試用枠

  AWSでは無料料試用枠を用意していますbull  httpawsamazoncomjpfreeemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

74

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

75

Appendix

  参考資料料bull  Amazon Glacier Developer Guidehttpdocsamazonwebservicescomamazonglacierlatestdevintroductionhtml

bull  Amazon Glacier FAQhttpawsamazoncomjpglacierfaqs

bull  Amazon Glaceir価格httpawsamazoncomjpglacierpricing

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

76

QampA

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 21: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

21

Key Pair選択   いわゆる公開鍵方式でサーバーにアクセスする初回時は秘密鍵を手元にダウンロードする

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

22

Security Groups選択

  いわゆるファイアウォールの設定作っておいたグループをサーバーに割り当てる

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

23

起動完了了

  起動完了了画面を確認し起動ウィザードを終了了

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

24

起動したインスタンスの情報確認XXXXX

パブリックDNS名

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

25

ターミナルでアクセス

ログインの際のアカウント名はAMIによって違うので注意 例) Amazon Linux -gt ec2-user その他Linuxの多く -gt root admin等

パブリックDNS名

秘密鍵

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

26

今日のAgenda

 Amazon EC2とは  Amazon EC2の基本

bull  触ってみようbull  基本コンセプト

 Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

27

Amazon Machine Image (AMI)

  AMIはインスタンス作成に使用するイメージテンプレート   AWS公式AMIやサードパーティもAMIを提供

bull  httpsawsamazoncomamisbull  httpsawsamazoncommarketplaceemsp 

  選択したAMIから起動する   EC2インスタンスから任意のタイミングでカスタムAMIを作成できる

launch

Amazon Machine Image (AMI)

Amazon EC2インスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

28

AMIとインスタンスAZの関係

インスタンス

Amazon S3

AMI

Availability Zone-1a Availability Zone-1b

カスタム AMI

AMIからインスタンスを起動

カスタムAMIを使ってインスタンスを複数台起動

カスタムAMIを作成必要に応じて共有設定

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

29

AMIの取得AMIからの起動

Copyright copy 2011 Amazon Web Services

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

30

EC2インスタンスのライフサイクル   起動したインスタンスは3つの状態を持つ

bull  Running 実行行中課金金されるbull  Stopped 停止中課金金されないbull  Terminated 終了了StopStartはできない

Running

Terminated

Stopped

StartStop

Terminate

launch

Terminate

Amazon Machine Image (AMI)

Amazon EC2インスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

31

EC2インスタンスの停止と終了了

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

32

EC2インスタンスのタイプ変更Stop(停止)しているといつでもタイプ(スペック)を変更更できる

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

33

EBSボリュームのアタッチ

Copyright copy 2011 Amazon Web Services

EC2インスタンスと同じゾーンに作ることを注意 スナップショットから複製も可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

34

EC2インスタンスのアドレス

  全てのインスタンスが下記を持つsect  Private IPアドレス(VPC内のサブネットから割り当てる)sect  Private DNS名(internal)sect  Public DNS名 (amazonawscom)

  public IPアドレスをオプションで付けられる   固定されたPublic IP Addresses はEIPと呼ぶ

sect  稼働しているEC2インスタンスに瞬時に付け外しが可能sect  インスタンスにアサインしているときは料料金金はかからない

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

35

EIPの割り当て

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

36

EIPの使いどころ

  通常のケースはEIPは必要なくEC2のPublic DNS名を用いてCNAMEで名前変換を行行う

  Route 53(名前解決サービス)でPublic DNSを用いる

  固定IPアドレスが必要なときに限りEIPを用いる   メールサーバー監視サーバー等

  メールサーバの送信制限解除逆引き申請が必要な場合は下記から申請を行行うhttpsaws-‐‑‒portalamazoncomgpawshtml-‐‑‒forms-‐‑‒controllercontactusec2-‐‑‒email-‐‑‒limit-‐‑‒rdns-‐‑‒request

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

37

リージョン間コピー(AMIEBS)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

38

Amazon EC2の関連サービス関連情報   監視負荷分散自動スケール

rarrCloudWatchELBAutoScaling   閉域網での利利用仮想ネットワーキング

rarrAmazon VPC (Virtual Private Cloud)   ① 社内ネットワークからVPN接続   ② ルーティングイントラIPアドレス仮想NIC等々

  占有サーバ rarrAmazon Dedicated Instance   専用線接続 rarrAmazon Direct Connect   Windowsemsp emsp  rarrWindowsインスタンス   スパコンrarrHPCインスタンス   アクセス管理理emsp  rarrIAM (Identity and Access Management)   料料金金関係emsp  rarrConsolidated Billing資料料集emsp httpawsamazoncomjpaws-‐‑‒meister

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

39

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

40

AWSのセキュリティの考え方

第三者認証

SOC 1SSAE 16ISAE 3402 ISO 27001 PCI DSS HIPAA ITAR

FISMA Moderate FIPS 140-2 ファシリティ

DC電源ネットワーク冗長化

Your Apps

Webサイトアプリケーションこれまでと同様のセキュリティを

お客様SI様で実現可能

インフラよりハイレベルの

セキュリティをAWSが提供

シェアードレスポンシビリティモデル(責任共有モデル)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

41

EC2の責任共有モデル

物理インタフェース

ファイアウォール

      ハイバーバイザー

Sm

all

Larg

e

hellip

Sm

all Amazon EC2

インスタンス

物理ホスト

ユーザーが 責任を持って 管理する

AWSが 責任を持って 管理する

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

42

ファイアウォールを実現するSecurity Group

  インスタンスのINOUTトラフィックを制限するファイアウォール機能

  デフォルトIN向けは全トラフィック閉

  必要な受信アクセスに対してアクセスルールを定義する

bull  プロトコル( TCPUDP)bull  宛先ポートbull  アクセス元IP Security Group

  ルールをひとまとめにしたテンプレートを Security Groupと呼ぶ

EC2 インスタンス

ポート22(SSH)

ポート80(HTTP)

EC2ファイアウォール

Security Group

ポート25(SMTP)

ポート22(SSH)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

43

Security Groupの使い方   インスタンスの用途に応じたSecurity Groupを用意する

bull  Webサーバ用DBサーバ用メールサーバ用等   アクセス元にSecurity Groupも設定して限定可能

Webサーバ

Webサーバ

DBサーバ

sg-1234

22 00000 80 00000 25 sg-1234

sg-1234

sg-1234

sg-abcd sg-abcd

22 00000 3306 sg-1234

Webサーバ

sg-xyz

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

44

セキュリティ証明書

仮想サーバ(Amazon EC2)Windows( スタンダード)

コマンドライン SDK利利用

SSH公開鍵認証

仮想デスクトップ

ターミナル

REST SOAPAPI

Webコンソール

①EC2インスタンスへのアクセスrarr鍵認証

②Webコンソールへのアクセス

rarrパスワード認証 多要素認証 IAM

③APIへのアクセスrarrアクセスキー X509証明書 IAM

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

45

Key Pair(キーペア)を用いた鍵認証   鍵認証はユーザ名パスワードの認証よりも安全な認証方式

ダウンロードされた秘密鍵

①キーペア作成

②インスタンス起動時にemsp emsp emsp 公開鍵をコピー

公開鍵

③公開鍵秘密鍵のペアが合致するとログイン可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

46

EC2のSLA13

sect  EC2の可用性が9995 sect 上記に満たない場合はServiceクレジットを返還する

sect 詳細は sect  httpawsamazoncomec2-sla

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

47

AWSセキュリティセンター 13

 日本語のホワイトペーパー bull  セキュリティ概要 bull  リスクとコンプライアンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

48

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

49

最近追加された機能

  VM Import for Linux   IAM EC2 Resource Permissions   リザーブドインスタンスの変更更可能に   SR-‐‑‒IOVネットワークDriverネットワーク性能向上

bull  C3 I2 R3インスタンスで対応

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

50

インスタンスのさらなる追加

  一般的な目的なら M3   Compute Optimizedなら C3   Memory Optimizedなら R3(もうすぐ)   GPUが必要なら G2   IOPS重視なら I2   Disk Based Storage ならHS1

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

51

Intel Processor Features

  m3 c3 cc2 g2 cr1 i2 r3の全てが対応

  AES New Instructions (AES-‐‑‒NI)bull  c1 cg1 m2でも対応

  Advanced Vector Extensions (Intel AVX)bull  HVMでのみ対応

  Turbo Boost Technology

  詳細は httpawsamazoncomec2instance-‐‑‒types

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

52

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

53

故障のための設計 Design for Failure   故障に備えた設計をしておく

  すべてが故障しうると考えシステム全体での保守的設計   SPOF(単一障害点)の排除   障害からの復復旧(対応品質)を重視する

  EC2における故障のための設計   AMIを常にとっておく   EBSスナップショットでバックアップ   複数アベイラビリティゾーンへの分散   ELBでサーバを冗長化Auto Scalingで自動復復帰   Reserved Instanceでキャパシティ保障

  他の冗長性高いサービスとの組み合わせ   S3 SimpleDB RDS他

httpwwwslidesharenetkentamagawaaws-‐‑‒7991623

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

54

定期的なバックアップ

  EC2のAMIを定期的に作成する   (参考) 無停止でAMI取得

Cloudpackさんブログhttpblogcloudpackjp201103aws-‐‑‒news-‐‑‒ec2-‐‑‒instance-‐‑‒no-‐‑‒reboot-‐‑‒amihtml

  データボリュームとしてのEBSの場合EBSのスナップショットを定期的に作成

  スクリプトを書いて定期的なバックアップを行行うことも可能 Coderockさんブログ

httpblogdateofrockcom201003auto-‐‑‒backup-‐‑‒amazon-‐‑‒ebs-‐‑‒with-‐‑‒rubyhtml   サーバーワークスさんブログ

httpblogserverworkscojptech20110721awssdk-‐‑‒for-‐‑‒ruby-‐‑‒create-‐‑‒snapshot

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

55

Instance StorageにSSDを積んだインスタンスが増えてきた

  EC2のタイプによって選択できるInstance Storeは以下の通り

Instance Type Instance Store Volumesm1small 1 x 160 GBdaggerm1medium 1 x 410 GBm1large 2 x 420 GB (840 GB)m1xlarge 4 x 420 GB (1680 GB)m2xlarge 1 x 420 GBm22xlarge 1 x 850 GBm24xlarge 2 x 840 GB (1680 GB)m3medium 1 x 4 GB SSDm3large 1 x 32 GB SSDm3xlarge 2 x 40 GB SSD (80 GB)m32xlarge 2 x 80 GB SSD (160 GB)

t1micro None (use Amazon EBS volumes)

c1medium 1 x 350 GBdaggerc1xlarge 4 x 420 GB (1680 GB)

Instance Type Instance Store Volumes

c3large 2 x 16 GB SSD (32 GB)c3xlarge 2 x 40 GB SSD (80 GB)c32xlarge 2 x 80 GB SSD (160 GB)c34xlarge 2 x 160 GB SSD (320 GB)c38xlarge 2 x 320 GB SSD (640 GB)cc28xlarge 4 x 840 GB (3360 GB)cg14xlarge 2 x 840 GB (1680 GB)cr18xlarge 2 x 120 GB SSD (240 GB)hi14xlarge 2 x 1024 GB SSD (2048 GB)hs18xlarge 24 x 2048 GB (49 TB)i2xlarge 1 x 800 GB SSDi22xlarge 2 x 800 GB SSD (1600 GB)i24xlarge 4 x 800 GB SSD (3200 GB)i28xlarge 8 x 800 GB SSD (6400 GB)

2014年年1月29日時点

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

56

Instance Storageを使うべきなのは

 高IOPS高帯域なストレージが必要な場合

 消えても良良い一次データの置き場として使う場合

 ストレージ冗長化を準備できる場合

S3活かしたいメリット

考慮すべき制約

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

57

EC2へのファイル転送は

  SCPを使う scp pk-‐‑‒XXXpem rootec2-‐‑‒XXXamazonawscomxxx

  Windowsの場合はWinSCPなど   S3経由で共有する

  S3にアップロードしEC2からwgetでアクセスする   FTPを立立ち上げる

  EC2側でFTPサーバーを立立ち上げておく

  高速に送信したい   Tsunami UDP Aspera等のソリューション

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

58

VM Import Export

  複数プラットフォームのVMイメージをAmazon EC2に移行行(インポートエクスポート)可能

httpawstypepadcomaws_japan201012vm-‐‑‒import-‐‑‒bring-‐‑‒your-‐‑‒vmware-‐‑‒images-‐‑‒to-‐‑‒the-‐‑‒cloudhtml

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

59

稼働EC2インスタンスからメタデータ取得

  ami-‐‑‒id   ami-‐‑‒launch-‐‑‒index   ami-‐‑‒manifest-‐‑‒path   block-‐‑‒device-‐‑‒mapping   hostname   instance-‐‑‒action   instance-‐‑‒id   Instance-‐‑‒type   kernel-‐‑‒id

  local-‐‑‒hostname   local-‐‑‒ipv4   mac   network   placement   profile   public-‐‑‒hostname   public-‐‑‒ipv4   public-‐‑‒keys   reservation-‐‑‒id

curl http169254169254latestmeta-‐‑‒data

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

60

起動時にパラメーターを渡す   起動時に16KB以内で任意のものを渡せる

  ChefやPuppetなどを利利用して自己構成できるAMIに   参照emsp AWSマイスターemsp CloudFormation資料料httpwwwslidesharenetkentamagawacloudformation-‐‑‒aws5

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

61

EC2コマンドラインツール amp AWS SDKs

  コマンドラインからEC2のAPIにアクセスできるツール   ツールをインストールしセキュリティ証明書を配置

  AWS SDKs httpawsamazoncomcode

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

62

マネージメントコンソールだけでなくAPIからプログラマブルにアクセス

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1a --instance-type m1small

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1b --instance-type m1small

Tokyo リージョン

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

63

EC2のスケジュールイベント表示機能

  EC2インスタンスが稼働しているハードかソフトにメンテナンスが必要な場合に情報を提供する仕組み

  インスタンスリブートシステムリブートリタイヤ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

64

EC2のステータスチェック機能

  下記の2種類のチェックを自動テストで実行行し情報を提示   システムステータスチェック

  EC2インスタンスにネットワークパケットが通るかチェック   インスタンスステータスチェック

  EC2インスタンスのOSがネットワークパケットを受け取るかチェック

  もし状況に乖離離がある場合はレポートできます

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

65

AWS制限増加申請

  EC2を誤って大量量に作成しないよう最大インスタンス数の上限を20に制限しています

  制限増加申請フォームで各種制限の増加を行行えますbull  httpawsamazoncomjpcontact-‐‑‒usemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

66

既存EBSボリュームのサイズ変更更

  例例 10GB -‐‑‒gt 100GB変更更への流流れ   EBSをデタッチする   EBSからS3にスナップショットを作成する

  新たなボリュームサイズを指定してEBSを作成する

  EBSをアタッチする   マウントしてリサイズする

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

スナップショット

EBS (10GB)

EBS (100GB)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

67

EBSとS3

EBSは複数EC2にアタッチ不不可   単独のEC2インスタンスへのブロックデバイスとしての使い方

  NFSのような使い方をする際はEC2にミドルウェアを導入(GlusterFS等)

S3は複数のEC2からアクセス可   ただしWrite Once Read A Lotな使い方に向いている

  アップロード並列列化も使える   耐久性の設計は99999999999で非常に高い

Copyright copy 2011 Amazon Web Services

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

バケット

EBS

EC2インスタンス

HTTPHTTPS

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

68

EIP使用時の注意点

  グローバルIP(EIP)を用いた場合インターネット経由のアクセスとなり課金発生するケースがある

  名前解決したいサーバに固定IPを付与する13   各サーバは固定グローバルIPを元に

AWSのDNSに名前を問い合わせ13   問い合わせた結果返ってくる外部DNS名でサーバにアクセスを行う13   EC2内部で外部DNS名を使ってアクセスすると プライベートIPアドレスに変換されるため 目的のサーバにプライベートIPでアクセスできる13

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

69

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

70

AWSの課金金の仕組みインターネット

ELB

EC2

EBS

S3

データ転送量量

ELB利利用料料データ処理理量量

インスタンスタイプ別利利用料料

EBSの利利用料料

S3の利利用料料

大半を占める

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

71

Simple Monthly Calculator

  Web上にある計算機を使って概算費用を計算できますsect  httpcalculators3amazonawscomcalc5htmllng=ja_JP

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

72

複数の価格モデル

 課金金モデルが選べるsect 通常の時間課金金のオンデマンドインスタンス

sect ある程度度継続してEC2を使う(1年年3年年)EC2リザーブドインスタンス

sect 入札を利利用してより安く使うEC2スポットインスタンス

rarrマイスターシリーズ RIampスポットインスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

73

AWS無料料試用枠

  AWSでは無料料試用枠を用意していますbull  httpawsamazoncomjpfreeemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

74

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

75

Appendix

  参考資料料bull  Amazon Glacier Developer Guidehttpdocsamazonwebservicescomamazonglacierlatestdevintroductionhtml

bull  Amazon Glacier FAQhttpawsamazoncomjpglacierfaqs

bull  Amazon Glaceir価格httpawsamazoncomjpglacierpricing

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

76

QampA

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 22: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

22

Security Groups選択

  いわゆるファイアウォールの設定作っておいたグループをサーバーに割り当てる

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

23

起動完了了

  起動完了了画面を確認し起動ウィザードを終了了

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

24

起動したインスタンスの情報確認XXXXX

パブリックDNS名

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

25

ターミナルでアクセス

ログインの際のアカウント名はAMIによって違うので注意 例) Amazon Linux -gt ec2-user その他Linuxの多く -gt root admin等

パブリックDNS名

秘密鍵

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

26

今日のAgenda

 Amazon EC2とは  Amazon EC2の基本

bull  触ってみようbull  基本コンセプト

 Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

27

Amazon Machine Image (AMI)

  AMIはインスタンス作成に使用するイメージテンプレート   AWS公式AMIやサードパーティもAMIを提供

bull  httpsawsamazoncomamisbull  httpsawsamazoncommarketplaceemsp 

  選択したAMIから起動する   EC2インスタンスから任意のタイミングでカスタムAMIを作成できる

launch

Amazon Machine Image (AMI)

Amazon EC2インスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

28

AMIとインスタンスAZの関係

インスタンス

Amazon S3

AMI

Availability Zone-1a Availability Zone-1b

カスタム AMI

AMIからインスタンスを起動

カスタムAMIを使ってインスタンスを複数台起動

カスタムAMIを作成必要に応じて共有設定

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

29

AMIの取得AMIからの起動

Copyright copy 2011 Amazon Web Services

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

30

EC2インスタンスのライフサイクル   起動したインスタンスは3つの状態を持つ

bull  Running 実行行中課金金されるbull  Stopped 停止中課金金されないbull  Terminated 終了了StopStartはできない

Running

Terminated

Stopped

StartStop

Terminate

launch

Terminate

Amazon Machine Image (AMI)

Amazon EC2インスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

31

EC2インスタンスの停止と終了了

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

32

EC2インスタンスのタイプ変更Stop(停止)しているといつでもタイプ(スペック)を変更更できる

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

33

EBSボリュームのアタッチ

Copyright copy 2011 Amazon Web Services

EC2インスタンスと同じゾーンに作ることを注意 スナップショットから複製も可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

34

EC2インスタンスのアドレス

  全てのインスタンスが下記を持つsect  Private IPアドレス(VPC内のサブネットから割り当てる)sect  Private DNS名(internal)sect  Public DNS名 (amazonawscom)

  public IPアドレスをオプションで付けられる   固定されたPublic IP Addresses はEIPと呼ぶ

sect  稼働しているEC2インスタンスに瞬時に付け外しが可能sect  インスタンスにアサインしているときは料料金金はかからない

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

35

EIPの割り当て

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

36

EIPの使いどころ

  通常のケースはEIPは必要なくEC2のPublic DNS名を用いてCNAMEで名前変換を行行う

  Route 53(名前解決サービス)でPublic DNSを用いる

  固定IPアドレスが必要なときに限りEIPを用いる   メールサーバー監視サーバー等

  メールサーバの送信制限解除逆引き申請が必要な場合は下記から申請を行行うhttpsaws-‐‑‒portalamazoncomgpawshtml-‐‑‒forms-‐‑‒controllercontactusec2-‐‑‒email-‐‑‒limit-‐‑‒rdns-‐‑‒request

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

37

リージョン間コピー(AMIEBS)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

38

Amazon EC2の関連サービス関連情報   監視負荷分散自動スケール

rarrCloudWatchELBAutoScaling   閉域網での利利用仮想ネットワーキング

rarrAmazon VPC (Virtual Private Cloud)   ① 社内ネットワークからVPN接続   ② ルーティングイントラIPアドレス仮想NIC等々

  占有サーバ rarrAmazon Dedicated Instance   専用線接続 rarrAmazon Direct Connect   Windowsemsp emsp  rarrWindowsインスタンス   スパコンrarrHPCインスタンス   アクセス管理理emsp  rarrIAM (Identity and Access Management)   料料金金関係emsp  rarrConsolidated Billing資料料集emsp httpawsamazoncomjpaws-‐‑‒meister

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

39

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

40

AWSのセキュリティの考え方

第三者認証

SOC 1SSAE 16ISAE 3402 ISO 27001 PCI DSS HIPAA ITAR

FISMA Moderate FIPS 140-2 ファシリティ

DC電源ネットワーク冗長化

Your Apps

Webサイトアプリケーションこれまでと同様のセキュリティを

お客様SI様で実現可能

インフラよりハイレベルの

セキュリティをAWSが提供

シェアードレスポンシビリティモデル(責任共有モデル)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

41

EC2の責任共有モデル

物理インタフェース

ファイアウォール

      ハイバーバイザー

Sm

all

Larg

e

hellip

Sm

all Amazon EC2

インスタンス

物理ホスト

ユーザーが 責任を持って 管理する

AWSが 責任を持って 管理する

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

42

ファイアウォールを実現するSecurity Group

  インスタンスのINOUTトラフィックを制限するファイアウォール機能

  デフォルトIN向けは全トラフィック閉

  必要な受信アクセスに対してアクセスルールを定義する

bull  プロトコル( TCPUDP)bull  宛先ポートbull  アクセス元IP Security Group

  ルールをひとまとめにしたテンプレートを Security Groupと呼ぶ

EC2 インスタンス

ポート22(SSH)

ポート80(HTTP)

EC2ファイアウォール

Security Group

ポート25(SMTP)

ポート22(SSH)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

43

Security Groupの使い方   インスタンスの用途に応じたSecurity Groupを用意する

bull  Webサーバ用DBサーバ用メールサーバ用等   アクセス元にSecurity Groupも設定して限定可能

Webサーバ

Webサーバ

DBサーバ

sg-1234

22 00000 80 00000 25 sg-1234

sg-1234

sg-1234

sg-abcd sg-abcd

22 00000 3306 sg-1234

Webサーバ

sg-xyz

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

44

セキュリティ証明書

仮想サーバ(Amazon EC2)Windows( スタンダード)

コマンドライン SDK利利用

SSH公開鍵認証

仮想デスクトップ

ターミナル

REST SOAPAPI

Webコンソール

①EC2インスタンスへのアクセスrarr鍵認証

②Webコンソールへのアクセス

rarrパスワード認証 多要素認証 IAM

③APIへのアクセスrarrアクセスキー X509証明書 IAM

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

45

Key Pair(キーペア)を用いた鍵認証   鍵認証はユーザ名パスワードの認証よりも安全な認証方式

ダウンロードされた秘密鍵

①キーペア作成

②インスタンス起動時にemsp emsp emsp 公開鍵をコピー

公開鍵

③公開鍵秘密鍵のペアが合致するとログイン可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

46

EC2のSLA13

sect  EC2の可用性が9995 sect 上記に満たない場合はServiceクレジットを返還する

sect 詳細は sect  httpawsamazoncomec2-sla

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

47

AWSセキュリティセンター 13

 日本語のホワイトペーパー bull  セキュリティ概要 bull  リスクとコンプライアンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

48

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

49

最近追加された機能

  VM Import for Linux   IAM EC2 Resource Permissions   リザーブドインスタンスの変更更可能に   SR-‐‑‒IOVネットワークDriverネットワーク性能向上

bull  C3 I2 R3インスタンスで対応

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

50

インスタンスのさらなる追加

  一般的な目的なら M3   Compute Optimizedなら C3   Memory Optimizedなら R3(もうすぐ)   GPUが必要なら G2   IOPS重視なら I2   Disk Based Storage ならHS1

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

51

Intel Processor Features

  m3 c3 cc2 g2 cr1 i2 r3の全てが対応

  AES New Instructions (AES-‐‑‒NI)bull  c1 cg1 m2でも対応

  Advanced Vector Extensions (Intel AVX)bull  HVMでのみ対応

  Turbo Boost Technology

  詳細は httpawsamazoncomec2instance-‐‑‒types

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

52

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

53

故障のための設計 Design for Failure   故障に備えた設計をしておく

  すべてが故障しうると考えシステム全体での保守的設計   SPOF(単一障害点)の排除   障害からの復復旧(対応品質)を重視する

  EC2における故障のための設計   AMIを常にとっておく   EBSスナップショットでバックアップ   複数アベイラビリティゾーンへの分散   ELBでサーバを冗長化Auto Scalingで自動復復帰   Reserved Instanceでキャパシティ保障

  他の冗長性高いサービスとの組み合わせ   S3 SimpleDB RDS他

httpwwwslidesharenetkentamagawaaws-‐‑‒7991623

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

54

定期的なバックアップ

  EC2のAMIを定期的に作成する   (参考) 無停止でAMI取得

Cloudpackさんブログhttpblogcloudpackjp201103aws-‐‑‒news-‐‑‒ec2-‐‑‒instance-‐‑‒no-‐‑‒reboot-‐‑‒amihtml

  データボリュームとしてのEBSの場合EBSのスナップショットを定期的に作成

  スクリプトを書いて定期的なバックアップを行行うことも可能 Coderockさんブログ

httpblogdateofrockcom201003auto-‐‑‒backup-‐‑‒amazon-‐‑‒ebs-‐‑‒with-‐‑‒rubyhtml   サーバーワークスさんブログ

httpblogserverworkscojptech20110721awssdk-‐‑‒for-‐‑‒ruby-‐‑‒create-‐‑‒snapshot

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

55

Instance StorageにSSDを積んだインスタンスが増えてきた

  EC2のタイプによって選択できるInstance Storeは以下の通り

Instance Type Instance Store Volumesm1small 1 x 160 GBdaggerm1medium 1 x 410 GBm1large 2 x 420 GB (840 GB)m1xlarge 4 x 420 GB (1680 GB)m2xlarge 1 x 420 GBm22xlarge 1 x 850 GBm24xlarge 2 x 840 GB (1680 GB)m3medium 1 x 4 GB SSDm3large 1 x 32 GB SSDm3xlarge 2 x 40 GB SSD (80 GB)m32xlarge 2 x 80 GB SSD (160 GB)

t1micro None (use Amazon EBS volumes)

c1medium 1 x 350 GBdaggerc1xlarge 4 x 420 GB (1680 GB)

Instance Type Instance Store Volumes

c3large 2 x 16 GB SSD (32 GB)c3xlarge 2 x 40 GB SSD (80 GB)c32xlarge 2 x 80 GB SSD (160 GB)c34xlarge 2 x 160 GB SSD (320 GB)c38xlarge 2 x 320 GB SSD (640 GB)cc28xlarge 4 x 840 GB (3360 GB)cg14xlarge 2 x 840 GB (1680 GB)cr18xlarge 2 x 120 GB SSD (240 GB)hi14xlarge 2 x 1024 GB SSD (2048 GB)hs18xlarge 24 x 2048 GB (49 TB)i2xlarge 1 x 800 GB SSDi22xlarge 2 x 800 GB SSD (1600 GB)i24xlarge 4 x 800 GB SSD (3200 GB)i28xlarge 8 x 800 GB SSD (6400 GB)

2014年年1月29日時点

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

56

Instance Storageを使うべきなのは

 高IOPS高帯域なストレージが必要な場合

 消えても良良い一次データの置き場として使う場合

 ストレージ冗長化を準備できる場合

S3活かしたいメリット

考慮すべき制約

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

57

EC2へのファイル転送は

  SCPを使う scp pk-‐‑‒XXXpem rootec2-‐‑‒XXXamazonawscomxxx

  Windowsの場合はWinSCPなど   S3経由で共有する

  S3にアップロードしEC2からwgetでアクセスする   FTPを立立ち上げる

  EC2側でFTPサーバーを立立ち上げておく

  高速に送信したい   Tsunami UDP Aspera等のソリューション

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

58

VM Import Export

  複数プラットフォームのVMイメージをAmazon EC2に移行行(インポートエクスポート)可能

httpawstypepadcomaws_japan201012vm-‐‑‒import-‐‑‒bring-‐‑‒your-‐‑‒vmware-‐‑‒images-‐‑‒to-‐‑‒the-‐‑‒cloudhtml

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

59

稼働EC2インスタンスからメタデータ取得

  ami-‐‑‒id   ami-‐‑‒launch-‐‑‒index   ami-‐‑‒manifest-‐‑‒path   block-‐‑‒device-‐‑‒mapping   hostname   instance-‐‑‒action   instance-‐‑‒id   Instance-‐‑‒type   kernel-‐‑‒id

  local-‐‑‒hostname   local-‐‑‒ipv4   mac   network   placement   profile   public-‐‑‒hostname   public-‐‑‒ipv4   public-‐‑‒keys   reservation-‐‑‒id

curl http169254169254latestmeta-‐‑‒data

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

60

起動時にパラメーターを渡す   起動時に16KB以内で任意のものを渡せる

  ChefやPuppetなどを利利用して自己構成できるAMIに   参照emsp AWSマイスターemsp CloudFormation資料料httpwwwslidesharenetkentamagawacloudformation-‐‑‒aws5

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

61

EC2コマンドラインツール amp AWS SDKs

  コマンドラインからEC2のAPIにアクセスできるツール   ツールをインストールしセキュリティ証明書を配置

  AWS SDKs httpawsamazoncomcode

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

62

マネージメントコンソールだけでなくAPIからプログラマブルにアクセス

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1a --instance-type m1small

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1b --instance-type m1small

Tokyo リージョン

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

63

EC2のスケジュールイベント表示機能

  EC2インスタンスが稼働しているハードかソフトにメンテナンスが必要な場合に情報を提供する仕組み

  インスタンスリブートシステムリブートリタイヤ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

64

EC2のステータスチェック機能

  下記の2種類のチェックを自動テストで実行行し情報を提示   システムステータスチェック

  EC2インスタンスにネットワークパケットが通るかチェック   インスタンスステータスチェック

  EC2インスタンスのOSがネットワークパケットを受け取るかチェック

  もし状況に乖離離がある場合はレポートできます

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

65

AWS制限増加申請

  EC2を誤って大量量に作成しないよう最大インスタンス数の上限を20に制限しています

  制限増加申請フォームで各種制限の増加を行行えますbull  httpawsamazoncomjpcontact-‐‑‒usemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

66

既存EBSボリュームのサイズ変更更

  例例 10GB -‐‑‒gt 100GB変更更への流流れ   EBSをデタッチする   EBSからS3にスナップショットを作成する

  新たなボリュームサイズを指定してEBSを作成する

  EBSをアタッチする   マウントしてリサイズする

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

スナップショット

EBS (10GB)

EBS (100GB)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

67

EBSとS3

EBSは複数EC2にアタッチ不不可   単独のEC2インスタンスへのブロックデバイスとしての使い方

  NFSのような使い方をする際はEC2にミドルウェアを導入(GlusterFS等)

S3は複数のEC2からアクセス可   ただしWrite Once Read A Lotな使い方に向いている

  アップロード並列列化も使える   耐久性の設計は99999999999で非常に高い

Copyright copy 2011 Amazon Web Services

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

バケット

EBS

EC2インスタンス

HTTPHTTPS

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

68

EIP使用時の注意点

  グローバルIP(EIP)を用いた場合インターネット経由のアクセスとなり課金発生するケースがある

  名前解決したいサーバに固定IPを付与する13   各サーバは固定グローバルIPを元に

AWSのDNSに名前を問い合わせ13   問い合わせた結果返ってくる外部DNS名でサーバにアクセスを行う13   EC2内部で外部DNS名を使ってアクセスすると プライベートIPアドレスに変換されるため 目的のサーバにプライベートIPでアクセスできる13

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

69

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

70

AWSの課金金の仕組みインターネット

ELB

EC2

EBS

S3

データ転送量量

ELB利利用料料データ処理理量量

インスタンスタイプ別利利用料料

EBSの利利用料料

S3の利利用料料

大半を占める

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

71

Simple Monthly Calculator

  Web上にある計算機を使って概算費用を計算できますsect  httpcalculators3amazonawscomcalc5htmllng=ja_JP

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

72

複数の価格モデル

 課金金モデルが選べるsect 通常の時間課金金のオンデマンドインスタンス

sect ある程度度継続してEC2を使う(1年年3年年)EC2リザーブドインスタンス

sect 入札を利利用してより安く使うEC2スポットインスタンス

rarrマイスターシリーズ RIampスポットインスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

73

AWS無料料試用枠

  AWSでは無料料試用枠を用意していますbull  httpawsamazoncomjpfreeemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

74

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

75

Appendix

  参考資料料bull  Amazon Glacier Developer Guidehttpdocsamazonwebservicescomamazonglacierlatestdevintroductionhtml

bull  Amazon Glacier FAQhttpawsamazoncomjpglacierfaqs

bull  Amazon Glaceir価格httpawsamazoncomjpglacierpricing

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

76

QampA

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 23: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

23

起動完了了

  起動完了了画面を確認し起動ウィザードを終了了

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

24

起動したインスタンスの情報確認XXXXX

パブリックDNS名

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

25

ターミナルでアクセス

ログインの際のアカウント名はAMIによって違うので注意 例) Amazon Linux -gt ec2-user その他Linuxの多く -gt root admin等

パブリックDNS名

秘密鍵

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

26

今日のAgenda

 Amazon EC2とは  Amazon EC2の基本

bull  触ってみようbull  基本コンセプト

 Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

27

Amazon Machine Image (AMI)

  AMIはインスタンス作成に使用するイメージテンプレート   AWS公式AMIやサードパーティもAMIを提供

bull  httpsawsamazoncomamisbull  httpsawsamazoncommarketplaceemsp 

  選択したAMIから起動する   EC2インスタンスから任意のタイミングでカスタムAMIを作成できる

launch

Amazon Machine Image (AMI)

Amazon EC2インスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

28

AMIとインスタンスAZの関係

インスタンス

Amazon S3

AMI

Availability Zone-1a Availability Zone-1b

カスタム AMI

AMIからインスタンスを起動

カスタムAMIを使ってインスタンスを複数台起動

カスタムAMIを作成必要に応じて共有設定

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

29

AMIの取得AMIからの起動

Copyright copy 2011 Amazon Web Services

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

30

EC2インスタンスのライフサイクル   起動したインスタンスは3つの状態を持つ

bull  Running 実行行中課金金されるbull  Stopped 停止中課金金されないbull  Terminated 終了了StopStartはできない

Running

Terminated

Stopped

StartStop

Terminate

launch

Terminate

Amazon Machine Image (AMI)

Amazon EC2インスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

31

EC2インスタンスの停止と終了了

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

32

EC2インスタンスのタイプ変更Stop(停止)しているといつでもタイプ(スペック)を変更更できる

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

33

EBSボリュームのアタッチ

Copyright copy 2011 Amazon Web Services

EC2インスタンスと同じゾーンに作ることを注意 スナップショットから複製も可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

34

EC2インスタンスのアドレス

  全てのインスタンスが下記を持つsect  Private IPアドレス(VPC内のサブネットから割り当てる)sect  Private DNS名(internal)sect  Public DNS名 (amazonawscom)

  public IPアドレスをオプションで付けられる   固定されたPublic IP Addresses はEIPと呼ぶ

sect  稼働しているEC2インスタンスに瞬時に付け外しが可能sect  インスタンスにアサインしているときは料料金金はかからない

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

35

EIPの割り当て

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

36

EIPの使いどころ

  通常のケースはEIPは必要なくEC2のPublic DNS名を用いてCNAMEで名前変換を行行う

  Route 53(名前解決サービス)でPublic DNSを用いる

  固定IPアドレスが必要なときに限りEIPを用いる   メールサーバー監視サーバー等

  メールサーバの送信制限解除逆引き申請が必要な場合は下記から申請を行行うhttpsaws-‐‑‒portalamazoncomgpawshtml-‐‑‒forms-‐‑‒controllercontactusec2-‐‑‒email-‐‑‒limit-‐‑‒rdns-‐‑‒request

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

37

リージョン間コピー(AMIEBS)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

38

Amazon EC2の関連サービス関連情報   監視負荷分散自動スケール

rarrCloudWatchELBAutoScaling   閉域網での利利用仮想ネットワーキング

rarrAmazon VPC (Virtual Private Cloud)   ① 社内ネットワークからVPN接続   ② ルーティングイントラIPアドレス仮想NIC等々

  占有サーバ rarrAmazon Dedicated Instance   専用線接続 rarrAmazon Direct Connect   Windowsemsp emsp  rarrWindowsインスタンス   スパコンrarrHPCインスタンス   アクセス管理理emsp  rarrIAM (Identity and Access Management)   料料金金関係emsp  rarrConsolidated Billing資料料集emsp httpawsamazoncomjpaws-‐‑‒meister

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

39

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

40

AWSのセキュリティの考え方

第三者認証

SOC 1SSAE 16ISAE 3402 ISO 27001 PCI DSS HIPAA ITAR

FISMA Moderate FIPS 140-2 ファシリティ

DC電源ネットワーク冗長化

Your Apps

Webサイトアプリケーションこれまでと同様のセキュリティを

お客様SI様で実現可能

インフラよりハイレベルの

セキュリティをAWSが提供

シェアードレスポンシビリティモデル(責任共有モデル)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

41

EC2の責任共有モデル

物理インタフェース

ファイアウォール

      ハイバーバイザー

Sm

all

Larg

e

hellip

Sm

all Amazon EC2

インスタンス

物理ホスト

ユーザーが 責任を持って 管理する

AWSが 責任を持って 管理する

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

42

ファイアウォールを実現するSecurity Group

  インスタンスのINOUTトラフィックを制限するファイアウォール機能

  デフォルトIN向けは全トラフィック閉

  必要な受信アクセスに対してアクセスルールを定義する

bull  プロトコル( TCPUDP)bull  宛先ポートbull  アクセス元IP Security Group

  ルールをひとまとめにしたテンプレートを Security Groupと呼ぶ

EC2 インスタンス

ポート22(SSH)

ポート80(HTTP)

EC2ファイアウォール

Security Group

ポート25(SMTP)

ポート22(SSH)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

43

Security Groupの使い方   インスタンスの用途に応じたSecurity Groupを用意する

bull  Webサーバ用DBサーバ用メールサーバ用等   アクセス元にSecurity Groupも設定して限定可能

Webサーバ

Webサーバ

DBサーバ

sg-1234

22 00000 80 00000 25 sg-1234

sg-1234

sg-1234

sg-abcd sg-abcd

22 00000 3306 sg-1234

Webサーバ

sg-xyz

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

44

セキュリティ証明書

仮想サーバ(Amazon EC2)Windows( スタンダード)

コマンドライン SDK利利用

SSH公開鍵認証

仮想デスクトップ

ターミナル

REST SOAPAPI

Webコンソール

①EC2インスタンスへのアクセスrarr鍵認証

②Webコンソールへのアクセス

rarrパスワード認証 多要素認証 IAM

③APIへのアクセスrarrアクセスキー X509証明書 IAM

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

45

Key Pair(キーペア)を用いた鍵認証   鍵認証はユーザ名パスワードの認証よりも安全な認証方式

ダウンロードされた秘密鍵

①キーペア作成

②インスタンス起動時にemsp emsp emsp 公開鍵をコピー

公開鍵

③公開鍵秘密鍵のペアが合致するとログイン可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

46

EC2のSLA13

sect  EC2の可用性が9995 sect 上記に満たない場合はServiceクレジットを返還する

sect 詳細は sect  httpawsamazoncomec2-sla

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

47

AWSセキュリティセンター 13

 日本語のホワイトペーパー bull  セキュリティ概要 bull  リスクとコンプライアンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

48

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

49

最近追加された機能

  VM Import for Linux   IAM EC2 Resource Permissions   リザーブドインスタンスの変更更可能に   SR-‐‑‒IOVネットワークDriverネットワーク性能向上

bull  C3 I2 R3インスタンスで対応

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

50

インスタンスのさらなる追加

  一般的な目的なら M3   Compute Optimizedなら C3   Memory Optimizedなら R3(もうすぐ)   GPUが必要なら G2   IOPS重視なら I2   Disk Based Storage ならHS1

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

51

Intel Processor Features

  m3 c3 cc2 g2 cr1 i2 r3の全てが対応

  AES New Instructions (AES-‐‑‒NI)bull  c1 cg1 m2でも対応

  Advanced Vector Extensions (Intel AVX)bull  HVMでのみ対応

  Turbo Boost Technology

  詳細は httpawsamazoncomec2instance-‐‑‒types

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

52

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

53

故障のための設計 Design for Failure   故障に備えた設計をしておく

  すべてが故障しうると考えシステム全体での保守的設計   SPOF(単一障害点)の排除   障害からの復復旧(対応品質)を重視する

  EC2における故障のための設計   AMIを常にとっておく   EBSスナップショットでバックアップ   複数アベイラビリティゾーンへの分散   ELBでサーバを冗長化Auto Scalingで自動復復帰   Reserved Instanceでキャパシティ保障

  他の冗長性高いサービスとの組み合わせ   S3 SimpleDB RDS他

httpwwwslidesharenetkentamagawaaws-‐‑‒7991623

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

54

定期的なバックアップ

  EC2のAMIを定期的に作成する   (参考) 無停止でAMI取得

Cloudpackさんブログhttpblogcloudpackjp201103aws-‐‑‒news-‐‑‒ec2-‐‑‒instance-‐‑‒no-‐‑‒reboot-‐‑‒amihtml

  データボリュームとしてのEBSの場合EBSのスナップショットを定期的に作成

  スクリプトを書いて定期的なバックアップを行行うことも可能 Coderockさんブログ

httpblogdateofrockcom201003auto-‐‑‒backup-‐‑‒amazon-‐‑‒ebs-‐‑‒with-‐‑‒rubyhtml   サーバーワークスさんブログ

httpblogserverworkscojptech20110721awssdk-‐‑‒for-‐‑‒ruby-‐‑‒create-‐‑‒snapshot

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

55

Instance StorageにSSDを積んだインスタンスが増えてきた

  EC2のタイプによって選択できるInstance Storeは以下の通り

Instance Type Instance Store Volumesm1small 1 x 160 GBdaggerm1medium 1 x 410 GBm1large 2 x 420 GB (840 GB)m1xlarge 4 x 420 GB (1680 GB)m2xlarge 1 x 420 GBm22xlarge 1 x 850 GBm24xlarge 2 x 840 GB (1680 GB)m3medium 1 x 4 GB SSDm3large 1 x 32 GB SSDm3xlarge 2 x 40 GB SSD (80 GB)m32xlarge 2 x 80 GB SSD (160 GB)

t1micro None (use Amazon EBS volumes)

c1medium 1 x 350 GBdaggerc1xlarge 4 x 420 GB (1680 GB)

Instance Type Instance Store Volumes

c3large 2 x 16 GB SSD (32 GB)c3xlarge 2 x 40 GB SSD (80 GB)c32xlarge 2 x 80 GB SSD (160 GB)c34xlarge 2 x 160 GB SSD (320 GB)c38xlarge 2 x 320 GB SSD (640 GB)cc28xlarge 4 x 840 GB (3360 GB)cg14xlarge 2 x 840 GB (1680 GB)cr18xlarge 2 x 120 GB SSD (240 GB)hi14xlarge 2 x 1024 GB SSD (2048 GB)hs18xlarge 24 x 2048 GB (49 TB)i2xlarge 1 x 800 GB SSDi22xlarge 2 x 800 GB SSD (1600 GB)i24xlarge 4 x 800 GB SSD (3200 GB)i28xlarge 8 x 800 GB SSD (6400 GB)

2014年年1月29日時点

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

56

Instance Storageを使うべきなのは

 高IOPS高帯域なストレージが必要な場合

 消えても良良い一次データの置き場として使う場合

 ストレージ冗長化を準備できる場合

S3活かしたいメリット

考慮すべき制約

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

57

EC2へのファイル転送は

  SCPを使う scp pk-‐‑‒XXXpem rootec2-‐‑‒XXXamazonawscomxxx

  Windowsの場合はWinSCPなど   S3経由で共有する

  S3にアップロードしEC2からwgetでアクセスする   FTPを立立ち上げる

  EC2側でFTPサーバーを立立ち上げておく

  高速に送信したい   Tsunami UDP Aspera等のソリューション

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

58

VM Import Export

  複数プラットフォームのVMイメージをAmazon EC2に移行行(インポートエクスポート)可能

httpawstypepadcomaws_japan201012vm-‐‑‒import-‐‑‒bring-‐‑‒your-‐‑‒vmware-‐‑‒images-‐‑‒to-‐‑‒the-‐‑‒cloudhtml

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

59

稼働EC2インスタンスからメタデータ取得

  ami-‐‑‒id   ami-‐‑‒launch-‐‑‒index   ami-‐‑‒manifest-‐‑‒path   block-‐‑‒device-‐‑‒mapping   hostname   instance-‐‑‒action   instance-‐‑‒id   Instance-‐‑‒type   kernel-‐‑‒id

  local-‐‑‒hostname   local-‐‑‒ipv4   mac   network   placement   profile   public-‐‑‒hostname   public-‐‑‒ipv4   public-‐‑‒keys   reservation-‐‑‒id

curl http169254169254latestmeta-‐‑‒data

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

60

起動時にパラメーターを渡す   起動時に16KB以内で任意のものを渡せる

  ChefやPuppetなどを利利用して自己構成できるAMIに   参照emsp AWSマイスターemsp CloudFormation資料料httpwwwslidesharenetkentamagawacloudformation-‐‑‒aws5

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

61

EC2コマンドラインツール amp AWS SDKs

  コマンドラインからEC2のAPIにアクセスできるツール   ツールをインストールしセキュリティ証明書を配置

  AWS SDKs httpawsamazoncomcode

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

62

マネージメントコンソールだけでなくAPIからプログラマブルにアクセス

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1a --instance-type m1small

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1b --instance-type m1small

Tokyo リージョン

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

63

EC2のスケジュールイベント表示機能

  EC2インスタンスが稼働しているハードかソフトにメンテナンスが必要な場合に情報を提供する仕組み

  インスタンスリブートシステムリブートリタイヤ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

64

EC2のステータスチェック機能

  下記の2種類のチェックを自動テストで実行行し情報を提示   システムステータスチェック

  EC2インスタンスにネットワークパケットが通るかチェック   インスタンスステータスチェック

  EC2インスタンスのOSがネットワークパケットを受け取るかチェック

  もし状況に乖離離がある場合はレポートできます

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

65

AWS制限増加申請

  EC2を誤って大量量に作成しないよう最大インスタンス数の上限を20に制限しています

  制限増加申請フォームで各種制限の増加を行行えますbull  httpawsamazoncomjpcontact-‐‑‒usemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

66

既存EBSボリュームのサイズ変更更

  例例 10GB -‐‑‒gt 100GB変更更への流流れ   EBSをデタッチする   EBSからS3にスナップショットを作成する

  新たなボリュームサイズを指定してEBSを作成する

  EBSをアタッチする   マウントしてリサイズする

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

スナップショット

EBS (10GB)

EBS (100GB)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

67

EBSとS3

EBSは複数EC2にアタッチ不不可   単独のEC2インスタンスへのブロックデバイスとしての使い方

  NFSのような使い方をする際はEC2にミドルウェアを導入(GlusterFS等)

S3は複数のEC2からアクセス可   ただしWrite Once Read A Lotな使い方に向いている

  アップロード並列列化も使える   耐久性の設計は99999999999で非常に高い

Copyright copy 2011 Amazon Web Services

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

バケット

EBS

EC2インスタンス

HTTPHTTPS

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

68

EIP使用時の注意点

  グローバルIP(EIP)を用いた場合インターネット経由のアクセスとなり課金発生するケースがある

  名前解決したいサーバに固定IPを付与する13   各サーバは固定グローバルIPを元に

AWSのDNSに名前を問い合わせ13   問い合わせた結果返ってくる外部DNS名でサーバにアクセスを行う13   EC2内部で外部DNS名を使ってアクセスすると プライベートIPアドレスに変換されるため 目的のサーバにプライベートIPでアクセスできる13

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

69

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

70

AWSの課金金の仕組みインターネット

ELB

EC2

EBS

S3

データ転送量量

ELB利利用料料データ処理理量量

インスタンスタイプ別利利用料料

EBSの利利用料料

S3の利利用料料

大半を占める

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

71

Simple Monthly Calculator

  Web上にある計算機を使って概算費用を計算できますsect  httpcalculators3amazonawscomcalc5htmllng=ja_JP

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

72

複数の価格モデル

 課金金モデルが選べるsect 通常の時間課金金のオンデマンドインスタンス

sect ある程度度継続してEC2を使う(1年年3年年)EC2リザーブドインスタンス

sect 入札を利利用してより安く使うEC2スポットインスタンス

rarrマイスターシリーズ RIampスポットインスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

73

AWS無料料試用枠

  AWSでは無料料試用枠を用意していますbull  httpawsamazoncomjpfreeemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

74

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

75

Appendix

  参考資料料bull  Amazon Glacier Developer Guidehttpdocsamazonwebservicescomamazonglacierlatestdevintroductionhtml

bull  Amazon Glacier FAQhttpawsamazoncomjpglacierfaqs

bull  Amazon Glaceir価格httpawsamazoncomjpglacierpricing

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

76

QampA

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 24: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

24

起動したインスタンスの情報確認XXXXX

パブリックDNS名

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

25

ターミナルでアクセス

ログインの際のアカウント名はAMIによって違うので注意 例) Amazon Linux -gt ec2-user その他Linuxの多く -gt root admin等

パブリックDNS名

秘密鍵

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

26

今日のAgenda

 Amazon EC2とは  Amazon EC2の基本

bull  触ってみようbull  基本コンセプト

 Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

27

Amazon Machine Image (AMI)

  AMIはインスタンス作成に使用するイメージテンプレート   AWS公式AMIやサードパーティもAMIを提供

bull  httpsawsamazoncomamisbull  httpsawsamazoncommarketplaceemsp 

  選択したAMIから起動する   EC2インスタンスから任意のタイミングでカスタムAMIを作成できる

launch

Amazon Machine Image (AMI)

Amazon EC2インスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

28

AMIとインスタンスAZの関係

インスタンス

Amazon S3

AMI

Availability Zone-1a Availability Zone-1b

カスタム AMI

AMIからインスタンスを起動

カスタムAMIを使ってインスタンスを複数台起動

カスタムAMIを作成必要に応じて共有設定

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

29

AMIの取得AMIからの起動

Copyright copy 2011 Amazon Web Services

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

30

EC2インスタンスのライフサイクル   起動したインスタンスは3つの状態を持つ

bull  Running 実行行中課金金されるbull  Stopped 停止中課金金されないbull  Terminated 終了了StopStartはできない

Running

Terminated

Stopped

StartStop

Terminate

launch

Terminate

Amazon Machine Image (AMI)

Amazon EC2インスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

31

EC2インスタンスの停止と終了了

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

32

EC2インスタンスのタイプ変更Stop(停止)しているといつでもタイプ(スペック)を変更更できる

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

33

EBSボリュームのアタッチ

Copyright copy 2011 Amazon Web Services

EC2インスタンスと同じゾーンに作ることを注意 スナップショットから複製も可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

34

EC2インスタンスのアドレス

  全てのインスタンスが下記を持つsect  Private IPアドレス(VPC内のサブネットから割り当てる)sect  Private DNS名(internal)sect  Public DNS名 (amazonawscom)

  public IPアドレスをオプションで付けられる   固定されたPublic IP Addresses はEIPと呼ぶ

sect  稼働しているEC2インスタンスに瞬時に付け外しが可能sect  インスタンスにアサインしているときは料料金金はかからない

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

35

EIPの割り当て

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

36

EIPの使いどころ

  通常のケースはEIPは必要なくEC2のPublic DNS名を用いてCNAMEで名前変換を行行う

  Route 53(名前解決サービス)でPublic DNSを用いる

  固定IPアドレスが必要なときに限りEIPを用いる   メールサーバー監視サーバー等

  メールサーバの送信制限解除逆引き申請が必要な場合は下記から申請を行行うhttpsaws-‐‑‒portalamazoncomgpawshtml-‐‑‒forms-‐‑‒controllercontactusec2-‐‑‒email-‐‑‒limit-‐‑‒rdns-‐‑‒request

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

37

リージョン間コピー(AMIEBS)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

38

Amazon EC2の関連サービス関連情報   監視負荷分散自動スケール

rarrCloudWatchELBAutoScaling   閉域網での利利用仮想ネットワーキング

rarrAmazon VPC (Virtual Private Cloud)   ① 社内ネットワークからVPN接続   ② ルーティングイントラIPアドレス仮想NIC等々

  占有サーバ rarrAmazon Dedicated Instance   専用線接続 rarrAmazon Direct Connect   Windowsemsp emsp  rarrWindowsインスタンス   スパコンrarrHPCインスタンス   アクセス管理理emsp  rarrIAM (Identity and Access Management)   料料金金関係emsp  rarrConsolidated Billing資料料集emsp httpawsamazoncomjpaws-‐‑‒meister

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

39

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

40

AWSのセキュリティの考え方

第三者認証

SOC 1SSAE 16ISAE 3402 ISO 27001 PCI DSS HIPAA ITAR

FISMA Moderate FIPS 140-2 ファシリティ

DC電源ネットワーク冗長化

Your Apps

Webサイトアプリケーションこれまでと同様のセキュリティを

お客様SI様で実現可能

インフラよりハイレベルの

セキュリティをAWSが提供

シェアードレスポンシビリティモデル(責任共有モデル)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

41

EC2の責任共有モデル

物理インタフェース

ファイアウォール

      ハイバーバイザー

Sm

all

Larg

e

hellip

Sm

all Amazon EC2

インスタンス

物理ホスト

ユーザーが 責任を持って 管理する

AWSが 責任を持って 管理する

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

42

ファイアウォールを実現するSecurity Group

  インスタンスのINOUTトラフィックを制限するファイアウォール機能

  デフォルトIN向けは全トラフィック閉

  必要な受信アクセスに対してアクセスルールを定義する

bull  プロトコル( TCPUDP)bull  宛先ポートbull  アクセス元IP Security Group

  ルールをひとまとめにしたテンプレートを Security Groupと呼ぶ

EC2 インスタンス

ポート22(SSH)

ポート80(HTTP)

EC2ファイアウォール

Security Group

ポート25(SMTP)

ポート22(SSH)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

43

Security Groupの使い方   インスタンスの用途に応じたSecurity Groupを用意する

bull  Webサーバ用DBサーバ用メールサーバ用等   アクセス元にSecurity Groupも設定して限定可能

Webサーバ

Webサーバ

DBサーバ

sg-1234

22 00000 80 00000 25 sg-1234

sg-1234

sg-1234

sg-abcd sg-abcd

22 00000 3306 sg-1234

Webサーバ

sg-xyz

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

44

セキュリティ証明書

仮想サーバ(Amazon EC2)Windows( スタンダード)

コマンドライン SDK利利用

SSH公開鍵認証

仮想デスクトップ

ターミナル

REST SOAPAPI

Webコンソール

①EC2インスタンスへのアクセスrarr鍵認証

②Webコンソールへのアクセス

rarrパスワード認証 多要素認証 IAM

③APIへのアクセスrarrアクセスキー X509証明書 IAM

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

45

Key Pair(キーペア)を用いた鍵認証   鍵認証はユーザ名パスワードの認証よりも安全な認証方式

ダウンロードされた秘密鍵

①キーペア作成

②インスタンス起動時にemsp emsp emsp 公開鍵をコピー

公開鍵

③公開鍵秘密鍵のペアが合致するとログイン可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

46

EC2のSLA13

sect  EC2の可用性が9995 sect 上記に満たない場合はServiceクレジットを返還する

sect 詳細は sect  httpawsamazoncomec2-sla

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

47

AWSセキュリティセンター 13

 日本語のホワイトペーパー bull  セキュリティ概要 bull  リスクとコンプライアンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

48

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

49

最近追加された機能

  VM Import for Linux   IAM EC2 Resource Permissions   リザーブドインスタンスの変更更可能に   SR-‐‑‒IOVネットワークDriverネットワーク性能向上

bull  C3 I2 R3インスタンスで対応

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

50

インスタンスのさらなる追加

  一般的な目的なら M3   Compute Optimizedなら C3   Memory Optimizedなら R3(もうすぐ)   GPUが必要なら G2   IOPS重視なら I2   Disk Based Storage ならHS1

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

51

Intel Processor Features

  m3 c3 cc2 g2 cr1 i2 r3の全てが対応

  AES New Instructions (AES-‐‑‒NI)bull  c1 cg1 m2でも対応

  Advanced Vector Extensions (Intel AVX)bull  HVMでのみ対応

  Turbo Boost Technology

  詳細は httpawsamazoncomec2instance-‐‑‒types

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

52

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

53

故障のための設計 Design for Failure   故障に備えた設計をしておく

  すべてが故障しうると考えシステム全体での保守的設計   SPOF(単一障害点)の排除   障害からの復復旧(対応品質)を重視する

  EC2における故障のための設計   AMIを常にとっておく   EBSスナップショットでバックアップ   複数アベイラビリティゾーンへの分散   ELBでサーバを冗長化Auto Scalingで自動復復帰   Reserved Instanceでキャパシティ保障

  他の冗長性高いサービスとの組み合わせ   S3 SimpleDB RDS他

httpwwwslidesharenetkentamagawaaws-‐‑‒7991623

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

54

定期的なバックアップ

  EC2のAMIを定期的に作成する   (参考) 無停止でAMI取得

Cloudpackさんブログhttpblogcloudpackjp201103aws-‐‑‒news-‐‑‒ec2-‐‑‒instance-‐‑‒no-‐‑‒reboot-‐‑‒amihtml

  データボリュームとしてのEBSの場合EBSのスナップショットを定期的に作成

  スクリプトを書いて定期的なバックアップを行行うことも可能 Coderockさんブログ

httpblogdateofrockcom201003auto-‐‑‒backup-‐‑‒amazon-‐‑‒ebs-‐‑‒with-‐‑‒rubyhtml   サーバーワークスさんブログ

httpblogserverworkscojptech20110721awssdk-‐‑‒for-‐‑‒ruby-‐‑‒create-‐‑‒snapshot

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

55

Instance StorageにSSDを積んだインスタンスが増えてきた

  EC2のタイプによって選択できるInstance Storeは以下の通り

Instance Type Instance Store Volumesm1small 1 x 160 GBdaggerm1medium 1 x 410 GBm1large 2 x 420 GB (840 GB)m1xlarge 4 x 420 GB (1680 GB)m2xlarge 1 x 420 GBm22xlarge 1 x 850 GBm24xlarge 2 x 840 GB (1680 GB)m3medium 1 x 4 GB SSDm3large 1 x 32 GB SSDm3xlarge 2 x 40 GB SSD (80 GB)m32xlarge 2 x 80 GB SSD (160 GB)

t1micro None (use Amazon EBS volumes)

c1medium 1 x 350 GBdaggerc1xlarge 4 x 420 GB (1680 GB)

Instance Type Instance Store Volumes

c3large 2 x 16 GB SSD (32 GB)c3xlarge 2 x 40 GB SSD (80 GB)c32xlarge 2 x 80 GB SSD (160 GB)c34xlarge 2 x 160 GB SSD (320 GB)c38xlarge 2 x 320 GB SSD (640 GB)cc28xlarge 4 x 840 GB (3360 GB)cg14xlarge 2 x 840 GB (1680 GB)cr18xlarge 2 x 120 GB SSD (240 GB)hi14xlarge 2 x 1024 GB SSD (2048 GB)hs18xlarge 24 x 2048 GB (49 TB)i2xlarge 1 x 800 GB SSDi22xlarge 2 x 800 GB SSD (1600 GB)i24xlarge 4 x 800 GB SSD (3200 GB)i28xlarge 8 x 800 GB SSD (6400 GB)

2014年年1月29日時点

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

56

Instance Storageを使うべきなのは

 高IOPS高帯域なストレージが必要な場合

 消えても良良い一次データの置き場として使う場合

 ストレージ冗長化を準備できる場合

S3活かしたいメリット

考慮すべき制約

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

57

EC2へのファイル転送は

  SCPを使う scp pk-‐‑‒XXXpem rootec2-‐‑‒XXXamazonawscomxxx

  Windowsの場合はWinSCPなど   S3経由で共有する

  S3にアップロードしEC2からwgetでアクセスする   FTPを立立ち上げる

  EC2側でFTPサーバーを立立ち上げておく

  高速に送信したい   Tsunami UDP Aspera等のソリューション

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

58

VM Import Export

  複数プラットフォームのVMイメージをAmazon EC2に移行行(インポートエクスポート)可能

httpawstypepadcomaws_japan201012vm-‐‑‒import-‐‑‒bring-‐‑‒your-‐‑‒vmware-‐‑‒images-‐‑‒to-‐‑‒the-‐‑‒cloudhtml

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

59

稼働EC2インスタンスからメタデータ取得

  ami-‐‑‒id   ami-‐‑‒launch-‐‑‒index   ami-‐‑‒manifest-‐‑‒path   block-‐‑‒device-‐‑‒mapping   hostname   instance-‐‑‒action   instance-‐‑‒id   Instance-‐‑‒type   kernel-‐‑‒id

  local-‐‑‒hostname   local-‐‑‒ipv4   mac   network   placement   profile   public-‐‑‒hostname   public-‐‑‒ipv4   public-‐‑‒keys   reservation-‐‑‒id

curl http169254169254latestmeta-‐‑‒data

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

60

起動時にパラメーターを渡す   起動時に16KB以内で任意のものを渡せる

  ChefやPuppetなどを利利用して自己構成できるAMIに   参照emsp AWSマイスターemsp CloudFormation資料料httpwwwslidesharenetkentamagawacloudformation-‐‑‒aws5

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

61

EC2コマンドラインツール amp AWS SDKs

  コマンドラインからEC2のAPIにアクセスできるツール   ツールをインストールしセキュリティ証明書を配置

  AWS SDKs httpawsamazoncomcode

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

62

マネージメントコンソールだけでなくAPIからプログラマブルにアクセス

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1a --instance-type m1small

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1b --instance-type m1small

Tokyo リージョン

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

63

EC2のスケジュールイベント表示機能

  EC2インスタンスが稼働しているハードかソフトにメンテナンスが必要な場合に情報を提供する仕組み

  インスタンスリブートシステムリブートリタイヤ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

64

EC2のステータスチェック機能

  下記の2種類のチェックを自動テストで実行行し情報を提示   システムステータスチェック

  EC2インスタンスにネットワークパケットが通るかチェック   インスタンスステータスチェック

  EC2インスタンスのOSがネットワークパケットを受け取るかチェック

  もし状況に乖離離がある場合はレポートできます

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

65

AWS制限増加申請

  EC2を誤って大量量に作成しないよう最大インスタンス数の上限を20に制限しています

  制限増加申請フォームで各種制限の増加を行行えますbull  httpawsamazoncomjpcontact-‐‑‒usemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

66

既存EBSボリュームのサイズ変更更

  例例 10GB -‐‑‒gt 100GB変更更への流流れ   EBSをデタッチする   EBSからS3にスナップショットを作成する

  新たなボリュームサイズを指定してEBSを作成する

  EBSをアタッチする   マウントしてリサイズする

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

スナップショット

EBS (10GB)

EBS (100GB)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

67

EBSとS3

EBSは複数EC2にアタッチ不不可   単独のEC2インスタンスへのブロックデバイスとしての使い方

  NFSのような使い方をする際はEC2にミドルウェアを導入(GlusterFS等)

S3は複数のEC2からアクセス可   ただしWrite Once Read A Lotな使い方に向いている

  アップロード並列列化も使える   耐久性の設計は99999999999で非常に高い

Copyright copy 2011 Amazon Web Services

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

バケット

EBS

EC2インスタンス

HTTPHTTPS

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

68

EIP使用時の注意点

  グローバルIP(EIP)を用いた場合インターネット経由のアクセスとなり課金発生するケースがある

  名前解決したいサーバに固定IPを付与する13   各サーバは固定グローバルIPを元に

AWSのDNSに名前を問い合わせ13   問い合わせた結果返ってくる外部DNS名でサーバにアクセスを行う13   EC2内部で外部DNS名を使ってアクセスすると プライベートIPアドレスに変換されるため 目的のサーバにプライベートIPでアクセスできる13

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

69

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

70

AWSの課金金の仕組みインターネット

ELB

EC2

EBS

S3

データ転送量量

ELB利利用料料データ処理理量量

インスタンスタイプ別利利用料料

EBSの利利用料料

S3の利利用料料

大半を占める

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

71

Simple Monthly Calculator

  Web上にある計算機を使って概算費用を計算できますsect  httpcalculators3amazonawscomcalc5htmllng=ja_JP

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

72

複数の価格モデル

 課金金モデルが選べるsect 通常の時間課金金のオンデマンドインスタンス

sect ある程度度継続してEC2を使う(1年年3年年)EC2リザーブドインスタンス

sect 入札を利利用してより安く使うEC2スポットインスタンス

rarrマイスターシリーズ RIampスポットインスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

73

AWS無料料試用枠

  AWSでは無料料試用枠を用意していますbull  httpawsamazoncomjpfreeemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

74

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

75

Appendix

  参考資料料bull  Amazon Glacier Developer Guidehttpdocsamazonwebservicescomamazonglacierlatestdevintroductionhtml

bull  Amazon Glacier FAQhttpawsamazoncomjpglacierfaqs

bull  Amazon Glaceir価格httpawsamazoncomjpglacierpricing

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

76

QampA

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 25: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

25

ターミナルでアクセス

ログインの際のアカウント名はAMIによって違うので注意 例) Amazon Linux -gt ec2-user その他Linuxの多く -gt root admin等

パブリックDNS名

秘密鍵

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

26

今日のAgenda

 Amazon EC2とは  Amazon EC2の基本

bull  触ってみようbull  基本コンセプト

 Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

27

Amazon Machine Image (AMI)

  AMIはインスタンス作成に使用するイメージテンプレート   AWS公式AMIやサードパーティもAMIを提供

bull  httpsawsamazoncomamisbull  httpsawsamazoncommarketplaceemsp 

  選択したAMIから起動する   EC2インスタンスから任意のタイミングでカスタムAMIを作成できる

launch

Amazon Machine Image (AMI)

Amazon EC2インスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

28

AMIとインスタンスAZの関係

インスタンス

Amazon S3

AMI

Availability Zone-1a Availability Zone-1b

カスタム AMI

AMIからインスタンスを起動

カスタムAMIを使ってインスタンスを複数台起動

カスタムAMIを作成必要に応じて共有設定

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

29

AMIの取得AMIからの起動

Copyright copy 2011 Amazon Web Services

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

30

EC2インスタンスのライフサイクル   起動したインスタンスは3つの状態を持つ

bull  Running 実行行中課金金されるbull  Stopped 停止中課金金されないbull  Terminated 終了了StopStartはできない

Running

Terminated

Stopped

StartStop

Terminate

launch

Terminate

Amazon Machine Image (AMI)

Amazon EC2インスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

31

EC2インスタンスの停止と終了了

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

32

EC2インスタンスのタイプ変更Stop(停止)しているといつでもタイプ(スペック)を変更更できる

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

33

EBSボリュームのアタッチ

Copyright copy 2011 Amazon Web Services

EC2インスタンスと同じゾーンに作ることを注意 スナップショットから複製も可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

34

EC2インスタンスのアドレス

  全てのインスタンスが下記を持つsect  Private IPアドレス(VPC内のサブネットから割り当てる)sect  Private DNS名(internal)sect  Public DNS名 (amazonawscom)

  public IPアドレスをオプションで付けられる   固定されたPublic IP Addresses はEIPと呼ぶ

sect  稼働しているEC2インスタンスに瞬時に付け外しが可能sect  インスタンスにアサインしているときは料料金金はかからない

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

35

EIPの割り当て

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

36

EIPの使いどころ

  通常のケースはEIPは必要なくEC2のPublic DNS名を用いてCNAMEで名前変換を行行う

  Route 53(名前解決サービス)でPublic DNSを用いる

  固定IPアドレスが必要なときに限りEIPを用いる   メールサーバー監視サーバー等

  メールサーバの送信制限解除逆引き申請が必要な場合は下記から申請を行行うhttpsaws-‐‑‒portalamazoncomgpawshtml-‐‑‒forms-‐‑‒controllercontactusec2-‐‑‒email-‐‑‒limit-‐‑‒rdns-‐‑‒request

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

37

リージョン間コピー(AMIEBS)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

38

Amazon EC2の関連サービス関連情報   監視負荷分散自動スケール

rarrCloudWatchELBAutoScaling   閉域網での利利用仮想ネットワーキング

rarrAmazon VPC (Virtual Private Cloud)   ① 社内ネットワークからVPN接続   ② ルーティングイントラIPアドレス仮想NIC等々

  占有サーバ rarrAmazon Dedicated Instance   専用線接続 rarrAmazon Direct Connect   Windowsemsp emsp  rarrWindowsインスタンス   スパコンrarrHPCインスタンス   アクセス管理理emsp  rarrIAM (Identity and Access Management)   料料金金関係emsp  rarrConsolidated Billing資料料集emsp httpawsamazoncomjpaws-‐‑‒meister

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

39

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

40

AWSのセキュリティの考え方

第三者認証

SOC 1SSAE 16ISAE 3402 ISO 27001 PCI DSS HIPAA ITAR

FISMA Moderate FIPS 140-2 ファシリティ

DC電源ネットワーク冗長化

Your Apps

Webサイトアプリケーションこれまでと同様のセキュリティを

お客様SI様で実現可能

インフラよりハイレベルの

セキュリティをAWSが提供

シェアードレスポンシビリティモデル(責任共有モデル)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

41

EC2の責任共有モデル

物理インタフェース

ファイアウォール

      ハイバーバイザー

Sm

all

Larg

e

hellip

Sm

all Amazon EC2

インスタンス

物理ホスト

ユーザーが 責任を持って 管理する

AWSが 責任を持って 管理する

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

42

ファイアウォールを実現するSecurity Group

  インスタンスのINOUTトラフィックを制限するファイアウォール機能

  デフォルトIN向けは全トラフィック閉

  必要な受信アクセスに対してアクセスルールを定義する

bull  プロトコル( TCPUDP)bull  宛先ポートbull  アクセス元IP Security Group

  ルールをひとまとめにしたテンプレートを Security Groupと呼ぶ

EC2 インスタンス

ポート22(SSH)

ポート80(HTTP)

EC2ファイアウォール

Security Group

ポート25(SMTP)

ポート22(SSH)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

43

Security Groupの使い方   インスタンスの用途に応じたSecurity Groupを用意する

bull  Webサーバ用DBサーバ用メールサーバ用等   アクセス元にSecurity Groupも設定して限定可能

Webサーバ

Webサーバ

DBサーバ

sg-1234

22 00000 80 00000 25 sg-1234

sg-1234

sg-1234

sg-abcd sg-abcd

22 00000 3306 sg-1234

Webサーバ

sg-xyz

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

44

セキュリティ証明書

仮想サーバ(Amazon EC2)Windows( スタンダード)

コマンドライン SDK利利用

SSH公開鍵認証

仮想デスクトップ

ターミナル

REST SOAPAPI

Webコンソール

①EC2インスタンスへのアクセスrarr鍵認証

②Webコンソールへのアクセス

rarrパスワード認証 多要素認証 IAM

③APIへのアクセスrarrアクセスキー X509証明書 IAM

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

45

Key Pair(キーペア)を用いた鍵認証   鍵認証はユーザ名パスワードの認証よりも安全な認証方式

ダウンロードされた秘密鍵

①キーペア作成

②インスタンス起動時にemsp emsp emsp 公開鍵をコピー

公開鍵

③公開鍵秘密鍵のペアが合致するとログイン可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

46

EC2のSLA13

sect  EC2の可用性が9995 sect 上記に満たない場合はServiceクレジットを返還する

sect 詳細は sect  httpawsamazoncomec2-sla

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

47

AWSセキュリティセンター 13

 日本語のホワイトペーパー bull  セキュリティ概要 bull  リスクとコンプライアンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

48

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

49

最近追加された機能

  VM Import for Linux   IAM EC2 Resource Permissions   リザーブドインスタンスの変更更可能に   SR-‐‑‒IOVネットワークDriverネットワーク性能向上

bull  C3 I2 R3インスタンスで対応

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

50

インスタンスのさらなる追加

  一般的な目的なら M3   Compute Optimizedなら C3   Memory Optimizedなら R3(もうすぐ)   GPUが必要なら G2   IOPS重視なら I2   Disk Based Storage ならHS1

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

51

Intel Processor Features

  m3 c3 cc2 g2 cr1 i2 r3の全てが対応

  AES New Instructions (AES-‐‑‒NI)bull  c1 cg1 m2でも対応

  Advanced Vector Extensions (Intel AVX)bull  HVMでのみ対応

  Turbo Boost Technology

  詳細は httpawsamazoncomec2instance-‐‑‒types

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

52

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

53

故障のための設計 Design for Failure   故障に備えた設計をしておく

  すべてが故障しうると考えシステム全体での保守的設計   SPOF(単一障害点)の排除   障害からの復復旧(対応品質)を重視する

  EC2における故障のための設計   AMIを常にとっておく   EBSスナップショットでバックアップ   複数アベイラビリティゾーンへの分散   ELBでサーバを冗長化Auto Scalingで自動復復帰   Reserved Instanceでキャパシティ保障

  他の冗長性高いサービスとの組み合わせ   S3 SimpleDB RDS他

httpwwwslidesharenetkentamagawaaws-‐‑‒7991623

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

54

定期的なバックアップ

  EC2のAMIを定期的に作成する   (参考) 無停止でAMI取得

Cloudpackさんブログhttpblogcloudpackjp201103aws-‐‑‒news-‐‑‒ec2-‐‑‒instance-‐‑‒no-‐‑‒reboot-‐‑‒amihtml

  データボリュームとしてのEBSの場合EBSのスナップショットを定期的に作成

  スクリプトを書いて定期的なバックアップを行行うことも可能 Coderockさんブログ

httpblogdateofrockcom201003auto-‐‑‒backup-‐‑‒amazon-‐‑‒ebs-‐‑‒with-‐‑‒rubyhtml   サーバーワークスさんブログ

httpblogserverworkscojptech20110721awssdk-‐‑‒for-‐‑‒ruby-‐‑‒create-‐‑‒snapshot

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

55

Instance StorageにSSDを積んだインスタンスが増えてきた

  EC2のタイプによって選択できるInstance Storeは以下の通り

Instance Type Instance Store Volumesm1small 1 x 160 GBdaggerm1medium 1 x 410 GBm1large 2 x 420 GB (840 GB)m1xlarge 4 x 420 GB (1680 GB)m2xlarge 1 x 420 GBm22xlarge 1 x 850 GBm24xlarge 2 x 840 GB (1680 GB)m3medium 1 x 4 GB SSDm3large 1 x 32 GB SSDm3xlarge 2 x 40 GB SSD (80 GB)m32xlarge 2 x 80 GB SSD (160 GB)

t1micro None (use Amazon EBS volumes)

c1medium 1 x 350 GBdaggerc1xlarge 4 x 420 GB (1680 GB)

Instance Type Instance Store Volumes

c3large 2 x 16 GB SSD (32 GB)c3xlarge 2 x 40 GB SSD (80 GB)c32xlarge 2 x 80 GB SSD (160 GB)c34xlarge 2 x 160 GB SSD (320 GB)c38xlarge 2 x 320 GB SSD (640 GB)cc28xlarge 4 x 840 GB (3360 GB)cg14xlarge 2 x 840 GB (1680 GB)cr18xlarge 2 x 120 GB SSD (240 GB)hi14xlarge 2 x 1024 GB SSD (2048 GB)hs18xlarge 24 x 2048 GB (49 TB)i2xlarge 1 x 800 GB SSDi22xlarge 2 x 800 GB SSD (1600 GB)i24xlarge 4 x 800 GB SSD (3200 GB)i28xlarge 8 x 800 GB SSD (6400 GB)

2014年年1月29日時点

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

56

Instance Storageを使うべきなのは

 高IOPS高帯域なストレージが必要な場合

 消えても良良い一次データの置き場として使う場合

 ストレージ冗長化を準備できる場合

S3活かしたいメリット

考慮すべき制約

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

57

EC2へのファイル転送は

  SCPを使う scp pk-‐‑‒XXXpem rootec2-‐‑‒XXXamazonawscomxxx

  Windowsの場合はWinSCPなど   S3経由で共有する

  S3にアップロードしEC2からwgetでアクセスする   FTPを立立ち上げる

  EC2側でFTPサーバーを立立ち上げておく

  高速に送信したい   Tsunami UDP Aspera等のソリューション

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

58

VM Import Export

  複数プラットフォームのVMイメージをAmazon EC2に移行行(インポートエクスポート)可能

httpawstypepadcomaws_japan201012vm-‐‑‒import-‐‑‒bring-‐‑‒your-‐‑‒vmware-‐‑‒images-‐‑‒to-‐‑‒the-‐‑‒cloudhtml

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

59

稼働EC2インスタンスからメタデータ取得

  ami-‐‑‒id   ami-‐‑‒launch-‐‑‒index   ami-‐‑‒manifest-‐‑‒path   block-‐‑‒device-‐‑‒mapping   hostname   instance-‐‑‒action   instance-‐‑‒id   Instance-‐‑‒type   kernel-‐‑‒id

  local-‐‑‒hostname   local-‐‑‒ipv4   mac   network   placement   profile   public-‐‑‒hostname   public-‐‑‒ipv4   public-‐‑‒keys   reservation-‐‑‒id

curl http169254169254latestmeta-‐‑‒data

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

60

起動時にパラメーターを渡す   起動時に16KB以内で任意のものを渡せる

  ChefやPuppetなどを利利用して自己構成できるAMIに   参照emsp AWSマイスターemsp CloudFormation資料料httpwwwslidesharenetkentamagawacloudformation-‐‑‒aws5

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

61

EC2コマンドラインツール amp AWS SDKs

  コマンドラインからEC2のAPIにアクセスできるツール   ツールをインストールしセキュリティ証明書を配置

  AWS SDKs httpawsamazoncomcode

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

62

マネージメントコンソールだけでなくAPIからプログラマブルにアクセス

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1a --instance-type m1small

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1b --instance-type m1small

Tokyo リージョン

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

63

EC2のスケジュールイベント表示機能

  EC2インスタンスが稼働しているハードかソフトにメンテナンスが必要な場合に情報を提供する仕組み

  インスタンスリブートシステムリブートリタイヤ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

64

EC2のステータスチェック機能

  下記の2種類のチェックを自動テストで実行行し情報を提示   システムステータスチェック

  EC2インスタンスにネットワークパケットが通るかチェック   インスタンスステータスチェック

  EC2インスタンスのOSがネットワークパケットを受け取るかチェック

  もし状況に乖離離がある場合はレポートできます

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

65

AWS制限増加申請

  EC2を誤って大量量に作成しないよう最大インスタンス数の上限を20に制限しています

  制限増加申請フォームで各種制限の増加を行行えますbull  httpawsamazoncomjpcontact-‐‑‒usemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

66

既存EBSボリュームのサイズ変更更

  例例 10GB -‐‑‒gt 100GB変更更への流流れ   EBSをデタッチする   EBSからS3にスナップショットを作成する

  新たなボリュームサイズを指定してEBSを作成する

  EBSをアタッチする   マウントしてリサイズする

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

スナップショット

EBS (10GB)

EBS (100GB)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

67

EBSとS3

EBSは複数EC2にアタッチ不不可   単独のEC2インスタンスへのブロックデバイスとしての使い方

  NFSのような使い方をする際はEC2にミドルウェアを導入(GlusterFS等)

S3は複数のEC2からアクセス可   ただしWrite Once Read A Lotな使い方に向いている

  アップロード並列列化も使える   耐久性の設計は99999999999で非常に高い

Copyright copy 2011 Amazon Web Services

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

バケット

EBS

EC2インスタンス

HTTPHTTPS

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

68

EIP使用時の注意点

  グローバルIP(EIP)を用いた場合インターネット経由のアクセスとなり課金発生するケースがある

  名前解決したいサーバに固定IPを付与する13   各サーバは固定グローバルIPを元に

AWSのDNSに名前を問い合わせ13   問い合わせた結果返ってくる外部DNS名でサーバにアクセスを行う13   EC2内部で外部DNS名を使ってアクセスすると プライベートIPアドレスに変換されるため 目的のサーバにプライベートIPでアクセスできる13

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

69

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

70

AWSの課金金の仕組みインターネット

ELB

EC2

EBS

S3

データ転送量量

ELB利利用料料データ処理理量量

インスタンスタイプ別利利用料料

EBSの利利用料料

S3の利利用料料

大半を占める

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

71

Simple Monthly Calculator

  Web上にある計算機を使って概算費用を計算できますsect  httpcalculators3amazonawscomcalc5htmllng=ja_JP

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

72

複数の価格モデル

 課金金モデルが選べるsect 通常の時間課金金のオンデマンドインスタンス

sect ある程度度継続してEC2を使う(1年年3年年)EC2リザーブドインスタンス

sect 入札を利利用してより安く使うEC2スポットインスタンス

rarrマイスターシリーズ RIampスポットインスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

73

AWS無料料試用枠

  AWSでは無料料試用枠を用意していますbull  httpawsamazoncomjpfreeemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

74

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

75

Appendix

  参考資料料bull  Amazon Glacier Developer Guidehttpdocsamazonwebservicescomamazonglacierlatestdevintroductionhtml

bull  Amazon Glacier FAQhttpawsamazoncomjpglacierfaqs

bull  Amazon Glaceir価格httpawsamazoncomjpglacierpricing

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

76

QampA

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 26: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

26

今日のAgenda

 Amazon EC2とは  Amazon EC2の基本

bull  触ってみようbull  基本コンセプト

 Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

27

Amazon Machine Image (AMI)

  AMIはインスタンス作成に使用するイメージテンプレート   AWS公式AMIやサードパーティもAMIを提供

bull  httpsawsamazoncomamisbull  httpsawsamazoncommarketplaceemsp 

  選択したAMIから起動する   EC2インスタンスから任意のタイミングでカスタムAMIを作成できる

launch

Amazon Machine Image (AMI)

Amazon EC2インスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

28

AMIとインスタンスAZの関係

インスタンス

Amazon S3

AMI

Availability Zone-1a Availability Zone-1b

カスタム AMI

AMIからインスタンスを起動

カスタムAMIを使ってインスタンスを複数台起動

カスタムAMIを作成必要に応じて共有設定

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

29

AMIの取得AMIからの起動

Copyright copy 2011 Amazon Web Services

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

30

EC2インスタンスのライフサイクル   起動したインスタンスは3つの状態を持つ

bull  Running 実行行中課金金されるbull  Stopped 停止中課金金されないbull  Terminated 終了了StopStartはできない

Running

Terminated

Stopped

StartStop

Terminate

launch

Terminate

Amazon Machine Image (AMI)

Amazon EC2インスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

31

EC2インスタンスの停止と終了了

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

32

EC2インスタンスのタイプ変更Stop(停止)しているといつでもタイプ(スペック)を変更更できる

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

33

EBSボリュームのアタッチ

Copyright copy 2011 Amazon Web Services

EC2インスタンスと同じゾーンに作ることを注意 スナップショットから複製も可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

34

EC2インスタンスのアドレス

  全てのインスタンスが下記を持つsect  Private IPアドレス(VPC内のサブネットから割り当てる)sect  Private DNS名(internal)sect  Public DNS名 (amazonawscom)

  public IPアドレスをオプションで付けられる   固定されたPublic IP Addresses はEIPと呼ぶ

sect  稼働しているEC2インスタンスに瞬時に付け外しが可能sect  インスタンスにアサインしているときは料料金金はかからない

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

35

EIPの割り当て

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

36

EIPの使いどころ

  通常のケースはEIPは必要なくEC2のPublic DNS名を用いてCNAMEで名前変換を行行う

  Route 53(名前解決サービス)でPublic DNSを用いる

  固定IPアドレスが必要なときに限りEIPを用いる   メールサーバー監視サーバー等

  メールサーバの送信制限解除逆引き申請が必要な場合は下記から申請を行行うhttpsaws-‐‑‒portalamazoncomgpawshtml-‐‑‒forms-‐‑‒controllercontactusec2-‐‑‒email-‐‑‒limit-‐‑‒rdns-‐‑‒request

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

37

リージョン間コピー(AMIEBS)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

38

Amazon EC2の関連サービス関連情報   監視負荷分散自動スケール

rarrCloudWatchELBAutoScaling   閉域網での利利用仮想ネットワーキング

rarrAmazon VPC (Virtual Private Cloud)   ① 社内ネットワークからVPN接続   ② ルーティングイントラIPアドレス仮想NIC等々

  占有サーバ rarrAmazon Dedicated Instance   専用線接続 rarrAmazon Direct Connect   Windowsemsp emsp  rarrWindowsインスタンス   スパコンrarrHPCインスタンス   アクセス管理理emsp  rarrIAM (Identity and Access Management)   料料金金関係emsp  rarrConsolidated Billing資料料集emsp httpawsamazoncomjpaws-‐‑‒meister

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

39

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

40

AWSのセキュリティの考え方

第三者認証

SOC 1SSAE 16ISAE 3402 ISO 27001 PCI DSS HIPAA ITAR

FISMA Moderate FIPS 140-2 ファシリティ

DC電源ネットワーク冗長化

Your Apps

Webサイトアプリケーションこれまでと同様のセキュリティを

お客様SI様で実現可能

インフラよりハイレベルの

セキュリティをAWSが提供

シェアードレスポンシビリティモデル(責任共有モデル)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

41

EC2の責任共有モデル

物理インタフェース

ファイアウォール

      ハイバーバイザー

Sm

all

Larg

e

hellip

Sm

all Amazon EC2

インスタンス

物理ホスト

ユーザーが 責任を持って 管理する

AWSが 責任を持って 管理する

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

42

ファイアウォールを実現するSecurity Group

  インスタンスのINOUTトラフィックを制限するファイアウォール機能

  デフォルトIN向けは全トラフィック閉

  必要な受信アクセスに対してアクセスルールを定義する

bull  プロトコル( TCPUDP)bull  宛先ポートbull  アクセス元IP Security Group

  ルールをひとまとめにしたテンプレートを Security Groupと呼ぶ

EC2 インスタンス

ポート22(SSH)

ポート80(HTTP)

EC2ファイアウォール

Security Group

ポート25(SMTP)

ポート22(SSH)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

43

Security Groupの使い方   インスタンスの用途に応じたSecurity Groupを用意する

bull  Webサーバ用DBサーバ用メールサーバ用等   アクセス元にSecurity Groupも設定して限定可能

Webサーバ

Webサーバ

DBサーバ

sg-1234

22 00000 80 00000 25 sg-1234

sg-1234

sg-1234

sg-abcd sg-abcd

22 00000 3306 sg-1234

Webサーバ

sg-xyz

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

44

セキュリティ証明書

仮想サーバ(Amazon EC2)Windows( スタンダード)

コマンドライン SDK利利用

SSH公開鍵認証

仮想デスクトップ

ターミナル

REST SOAPAPI

Webコンソール

①EC2インスタンスへのアクセスrarr鍵認証

②Webコンソールへのアクセス

rarrパスワード認証 多要素認証 IAM

③APIへのアクセスrarrアクセスキー X509証明書 IAM

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

45

Key Pair(キーペア)を用いた鍵認証   鍵認証はユーザ名パスワードの認証よりも安全な認証方式

ダウンロードされた秘密鍵

①キーペア作成

②インスタンス起動時にemsp emsp emsp 公開鍵をコピー

公開鍵

③公開鍵秘密鍵のペアが合致するとログイン可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

46

EC2のSLA13

sect  EC2の可用性が9995 sect 上記に満たない場合はServiceクレジットを返還する

sect 詳細は sect  httpawsamazoncomec2-sla

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

47

AWSセキュリティセンター 13

 日本語のホワイトペーパー bull  セキュリティ概要 bull  リスクとコンプライアンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

48

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

49

最近追加された機能

  VM Import for Linux   IAM EC2 Resource Permissions   リザーブドインスタンスの変更更可能に   SR-‐‑‒IOVネットワークDriverネットワーク性能向上

bull  C3 I2 R3インスタンスで対応

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

50

インスタンスのさらなる追加

  一般的な目的なら M3   Compute Optimizedなら C3   Memory Optimizedなら R3(もうすぐ)   GPUが必要なら G2   IOPS重視なら I2   Disk Based Storage ならHS1

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

51

Intel Processor Features

  m3 c3 cc2 g2 cr1 i2 r3の全てが対応

  AES New Instructions (AES-‐‑‒NI)bull  c1 cg1 m2でも対応

  Advanced Vector Extensions (Intel AVX)bull  HVMでのみ対応

  Turbo Boost Technology

  詳細は httpawsamazoncomec2instance-‐‑‒types

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

52

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

53

故障のための設計 Design for Failure   故障に備えた設計をしておく

  すべてが故障しうると考えシステム全体での保守的設計   SPOF(単一障害点)の排除   障害からの復復旧(対応品質)を重視する

  EC2における故障のための設計   AMIを常にとっておく   EBSスナップショットでバックアップ   複数アベイラビリティゾーンへの分散   ELBでサーバを冗長化Auto Scalingで自動復復帰   Reserved Instanceでキャパシティ保障

  他の冗長性高いサービスとの組み合わせ   S3 SimpleDB RDS他

httpwwwslidesharenetkentamagawaaws-‐‑‒7991623

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

54

定期的なバックアップ

  EC2のAMIを定期的に作成する   (参考) 無停止でAMI取得

Cloudpackさんブログhttpblogcloudpackjp201103aws-‐‑‒news-‐‑‒ec2-‐‑‒instance-‐‑‒no-‐‑‒reboot-‐‑‒amihtml

  データボリュームとしてのEBSの場合EBSのスナップショットを定期的に作成

  スクリプトを書いて定期的なバックアップを行行うことも可能 Coderockさんブログ

httpblogdateofrockcom201003auto-‐‑‒backup-‐‑‒amazon-‐‑‒ebs-‐‑‒with-‐‑‒rubyhtml   サーバーワークスさんブログ

httpblogserverworkscojptech20110721awssdk-‐‑‒for-‐‑‒ruby-‐‑‒create-‐‑‒snapshot

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

55

Instance StorageにSSDを積んだインスタンスが増えてきた

  EC2のタイプによって選択できるInstance Storeは以下の通り

Instance Type Instance Store Volumesm1small 1 x 160 GBdaggerm1medium 1 x 410 GBm1large 2 x 420 GB (840 GB)m1xlarge 4 x 420 GB (1680 GB)m2xlarge 1 x 420 GBm22xlarge 1 x 850 GBm24xlarge 2 x 840 GB (1680 GB)m3medium 1 x 4 GB SSDm3large 1 x 32 GB SSDm3xlarge 2 x 40 GB SSD (80 GB)m32xlarge 2 x 80 GB SSD (160 GB)

t1micro None (use Amazon EBS volumes)

c1medium 1 x 350 GBdaggerc1xlarge 4 x 420 GB (1680 GB)

Instance Type Instance Store Volumes

c3large 2 x 16 GB SSD (32 GB)c3xlarge 2 x 40 GB SSD (80 GB)c32xlarge 2 x 80 GB SSD (160 GB)c34xlarge 2 x 160 GB SSD (320 GB)c38xlarge 2 x 320 GB SSD (640 GB)cc28xlarge 4 x 840 GB (3360 GB)cg14xlarge 2 x 840 GB (1680 GB)cr18xlarge 2 x 120 GB SSD (240 GB)hi14xlarge 2 x 1024 GB SSD (2048 GB)hs18xlarge 24 x 2048 GB (49 TB)i2xlarge 1 x 800 GB SSDi22xlarge 2 x 800 GB SSD (1600 GB)i24xlarge 4 x 800 GB SSD (3200 GB)i28xlarge 8 x 800 GB SSD (6400 GB)

2014年年1月29日時点

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

56

Instance Storageを使うべきなのは

 高IOPS高帯域なストレージが必要な場合

 消えても良良い一次データの置き場として使う場合

 ストレージ冗長化を準備できる場合

S3活かしたいメリット

考慮すべき制約

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

57

EC2へのファイル転送は

  SCPを使う scp pk-‐‑‒XXXpem rootec2-‐‑‒XXXamazonawscomxxx

  Windowsの場合はWinSCPなど   S3経由で共有する

  S3にアップロードしEC2からwgetでアクセスする   FTPを立立ち上げる

  EC2側でFTPサーバーを立立ち上げておく

  高速に送信したい   Tsunami UDP Aspera等のソリューション

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

58

VM Import Export

  複数プラットフォームのVMイメージをAmazon EC2に移行行(インポートエクスポート)可能

httpawstypepadcomaws_japan201012vm-‐‑‒import-‐‑‒bring-‐‑‒your-‐‑‒vmware-‐‑‒images-‐‑‒to-‐‑‒the-‐‑‒cloudhtml

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

59

稼働EC2インスタンスからメタデータ取得

  ami-‐‑‒id   ami-‐‑‒launch-‐‑‒index   ami-‐‑‒manifest-‐‑‒path   block-‐‑‒device-‐‑‒mapping   hostname   instance-‐‑‒action   instance-‐‑‒id   Instance-‐‑‒type   kernel-‐‑‒id

  local-‐‑‒hostname   local-‐‑‒ipv4   mac   network   placement   profile   public-‐‑‒hostname   public-‐‑‒ipv4   public-‐‑‒keys   reservation-‐‑‒id

curl http169254169254latestmeta-‐‑‒data

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

60

起動時にパラメーターを渡す   起動時に16KB以内で任意のものを渡せる

  ChefやPuppetなどを利利用して自己構成できるAMIに   参照emsp AWSマイスターemsp CloudFormation資料料httpwwwslidesharenetkentamagawacloudformation-‐‑‒aws5

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

61

EC2コマンドラインツール amp AWS SDKs

  コマンドラインからEC2のAPIにアクセスできるツール   ツールをインストールしセキュリティ証明書を配置

  AWS SDKs httpawsamazoncomcode

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

62

マネージメントコンソールだけでなくAPIからプログラマブルにアクセス

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1a --instance-type m1small

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1b --instance-type m1small

Tokyo リージョン

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

63

EC2のスケジュールイベント表示機能

  EC2インスタンスが稼働しているハードかソフトにメンテナンスが必要な場合に情報を提供する仕組み

  インスタンスリブートシステムリブートリタイヤ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

64

EC2のステータスチェック機能

  下記の2種類のチェックを自動テストで実行行し情報を提示   システムステータスチェック

  EC2インスタンスにネットワークパケットが通るかチェック   インスタンスステータスチェック

  EC2インスタンスのOSがネットワークパケットを受け取るかチェック

  もし状況に乖離離がある場合はレポートできます

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

65

AWS制限増加申請

  EC2を誤って大量量に作成しないよう最大インスタンス数の上限を20に制限しています

  制限増加申請フォームで各種制限の増加を行行えますbull  httpawsamazoncomjpcontact-‐‑‒usemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

66

既存EBSボリュームのサイズ変更更

  例例 10GB -‐‑‒gt 100GB変更更への流流れ   EBSをデタッチする   EBSからS3にスナップショットを作成する

  新たなボリュームサイズを指定してEBSを作成する

  EBSをアタッチする   マウントしてリサイズする

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

スナップショット

EBS (10GB)

EBS (100GB)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

67

EBSとS3

EBSは複数EC2にアタッチ不不可   単独のEC2インスタンスへのブロックデバイスとしての使い方

  NFSのような使い方をする際はEC2にミドルウェアを導入(GlusterFS等)

S3は複数のEC2からアクセス可   ただしWrite Once Read A Lotな使い方に向いている

  アップロード並列列化も使える   耐久性の設計は99999999999で非常に高い

Copyright copy 2011 Amazon Web Services

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

バケット

EBS

EC2インスタンス

HTTPHTTPS

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

68

EIP使用時の注意点

  グローバルIP(EIP)を用いた場合インターネット経由のアクセスとなり課金発生するケースがある

  名前解決したいサーバに固定IPを付与する13   各サーバは固定グローバルIPを元に

AWSのDNSに名前を問い合わせ13   問い合わせた結果返ってくる外部DNS名でサーバにアクセスを行う13   EC2内部で外部DNS名を使ってアクセスすると プライベートIPアドレスに変換されるため 目的のサーバにプライベートIPでアクセスできる13

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

69

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

70

AWSの課金金の仕組みインターネット

ELB

EC2

EBS

S3

データ転送量量

ELB利利用料料データ処理理量量

インスタンスタイプ別利利用料料

EBSの利利用料料

S3の利利用料料

大半を占める

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

71

Simple Monthly Calculator

  Web上にある計算機を使って概算費用を計算できますsect  httpcalculators3amazonawscomcalc5htmllng=ja_JP

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

72

複数の価格モデル

 課金金モデルが選べるsect 通常の時間課金金のオンデマンドインスタンス

sect ある程度度継続してEC2を使う(1年年3年年)EC2リザーブドインスタンス

sect 入札を利利用してより安く使うEC2スポットインスタンス

rarrマイスターシリーズ RIampスポットインスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

73

AWS無料料試用枠

  AWSでは無料料試用枠を用意していますbull  httpawsamazoncomjpfreeemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

74

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

75

Appendix

  参考資料料bull  Amazon Glacier Developer Guidehttpdocsamazonwebservicescomamazonglacierlatestdevintroductionhtml

bull  Amazon Glacier FAQhttpawsamazoncomjpglacierfaqs

bull  Amazon Glaceir価格httpawsamazoncomjpglacierpricing

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

76

QampA

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 27: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

27

Amazon Machine Image (AMI)

  AMIはインスタンス作成に使用するイメージテンプレート   AWS公式AMIやサードパーティもAMIを提供

bull  httpsawsamazoncomamisbull  httpsawsamazoncommarketplaceemsp 

  選択したAMIから起動する   EC2インスタンスから任意のタイミングでカスタムAMIを作成できる

launch

Amazon Machine Image (AMI)

Amazon EC2インスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

28

AMIとインスタンスAZの関係

インスタンス

Amazon S3

AMI

Availability Zone-1a Availability Zone-1b

カスタム AMI

AMIからインスタンスを起動

カスタムAMIを使ってインスタンスを複数台起動

カスタムAMIを作成必要に応じて共有設定

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

29

AMIの取得AMIからの起動

Copyright copy 2011 Amazon Web Services

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

30

EC2インスタンスのライフサイクル   起動したインスタンスは3つの状態を持つ

bull  Running 実行行中課金金されるbull  Stopped 停止中課金金されないbull  Terminated 終了了StopStartはできない

Running

Terminated

Stopped

StartStop

Terminate

launch

Terminate

Amazon Machine Image (AMI)

Amazon EC2インスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

31

EC2インスタンスの停止と終了了

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

32

EC2インスタンスのタイプ変更Stop(停止)しているといつでもタイプ(スペック)を変更更できる

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

33

EBSボリュームのアタッチ

Copyright copy 2011 Amazon Web Services

EC2インスタンスと同じゾーンに作ることを注意 スナップショットから複製も可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

34

EC2インスタンスのアドレス

  全てのインスタンスが下記を持つsect  Private IPアドレス(VPC内のサブネットから割り当てる)sect  Private DNS名(internal)sect  Public DNS名 (amazonawscom)

  public IPアドレスをオプションで付けられる   固定されたPublic IP Addresses はEIPと呼ぶ

sect  稼働しているEC2インスタンスに瞬時に付け外しが可能sect  インスタンスにアサインしているときは料料金金はかからない

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

35

EIPの割り当て

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

36

EIPの使いどころ

  通常のケースはEIPは必要なくEC2のPublic DNS名を用いてCNAMEで名前変換を行行う

  Route 53(名前解決サービス)でPublic DNSを用いる

  固定IPアドレスが必要なときに限りEIPを用いる   メールサーバー監視サーバー等

  メールサーバの送信制限解除逆引き申請が必要な場合は下記から申請を行行うhttpsaws-‐‑‒portalamazoncomgpawshtml-‐‑‒forms-‐‑‒controllercontactusec2-‐‑‒email-‐‑‒limit-‐‑‒rdns-‐‑‒request

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

37

リージョン間コピー(AMIEBS)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

38

Amazon EC2の関連サービス関連情報   監視負荷分散自動スケール

rarrCloudWatchELBAutoScaling   閉域網での利利用仮想ネットワーキング

rarrAmazon VPC (Virtual Private Cloud)   ① 社内ネットワークからVPN接続   ② ルーティングイントラIPアドレス仮想NIC等々

  占有サーバ rarrAmazon Dedicated Instance   専用線接続 rarrAmazon Direct Connect   Windowsemsp emsp  rarrWindowsインスタンス   スパコンrarrHPCインスタンス   アクセス管理理emsp  rarrIAM (Identity and Access Management)   料料金金関係emsp  rarrConsolidated Billing資料料集emsp httpawsamazoncomjpaws-‐‑‒meister

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

39

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

40

AWSのセキュリティの考え方

第三者認証

SOC 1SSAE 16ISAE 3402 ISO 27001 PCI DSS HIPAA ITAR

FISMA Moderate FIPS 140-2 ファシリティ

DC電源ネットワーク冗長化

Your Apps

Webサイトアプリケーションこれまでと同様のセキュリティを

お客様SI様で実現可能

インフラよりハイレベルの

セキュリティをAWSが提供

シェアードレスポンシビリティモデル(責任共有モデル)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

41

EC2の責任共有モデル

物理インタフェース

ファイアウォール

      ハイバーバイザー

Sm

all

Larg

e

hellip

Sm

all Amazon EC2

インスタンス

物理ホスト

ユーザーが 責任を持って 管理する

AWSが 責任を持って 管理する

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

42

ファイアウォールを実現するSecurity Group

  インスタンスのINOUTトラフィックを制限するファイアウォール機能

  デフォルトIN向けは全トラフィック閉

  必要な受信アクセスに対してアクセスルールを定義する

bull  プロトコル( TCPUDP)bull  宛先ポートbull  アクセス元IP Security Group

  ルールをひとまとめにしたテンプレートを Security Groupと呼ぶ

EC2 インスタンス

ポート22(SSH)

ポート80(HTTP)

EC2ファイアウォール

Security Group

ポート25(SMTP)

ポート22(SSH)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

43

Security Groupの使い方   インスタンスの用途に応じたSecurity Groupを用意する

bull  Webサーバ用DBサーバ用メールサーバ用等   アクセス元にSecurity Groupも設定して限定可能

Webサーバ

Webサーバ

DBサーバ

sg-1234

22 00000 80 00000 25 sg-1234

sg-1234

sg-1234

sg-abcd sg-abcd

22 00000 3306 sg-1234

Webサーバ

sg-xyz

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

44

セキュリティ証明書

仮想サーバ(Amazon EC2)Windows( スタンダード)

コマンドライン SDK利利用

SSH公開鍵認証

仮想デスクトップ

ターミナル

REST SOAPAPI

Webコンソール

①EC2インスタンスへのアクセスrarr鍵認証

②Webコンソールへのアクセス

rarrパスワード認証 多要素認証 IAM

③APIへのアクセスrarrアクセスキー X509証明書 IAM

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

45

Key Pair(キーペア)を用いた鍵認証   鍵認証はユーザ名パスワードの認証よりも安全な認証方式

ダウンロードされた秘密鍵

①キーペア作成

②インスタンス起動時にemsp emsp emsp 公開鍵をコピー

公開鍵

③公開鍵秘密鍵のペアが合致するとログイン可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

46

EC2のSLA13

sect  EC2の可用性が9995 sect 上記に満たない場合はServiceクレジットを返還する

sect 詳細は sect  httpawsamazoncomec2-sla

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

47

AWSセキュリティセンター 13

 日本語のホワイトペーパー bull  セキュリティ概要 bull  リスクとコンプライアンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

48

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

49

最近追加された機能

  VM Import for Linux   IAM EC2 Resource Permissions   リザーブドインスタンスの変更更可能に   SR-‐‑‒IOVネットワークDriverネットワーク性能向上

bull  C3 I2 R3インスタンスで対応

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

50

インスタンスのさらなる追加

  一般的な目的なら M3   Compute Optimizedなら C3   Memory Optimizedなら R3(もうすぐ)   GPUが必要なら G2   IOPS重視なら I2   Disk Based Storage ならHS1

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

51

Intel Processor Features

  m3 c3 cc2 g2 cr1 i2 r3の全てが対応

  AES New Instructions (AES-‐‑‒NI)bull  c1 cg1 m2でも対応

  Advanced Vector Extensions (Intel AVX)bull  HVMでのみ対応

  Turbo Boost Technology

  詳細は httpawsamazoncomec2instance-‐‑‒types

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

52

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

53

故障のための設計 Design for Failure   故障に備えた設計をしておく

  すべてが故障しうると考えシステム全体での保守的設計   SPOF(単一障害点)の排除   障害からの復復旧(対応品質)を重視する

  EC2における故障のための設計   AMIを常にとっておく   EBSスナップショットでバックアップ   複数アベイラビリティゾーンへの分散   ELBでサーバを冗長化Auto Scalingで自動復復帰   Reserved Instanceでキャパシティ保障

  他の冗長性高いサービスとの組み合わせ   S3 SimpleDB RDS他

httpwwwslidesharenetkentamagawaaws-‐‑‒7991623

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

54

定期的なバックアップ

  EC2のAMIを定期的に作成する   (参考) 無停止でAMI取得

Cloudpackさんブログhttpblogcloudpackjp201103aws-‐‑‒news-‐‑‒ec2-‐‑‒instance-‐‑‒no-‐‑‒reboot-‐‑‒amihtml

  データボリュームとしてのEBSの場合EBSのスナップショットを定期的に作成

  スクリプトを書いて定期的なバックアップを行行うことも可能 Coderockさんブログ

httpblogdateofrockcom201003auto-‐‑‒backup-‐‑‒amazon-‐‑‒ebs-‐‑‒with-‐‑‒rubyhtml   サーバーワークスさんブログ

httpblogserverworkscojptech20110721awssdk-‐‑‒for-‐‑‒ruby-‐‑‒create-‐‑‒snapshot

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

55

Instance StorageにSSDを積んだインスタンスが増えてきた

  EC2のタイプによって選択できるInstance Storeは以下の通り

Instance Type Instance Store Volumesm1small 1 x 160 GBdaggerm1medium 1 x 410 GBm1large 2 x 420 GB (840 GB)m1xlarge 4 x 420 GB (1680 GB)m2xlarge 1 x 420 GBm22xlarge 1 x 850 GBm24xlarge 2 x 840 GB (1680 GB)m3medium 1 x 4 GB SSDm3large 1 x 32 GB SSDm3xlarge 2 x 40 GB SSD (80 GB)m32xlarge 2 x 80 GB SSD (160 GB)

t1micro None (use Amazon EBS volumes)

c1medium 1 x 350 GBdaggerc1xlarge 4 x 420 GB (1680 GB)

Instance Type Instance Store Volumes

c3large 2 x 16 GB SSD (32 GB)c3xlarge 2 x 40 GB SSD (80 GB)c32xlarge 2 x 80 GB SSD (160 GB)c34xlarge 2 x 160 GB SSD (320 GB)c38xlarge 2 x 320 GB SSD (640 GB)cc28xlarge 4 x 840 GB (3360 GB)cg14xlarge 2 x 840 GB (1680 GB)cr18xlarge 2 x 120 GB SSD (240 GB)hi14xlarge 2 x 1024 GB SSD (2048 GB)hs18xlarge 24 x 2048 GB (49 TB)i2xlarge 1 x 800 GB SSDi22xlarge 2 x 800 GB SSD (1600 GB)i24xlarge 4 x 800 GB SSD (3200 GB)i28xlarge 8 x 800 GB SSD (6400 GB)

2014年年1月29日時点

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

56

Instance Storageを使うべきなのは

 高IOPS高帯域なストレージが必要な場合

 消えても良良い一次データの置き場として使う場合

 ストレージ冗長化を準備できる場合

S3活かしたいメリット

考慮すべき制約

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

57

EC2へのファイル転送は

  SCPを使う scp pk-‐‑‒XXXpem rootec2-‐‑‒XXXamazonawscomxxx

  Windowsの場合はWinSCPなど   S3経由で共有する

  S3にアップロードしEC2からwgetでアクセスする   FTPを立立ち上げる

  EC2側でFTPサーバーを立立ち上げておく

  高速に送信したい   Tsunami UDP Aspera等のソリューション

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

58

VM Import Export

  複数プラットフォームのVMイメージをAmazon EC2に移行行(インポートエクスポート)可能

httpawstypepadcomaws_japan201012vm-‐‑‒import-‐‑‒bring-‐‑‒your-‐‑‒vmware-‐‑‒images-‐‑‒to-‐‑‒the-‐‑‒cloudhtml

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

59

稼働EC2インスタンスからメタデータ取得

  ami-‐‑‒id   ami-‐‑‒launch-‐‑‒index   ami-‐‑‒manifest-‐‑‒path   block-‐‑‒device-‐‑‒mapping   hostname   instance-‐‑‒action   instance-‐‑‒id   Instance-‐‑‒type   kernel-‐‑‒id

  local-‐‑‒hostname   local-‐‑‒ipv4   mac   network   placement   profile   public-‐‑‒hostname   public-‐‑‒ipv4   public-‐‑‒keys   reservation-‐‑‒id

curl http169254169254latestmeta-‐‑‒data

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

60

起動時にパラメーターを渡す   起動時に16KB以内で任意のものを渡せる

  ChefやPuppetなどを利利用して自己構成できるAMIに   参照emsp AWSマイスターemsp CloudFormation資料料httpwwwslidesharenetkentamagawacloudformation-‐‑‒aws5

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

61

EC2コマンドラインツール amp AWS SDKs

  コマンドラインからEC2のAPIにアクセスできるツール   ツールをインストールしセキュリティ証明書を配置

  AWS SDKs httpawsamazoncomcode

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

62

マネージメントコンソールだけでなくAPIからプログラマブルにアクセス

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1a --instance-type m1small

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1b --instance-type m1small

Tokyo リージョン

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

63

EC2のスケジュールイベント表示機能

  EC2インスタンスが稼働しているハードかソフトにメンテナンスが必要な場合に情報を提供する仕組み

  インスタンスリブートシステムリブートリタイヤ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

64

EC2のステータスチェック機能

  下記の2種類のチェックを自動テストで実行行し情報を提示   システムステータスチェック

  EC2インスタンスにネットワークパケットが通るかチェック   インスタンスステータスチェック

  EC2インスタンスのOSがネットワークパケットを受け取るかチェック

  もし状況に乖離離がある場合はレポートできます

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

65

AWS制限増加申請

  EC2を誤って大量量に作成しないよう最大インスタンス数の上限を20に制限しています

  制限増加申請フォームで各種制限の増加を行行えますbull  httpawsamazoncomjpcontact-‐‑‒usemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

66

既存EBSボリュームのサイズ変更更

  例例 10GB -‐‑‒gt 100GB変更更への流流れ   EBSをデタッチする   EBSからS3にスナップショットを作成する

  新たなボリュームサイズを指定してEBSを作成する

  EBSをアタッチする   マウントしてリサイズする

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

スナップショット

EBS (10GB)

EBS (100GB)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

67

EBSとS3

EBSは複数EC2にアタッチ不不可   単独のEC2インスタンスへのブロックデバイスとしての使い方

  NFSのような使い方をする際はEC2にミドルウェアを導入(GlusterFS等)

S3は複数のEC2からアクセス可   ただしWrite Once Read A Lotな使い方に向いている

  アップロード並列列化も使える   耐久性の設計は99999999999で非常に高い

Copyright copy 2011 Amazon Web Services

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

バケット

EBS

EC2インスタンス

HTTPHTTPS

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

68

EIP使用時の注意点

  グローバルIP(EIP)を用いた場合インターネット経由のアクセスとなり課金発生するケースがある

  名前解決したいサーバに固定IPを付与する13   各サーバは固定グローバルIPを元に

AWSのDNSに名前を問い合わせ13   問い合わせた結果返ってくる外部DNS名でサーバにアクセスを行う13   EC2内部で外部DNS名を使ってアクセスすると プライベートIPアドレスに変換されるため 目的のサーバにプライベートIPでアクセスできる13

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

69

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

70

AWSの課金金の仕組みインターネット

ELB

EC2

EBS

S3

データ転送量量

ELB利利用料料データ処理理量量

インスタンスタイプ別利利用料料

EBSの利利用料料

S3の利利用料料

大半を占める

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

71

Simple Monthly Calculator

  Web上にある計算機を使って概算費用を計算できますsect  httpcalculators3amazonawscomcalc5htmllng=ja_JP

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

72

複数の価格モデル

 課金金モデルが選べるsect 通常の時間課金金のオンデマンドインスタンス

sect ある程度度継続してEC2を使う(1年年3年年)EC2リザーブドインスタンス

sect 入札を利利用してより安く使うEC2スポットインスタンス

rarrマイスターシリーズ RIampスポットインスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

73

AWS無料料試用枠

  AWSでは無料料試用枠を用意していますbull  httpawsamazoncomjpfreeemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

74

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

75

Appendix

  参考資料料bull  Amazon Glacier Developer Guidehttpdocsamazonwebservicescomamazonglacierlatestdevintroductionhtml

bull  Amazon Glacier FAQhttpawsamazoncomjpglacierfaqs

bull  Amazon Glaceir価格httpawsamazoncomjpglacierpricing

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

76

QampA

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 28: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

28

AMIとインスタンスAZの関係

インスタンス

Amazon S3

AMI

Availability Zone-1a Availability Zone-1b

カスタム AMI

AMIからインスタンスを起動

カスタムAMIを使ってインスタンスを複数台起動

カスタムAMIを作成必要に応じて共有設定

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

29

AMIの取得AMIからの起動

Copyright copy 2011 Amazon Web Services

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

30

EC2インスタンスのライフサイクル   起動したインスタンスは3つの状態を持つ

bull  Running 実行行中課金金されるbull  Stopped 停止中課金金されないbull  Terminated 終了了StopStartはできない

Running

Terminated

Stopped

StartStop

Terminate

launch

Terminate

Amazon Machine Image (AMI)

Amazon EC2インスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

31

EC2インスタンスの停止と終了了

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

32

EC2インスタンスのタイプ変更Stop(停止)しているといつでもタイプ(スペック)を変更更できる

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

33

EBSボリュームのアタッチ

Copyright copy 2011 Amazon Web Services

EC2インスタンスと同じゾーンに作ることを注意 スナップショットから複製も可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

34

EC2インスタンスのアドレス

  全てのインスタンスが下記を持つsect  Private IPアドレス(VPC内のサブネットから割り当てる)sect  Private DNS名(internal)sect  Public DNS名 (amazonawscom)

  public IPアドレスをオプションで付けられる   固定されたPublic IP Addresses はEIPと呼ぶ

sect  稼働しているEC2インスタンスに瞬時に付け外しが可能sect  インスタンスにアサインしているときは料料金金はかからない

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

35

EIPの割り当て

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

36

EIPの使いどころ

  通常のケースはEIPは必要なくEC2のPublic DNS名を用いてCNAMEで名前変換を行行う

  Route 53(名前解決サービス)でPublic DNSを用いる

  固定IPアドレスが必要なときに限りEIPを用いる   メールサーバー監視サーバー等

  メールサーバの送信制限解除逆引き申請が必要な場合は下記から申請を行行うhttpsaws-‐‑‒portalamazoncomgpawshtml-‐‑‒forms-‐‑‒controllercontactusec2-‐‑‒email-‐‑‒limit-‐‑‒rdns-‐‑‒request

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

37

リージョン間コピー(AMIEBS)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

38

Amazon EC2の関連サービス関連情報   監視負荷分散自動スケール

rarrCloudWatchELBAutoScaling   閉域網での利利用仮想ネットワーキング

rarrAmazon VPC (Virtual Private Cloud)   ① 社内ネットワークからVPN接続   ② ルーティングイントラIPアドレス仮想NIC等々

  占有サーバ rarrAmazon Dedicated Instance   専用線接続 rarrAmazon Direct Connect   Windowsemsp emsp  rarrWindowsインスタンス   スパコンrarrHPCインスタンス   アクセス管理理emsp  rarrIAM (Identity and Access Management)   料料金金関係emsp  rarrConsolidated Billing資料料集emsp httpawsamazoncomjpaws-‐‑‒meister

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

39

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

40

AWSのセキュリティの考え方

第三者認証

SOC 1SSAE 16ISAE 3402 ISO 27001 PCI DSS HIPAA ITAR

FISMA Moderate FIPS 140-2 ファシリティ

DC電源ネットワーク冗長化

Your Apps

Webサイトアプリケーションこれまでと同様のセキュリティを

お客様SI様で実現可能

インフラよりハイレベルの

セキュリティをAWSが提供

シェアードレスポンシビリティモデル(責任共有モデル)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

41

EC2の責任共有モデル

物理インタフェース

ファイアウォール

      ハイバーバイザー

Sm

all

Larg

e

hellip

Sm

all Amazon EC2

インスタンス

物理ホスト

ユーザーが 責任を持って 管理する

AWSが 責任を持って 管理する

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

42

ファイアウォールを実現するSecurity Group

  インスタンスのINOUTトラフィックを制限するファイアウォール機能

  デフォルトIN向けは全トラフィック閉

  必要な受信アクセスに対してアクセスルールを定義する

bull  プロトコル( TCPUDP)bull  宛先ポートbull  アクセス元IP Security Group

  ルールをひとまとめにしたテンプレートを Security Groupと呼ぶ

EC2 インスタンス

ポート22(SSH)

ポート80(HTTP)

EC2ファイアウォール

Security Group

ポート25(SMTP)

ポート22(SSH)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

43

Security Groupの使い方   インスタンスの用途に応じたSecurity Groupを用意する

bull  Webサーバ用DBサーバ用メールサーバ用等   アクセス元にSecurity Groupも設定して限定可能

Webサーバ

Webサーバ

DBサーバ

sg-1234

22 00000 80 00000 25 sg-1234

sg-1234

sg-1234

sg-abcd sg-abcd

22 00000 3306 sg-1234

Webサーバ

sg-xyz

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

44

セキュリティ証明書

仮想サーバ(Amazon EC2)Windows( スタンダード)

コマンドライン SDK利利用

SSH公開鍵認証

仮想デスクトップ

ターミナル

REST SOAPAPI

Webコンソール

①EC2インスタンスへのアクセスrarr鍵認証

②Webコンソールへのアクセス

rarrパスワード認証 多要素認証 IAM

③APIへのアクセスrarrアクセスキー X509証明書 IAM

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

45

Key Pair(キーペア)を用いた鍵認証   鍵認証はユーザ名パスワードの認証よりも安全な認証方式

ダウンロードされた秘密鍵

①キーペア作成

②インスタンス起動時にemsp emsp emsp 公開鍵をコピー

公開鍵

③公開鍵秘密鍵のペアが合致するとログイン可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

46

EC2のSLA13

sect  EC2の可用性が9995 sect 上記に満たない場合はServiceクレジットを返還する

sect 詳細は sect  httpawsamazoncomec2-sla

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

47

AWSセキュリティセンター 13

 日本語のホワイトペーパー bull  セキュリティ概要 bull  リスクとコンプライアンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

48

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

49

最近追加された機能

  VM Import for Linux   IAM EC2 Resource Permissions   リザーブドインスタンスの変更更可能に   SR-‐‑‒IOVネットワークDriverネットワーク性能向上

bull  C3 I2 R3インスタンスで対応

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

50

インスタンスのさらなる追加

  一般的な目的なら M3   Compute Optimizedなら C3   Memory Optimizedなら R3(もうすぐ)   GPUが必要なら G2   IOPS重視なら I2   Disk Based Storage ならHS1

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

51

Intel Processor Features

  m3 c3 cc2 g2 cr1 i2 r3の全てが対応

  AES New Instructions (AES-‐‑‒NI)bull  c1 cg1 m2でも対応

  Advanced Vector Extensions (Intel AVX)bull  HVMでのみ対応

  Turbo Boost Technology

  詳細は httpawsamazoncomec2instance-‐‑‒types

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

52

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

53

故障のための設計 Design for Failure   故障に備えた設計をしておく

  すべてが故障しうると考えシステム全体での保守的設計   SPOF(単一障害点)の排除   障害からの復復旧(対応品質)を重視する

  EC2における故障のための設計   AMIを常にとっておく   EBSスナップショットでバックアップ   複数アベイラビリティゾーンへの分散   ELBでサーバを冗長化Auto Scalingで自動復復帰   Reserved Instanceでキャパシティ保障

  他の冗長性高いサービスとの組み合わせ   S3 SimpleDB RDS他

httpwwwslidesharenetkentamagawaaws-‐‑‒7991623

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

54

定期的なバックアップ

  EC2のAMIを定期的に作成する   (参考) 無停止でAMI取得

Cloudpackさんブログhttpblogcloudpackjp201103aws-‐‑‒news-‐‑‒ec2-‐‑‒instance-‐‑‒no-‐‑‒reboot-‐‑‒amihtml

  データボリュームとしてのEBSの場合EBSのスナップショットを定期的に作成

  スクリプトを書いて定期的なバックアップを行行うことも可能 Coderockさんブログ

httpblogdateofrockcom201003auto-‐‑‒backup-‐‑‒amazon-‐‑‒ebs-‐‑‒with-‐‑‒rubyhtml   サーバーワークスさんブログ

httpblogserverworkscojptech20110721awssdk-‐‑‒for-‐‑‒ruby-‐‑‒create-‐‑‒snapshot

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

55

Instance StorageにSSDを積んだインスタンスが増えてきた

  EC2のタイプによって選択できるInstance Storeは以下の通り

Instance Type Instance Store Volumesm1small 1 x 160 GBdaggerm1medium 1 x 410 GBm1large 2 x 420 GB (840 GB)m1xlarge 4 x 420 GB (1680 GB)m2xlarge 1 x 420 GBm22xlarge 1 x 850 GBm24xlarge 2 x 840 GB (1680 GB)m3medium 1 x 4 GB SSDm3large 1 x 32 GB SSDm3xlarge 2 x 40 GB SSD (80 GB)m32xlarge 2 x 80 GB SSD (160 GB)

t1micro None (use Amazon EBS volumes)

c1medium 1 x 350 GBdaggerc1xlarge 4 x 420 GB (1680 GB)

Instance Type Instance Store Volumes

c3large 2 x 16 GB SSD (32 GB)c3xlarge 2 x 40 GB SSD (80 GB)c32xlarge 2 x 80 GB SSD (160 GB)c34xlarge 2 x 160 GB SSD (320 GB)c38xlarge 2 x 320 GB SSD (640 GB)cc28xlarge 4 x 840 GB (3360 GB)cg14xlarge 2 x 840 GB (1680 GB)cr18xlarge 2 x 120 GB SSD (240 GB)hi14xlarge 2 x 1024 GB SSD (2048 GB)hs18xlarge 24 x 2048 GB (49 TB)i2xlarge 1 x 800 GB SSDi22xlarge 2 x 800 GB SSD (1600 GB)i24xlarge 4 x 800 GB SSD (3200 GB)i28xlarge 8 x 800 GB SSD (6400 GB)

2014年年1月29日時点

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

56

Instance Storageを使うべきなのは

 高IOPS高帯域なストレージが必要な場合

 消えても良良い一次データの置き場として使う場合

 ストレージ冗長化を準備できる場合

S3活かしたいメリット

考慮すべき制約

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

57

EC2へのファイル転送は

  SCPを使う scp pk-‐‑‒XXXpem rootec2-‐‑‒XXXamazonawscomxxx

  Windowsの場合はWinSCPなど   S3経由で共有する

  S3にアップロードしEC2からwgetでアクセスする   FTPを立立ち上げる

  EC2側でFTPサーバーを立立ち上げておく

  高速に送信したい   Tsunami UDP Aspera等のソリューション

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

58

VM Import Export

  複数プラットフォームのVMイメージをAmazon EC2に移行行(インポートエクスポート)可能

httpawstypepadcomaws_japan201012vm-‐‑‒import-‐‑‒bring-‐‑‒your-‐‑‒vmware-‐‑‒images-‐‑‒to-‐‑‒the-‐‑‒cloudhtml

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

59

稼働EC2インスタンスからメタデータ取得

  ami-‐‑‒id   ami-‐‑‒launch-‐‑‒index   ami-‐‑‒manifest-‐‑‒path   block-‐‑‒device-‐‑‒mapping   hostname   instance-‐‑‒action   instance-‐‑‒id   Instance-‐‑‒type   kernel-‐‑‒id

  local-‐‑‒hostname   local-‐‑‒ipv4   mac   network   placement   profile   public-‐‑‒hostname   public-‐‑‒ipv4   public-‐‑‒keys   reservation-‐‑‒id

curl http169254169254latestmeta-‐‑‒data

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

60

起動時にパラメーターを渡す   起動時に16KB以内で任意のものを渡せる

  ChefやPuppetなどを利利用して自己構成できるAMIに   参照emsp AWSマイスターemsp CloudFormation資料料httpwwwslidesharenetkentamagawacloudformation-‐‑‒aws5

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

61

EC2コマンドラインツール amp AWS SDKs

  コマンドラインからEC2のAPIにアクセスできるツール   ツールをインストールしセキュリティ証明書を配置

  AWS SDKs httpawsamazoncomcode

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

62

マネージメントコンソールだけでなくAPIからプログラマブルにアクセス

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1a --instance-type m1small

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1b --instance-type m1small

Tokyo リージョン

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

63

EC2のスケジュールイベント表示機能

  EC2インスタンスが稼働しているハードかソフトにメンテナンスが必要な場合に情報を提供する仕組み

  インスタンスリブートシステムリブートリタイヤ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

64

EC2のステータスチェック機能

  下記の2種類のチェックを自動テストで実行行し情報を提示   システムステータスチェック

  EC2インスタンスにネットワークパケットが通るかチェック   インスタンスステータスチェック

  EC2インスタンスのOSがネットワークパケットを受け取るかチェック

  もし状況に乖離離がある場合はレポートできます

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

65

AWS制限増加申請

  EC2を誤って大量量に作成しないよう最大インスタンス数の上限を20に制限しています

  制限増加申請フォームで各種制限の増加を行行えますbull  httpawsamazoncomjpcontact-‐‑‒usemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

66

既存EBSボリュームのサイズ変更更

  例例 10GB -‐‑‒gt 100GB変更更への流流れ   EBSをデタッチする   EBSからS3にスナップショットを作成する

  新たなボリュームサイズを指定してEBSを作成する

  EBSをアタッチする   マウントしてリサイズする

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

スナップショット

EBS (10GB)

EBS (100GB)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

67

EBSとS3

EBSは複数EC2にアタッチ不不可   単独のEC2インスタンスへのブロックデバイスとしての使い方

  NFSのような使い方をする際はEC2にミドルウェアを導入(GlusterFS等)

S3は複数のEC2からアクセス可   ただしWrite Once Read A Lotな使い方に向いている

  アップロード並列列化も使える   耐久性の設計は99999999999で非常に高い

Copyright copy 2011 Amazon Web Services

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

バケット

EBS

EC2インスタンス

HTTPHTTPS

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

68

EIP使用時の注意点

  グローバルIP(EIP)を用いた場合インターネット経由のアクセスとなり課金発生するケースがある

  名前解決したいサーバに固定IPを付与する13   各サーバは固定グローバルIPを元に

AWSのDNSに名前を問い合わせ13   問い合わせた結果返ってくる外部DNS名でサーバにアクセスを行う13   EC2内部で外部DNS名を使ってアクセスすると プライベートIPアドレスに変換されるため 目的のサーバにプライベートIPでアクセスできる13

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

69

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

70

AWSの課金金の仕組みインターネット

ELB

EC2

EBS

S3

データ転送量量

ELB利利用料料データ処理理量量

インスタンスタイプ別利利用料料

EBSの利利用料料

S3の利利用料料

大半を占める

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

71

Simple Monthly Calculator

  Web上にある計算機を使って概算費用を計算できますsect  httpcalculators3amazonawscomcalc5htmllng=ja_JP

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

72

複数の価格モデル

 課金金モデルが選べるsect 通常の時間課金金のオンデマンドインスタンス

sect ある程度度継続してEC2を使う(1年年3年年)EC2リザーブドインスタンス

sect 入札を利利用してより安く使うEC2スポットインスタンス

rarrマイスターシリーズ RIampスポットインスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

73

AWS無料料試用枠

  AWSでは無料料試用枠を用意していますbull  httpawsamazoncomjpfreeemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

74

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

75

Appendix

  参考資料料bull  Amazon Glacier Developer Guidehttpdocsamazonwebservicescomamazonglacierlatestdevintroductionhtml

bull  Amazon Glacier FAQhttpawsamazoncomjpglacierfaqs

bull  Amazon Glaceir価格httpawsamazoncomjpglacierpricing

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

76

QampA

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 29: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

29

AMIの取得AMIからの起動

Copyright copy 2011 Amazon Web Services

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

30

EC2インスタンスのライフサイクル   起動したインスタンスは3つの状態を持つ

bull  Running 実行行中課金金されるbull  Stopped 停止中課金金されないbull  Terminated 終了了StopStartはできない

Running

Terminated

Stopped

StartStop

Terminate

launch

Terminate

Amazon Machine Image (AMI)

Amazon EC2インスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

31

EC2インスタンスの停止と終了了

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

32

EC2インスタンスのタイプ変更Stop(停止)しているといつでもタイプ(スペック)を変更更できる

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

33

EBSボリュームのアタッチ

Copyright copy 2011 Amazon Web Services

EC2インスタンスと同じゾーンに作ることを注意 スナップショットから複製も可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

34

EC2インスタンスのアドレス

  全てのインスタンスが下記を持つsect  Private IPアドレス(VPC内のサブネットから割り当てる)sect  Private DNS名(internal)sect  Public DNS名 (amazonawscom)

  public IPアドレスをオプションで付けられる   固定されたPublic IP Addresses はEIPと呼ぶ

sect  稼働しているEC2インスタンスに瞬時に付け外しが可能sect  インスタンスにアサインしているときは料料金金はかからない

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

35

EIPの割り当て

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

36

EIPの使いどころ

  通常のケースはEIPは必要なくEC2のPublic DNS名を用いてCNAMEで名前変換を行行う

  Route 53(名前解決サービス)でPublic DNSを用いる

  固定IPアドレスが必要なときに限りEIPを用いる   メールサーバー監視サーバー等

  メールサーバの送信制限解除逆引き申請が必要な場合は下記から申請を行行うhttpsaws-‐‑‒portalamazoncomgpawshtml-‐‑‒forms-‐‑‒controllercontactusec2-‐‑‒email-‐‑‒limit-‐‑‒rdns-‐‑‒request

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

37

リージョン間コピー(AMIEBS)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

38

Amazon EC2の関連サービス関連情報   監視負荷分散自動スケール

rarrCloudWatchELBAutoScaling   閉域網での利利用仮想ネットワーキング

rarrAmazon VPC (Virtual Private Cloud)   ① 社内ネットワークからVPN接続   ② ルーティングイントラIPアドレス仮想NIC等々

  占有サーバ rarrAmazon Dedicated Instance   専用線接続 rarrAmazon Direct Connect   Windowsemsp emsp  rarrWindowsインスタンス   スパコンrarrHPCインスタンス   アクセス管理理emsp  rarrIAM (Identity and Access Management)   料料金金関係emsp  rarrConsolidated Billing資料料集emsp httpawsamazoncomjpaws-‐‑‒meister

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

39

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

40

AWSのセキュリティの考え方

第三者認証

SOC 1SSAE 16ISAE 3402 ISO 27001 PCI DSS HIPAA ITAR

FISMA Moderate FIPS 140-2 ファシリティ

DC電源ネットワーク冗長化

Your Apps

Webサイトアプリケーションこれまでと同様のセキュリティを

お客様SI様で実現可能

インフラよりハイレベルの

セキュリティをAWSが提供

シェアードレスポンシビリティモデル(責任共有モデル)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

41

EC2の責任共有モデル

物理インタフェース

ファイアウォール

      ハイバーバイザー

Sm

all

Larg

e

hellip

Sm

all Amazon EC2

インスタンス

物理ホスト

ユーザーが 責任を持って 管理する

AWSが 責任を持って 管理する

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

42

ファイアウォールを実現するSecurity Group

  インスタンスのINOUTトラフィックを制限するファイアウォール機能

  デフォルトIN向けは全トラフィック閉

  必要な受信アクセスに対してアクセスルールを定義する

bull  プロトコル( TCPUDP)bull  宛先ポートbull  アクセス元IP Security Group

  ルールをひとまとめにしたテンプレートを Security Groupと呼ぶ

EC2 インスタンス

ポート22(SSH)

ポート80(HTTP)

EC2ファイアウォール

Security Group

ポート25(SMTP)

ポート22(SSH)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

43

Security Groupの使い方   インスタンスの用途に応じたSecurity Groupを用意する

bull  Webサーバ用DBサーバ用メールサーバ用等   アクセス元にSecurity Groupも設定して限定可能

Webサーバ

Webサーバ

DBサーバ

sg-1234

22 00000 80 00000 25 sg-1234

sg-1234

sg-1234

sg-abcd sg-abcd

22 00000 3306 sg-1234

Webサーバ

sg-xyz

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

44

セキュリティ証明書

仮想サーバ(Amazon EC2)Windows( スタンダード)

コマンドライン SDK利利用

SSH公開鍵認証

仮想デスクトップ

ターミナル

REST SOAPAPI

Webコンソール

①EC2インスタンスへのアクセスrarr鍵認証

②Webコンソールへのアクセス

rarrパスワード認証 多要素認証 IAM

③APIへのアクセスrarrアクセスキー X509証明書 IAM

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

45

Key Pair(キーペア)を用いた鍵認証   鍵認証はユーザ名パスワードの認証よりも安全な認証方式

ダウンロードされた秘密鍵

①キーペア作成

②インスタンス起動時にemsp emsp emsp 公開鍵をコピー

公開鍵

③公開鍵秘密鍵のペアが合致するとログイン可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

46

EC2のSLA13

sect  EC2の可用性が9995 sect 上記に満たない場合はServiceクレジットを返還する

sect 詳細は sect  httpawsamazoncomec2-sla

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

47

AWSセキュリティセンター 13

 日本語のホワイトペーパー bull  セキュリティ概要 bull  リスクとコンプライアンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

48

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

49

最近追加された機能

  VM Import for Linux   IAM EC2 Resource Permissions   リザーブドインスタンスの変更更可能に   SR-‐‑‒IOVネットワークDriverネットワーク性能向上

bull  C3 I2 R3インスタンスで対応

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

50

インスタンスのさらなる追加

  一般的な目的なら M3   Compute Optimizedなら C3   Memory Optimizedなら R3(もうすぐ)   GPUが必要なら G2   IOPS重視なら I2   Disk Based Storage ならHS1

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

51

Intel Processor Features

  m3 c3 cc2 g2 cr1 i2 r3の全てが対応

  AES New Instructions (AES-‐‑‒NI)bull  c1 cg1 m2でも対応

  Advanced Vector Extensions (Intel AVX)bull  HVMでのみ対応

  Turbo Boost Technology

  詳細は httpawsamazoncomec2instance-‐‑‒types

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

52

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

53

故障のための設計 Design for Failure   故障に備えた設計をしておく

  すべてが故障しうると考えシステム全体での保守的設計   SPOF(単一障害点)の排除   障害からの復復旧(対応品質)を重視する

  EC2における故障のための設計   AMIを常にとっておく   EBSスナップショットでバックアップ   複数アベイラビリティゾーンへの分散   ELBでサーバを冗長化Auto Scalingで自動復復帰   Reserved Instanceでキャパシティ保障

  他の冗長性高いサービスとの組み合わせ   S3 SimpleDB RDS他

httpwwwslidesharenetkentamagawaaws-‐‑‒7991623

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

54

定期的なバックアップ

  EC2のAMIを定期的に作成する   (参考) 無停止でAMI取得

Cloudpackさんブログhttpblogcloudpackjp201103aws-‐‑‒news-‐‑‒ec2-‐‑‒instance-‐‑‒no-‐‑‒reboot-‐‑‒amihtml

  データボリュームとしてのEBSの場合EBSのスナップショットを定期的に作成

  スクリプトを書いて定期的なバックアップを行行うことも可能 Coderockさんブログ

httpblogdateofrockcom201003auto-‐‑‒backup-‐‑‒amazon-‐‑‒ebs-‐‑‒with-‐‑‒rubyhtml   サーバーワークスさんブログ

httpblogserverworkscojptech20110721awssdk-‐‑‒for-‐‑‒ruby-‐‑‒create-‐‑‒snapshot

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

55

Instance StorageにSSDを積んだインスタンスが増えてきた

  EC2のタイプによって選択できるInstance Storeは以下の通り

Instance Type Instance Store Volumesm1small 1 x 160 GBdaggerm1medium 1 x 410 GBm1large 2 x 420 GB (840 GB)m1xlarge 4 x 420 GB (1680 GB)m2xlarge 1 x 420 GBm22xlarge 1 x 850 GBm24xlarge 2 x 840 GB (1680 GB)m3medium 1 x 4 GB SSDm3large 1 x 32 GB SSDm3xlarge 2 x 40 GB SSD (80 GB)m32xlarge 2 x 80 GB SSD (160 GB)

t1micro None (use Amazon EBS volumes)

c1medium 1 x 350 GBdaggerc1xlarge 4 x 420 GB (1680 GB)

Instance Type Instance Store Volumes

c3large 2 x 16 GB SSD (32 GB)c3xlarge 2 x 40 GB SSD (80 GB)c32xlarge 2 x 80 GB SSD (160 GB)c34xlarge 2 x 160 GB SSD (320 GB)c38xlarge 2 x 320 GB SSD (640 GB)cc28xlarge 4 x 840 GB (3360 GB)cg14xlarge 2 x 840 GB (1680 GB)cr18xlarge 2 x 120 GB SSD (240 GB)hi14xlarge 2 x 1024 GB SSD (2048 GB)hs18xlarge 24 x 2048 GB (49 TB)i2xlarge 1 x 800 GB SSDi22xlarge 2 x 800 GB SSD (1600 GB)i24xlarge 4 x 800 GB SSD (3200 GB)i28xlarge 8 x 800 GB SSD (6400 GB)

2014年年1月29日時点

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

56

Instance Storageを使うべきなのは

 高IOPS高帯域なストレージが必要な場合

 消えても良良い一次データの置き場として使う場合

 ストレージ冗長化を準備できる場合

S3活かしたいメリット

考慮すべき制約

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

57

EC2へのファイル転送は

  SCPを使う scp pk-‐‑‒XXXpem rootec2-‐‑‒XXXamazonawscomxxx

  Windowsの場合はWinSCPなど   S3経由で共有する

  S3にアップロードしEC2からwgetでアクセスする   FTPを立立ち上げる

  EC2側でFTPサーバーを立立ち上げておく

  高速に送信したい   Tsunami UDP Aspera等のソリューション

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

58

VM Import Export

  複数プラットフォームのVMイメージをAmazon EC2に移行行(インポートエクスポート)可能

httpawstypepadcomaws_japan201012vm-‐‑‒import-‐‑‒bring-‐‑‒your-‐‑‒vmware-‐‑‒images-‐‑‒to-‐‑‒the-‐‑‒cloudhtml

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

59

稼働EC2インスタンスからメタデータ取得

  ami-‐‑‒id   ami-‐‑‒launch-‐‑‒index   ami-‐‑‒manifest-‐‑‒path   block-‐‑‒device-‐‑‒mapping   hostname   instance-‐‑‒action   instance-‐‑‒id   Instance-‐‑‒type   kernel-‐‑‒id

  local-‐‑‒hostname   local-‐‑‒ipv4   mac   network   placement   profile   public-‐‑‒hostname   public-‐‑‒ipv4   public-‐‑‒keys   reservation-‐‑‒id

curl http169254169254latestmeta-‐‑‒data

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

60

起動時にパラメーターを渡す   起動時に16KB以内で任意のものを渡せる

  ChefやPuppetなどを利利用して自己構成できるAMIに   参照emsp AWSマイスターemsp CloudFormation資料料httpwwwslidesharenetkentamagawacloudformation-‐‑‒aws5

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

61

EC2コマンドラインツール amp AWS SDKs

  コマンドラインからEC2のAPIにアクセスできるツール   ツールをインストールしセキュリティ証明書を配置

  AWS SDKs httpawsamazoncomcode

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

62

マネージメントコンソールだけでなくAPIからプログラマブルにアクセス

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1a --instance-type m1small

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1b --instance-type m1small

Tokyo リージョン

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

63

EC2のスケジュールイベント表示機能

  EC2インスタンスが稼働しているハードかソフトにメンテナンスが必要な場合に情報を提供する仕組み

  インスタンスリブートシステムリブートリタイヤ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

64

EC2のステータスチェック機能

  下記の2種類のチェックを自動テストで実行行し情報を提示   システムステータスチェック

  EC2インスタンスにネットワークパケットが通るかチェック   インスタンスステータスチェック

  EC2インスタンスのOSがネットワークパケットを受け取るかチェック

  もし状況に乖離離がある場合はレポートできます

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

65

AWS制限増加申請

  EC2を誤って大量量に作成しないよう最大インスタンス数の上限を20に制限しています

  制限増加申請フォームで各種制限の増加を行行えますbull  httpawsamazoncomjpcontact-‐‑‒usemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

66

既存EBSボリュームのサイズ変更更

  例例 10GB -‐‑‒gt 100GB変更更への流流れ   EBSをデタッチする   EBSからS3にスナップショットを作成する

  新たなボリュームサイズを指定してEBSを作成する

  EBSをアタッチする   マウントしてリサイズする

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

スナップショット

EBS (10GB)

EBS (100GB)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

67

EBSとS3

EBSは複数EC2にアタッチ不不可   単独のEC2インスタンスへのブロックデバイスとしての使い方

  NFSのような使い方をする際はEC2にミドルウェアを導入(GlusterFS等)

S3は複数のEC2からアクセス可   ただしWrite Once Read A Lotな使い方に向いている

  アップロード並列列化も使える   耐久性の設計は99999999999で非常に高い

Copyright copy 2011 Amazon Web Services

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

バケット

EBS

EC2インスタンス

HTTPHTTPS

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

68

EIP使用時の注意点

  グローバルIP(EIP)を用いた場合インターネット経由のアクセスとなり課金発生するケースがある

  名前解決したいサーバに固定IPを付与する13   各サーバは固定グローバルIPを元に

AWSのDNSに名前を問い合わせ13   問い合わせた結果返ってくる外部DNS名でサーバにアクセスを行う13   EC2内部で外部DNS名を使ってアクセスすると プライベートIPアドレスに変換されるため 目的のサーバにプライベートIPでアクセスできる13

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

69

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

70

AWSの課金金の仕組みインターネット

ELB

EC2

EBS

S3

データ転送量量

ELB利利用料料データ処理理量量

インスタンスタイプ別利利用料料

EBSの利利用料料

S3の利利用料料

大半を占める

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

71

Simple Monthly Calculator

  Web上にある計算機を使って概算費用を計算できますsect  httpcalculators3amazonawscomcalc5htmllng=ja_JP

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

72

複数の価格モデル

 課金金モデルが選べるsect 通常の時間課金金のオンデマンドインスタンス

sect ある程度度継続してEC2を使う(1年年3年年)EC2リザーブドインスタンス

sect 入札を利利用してより安く使うEC2スポットインスタンス

rarrマイスターシリーズ RIampスポットインスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

73

AWS無料料試用枠

  AWSでは無料料試用枠を用意していますbull  httpawsamazoncomjpfreeemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

74

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

75

Appendix

  参考資料料bull  Amazon Glacier Developer Guidehttpdocsamazonwebservicescomamazonglacierlatestdevintroductionhtml

bull  Amazon Glacier FAQhttpawsamazoncomjpglacierfaqs

bull  Amazon Glaceir価格httpawsamazoncomjpglacierpricing

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

76

QampA

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 30: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

30

EC2インスタンスのライフサイクル   起動したインスタンスは3つの状態を持つ

bull  Running 実行行中課金金されるbull  Stopped 停止中課金金されないbull  Terminated 終了了StopStartはできない

Running

Terminated

Stopped

StartStop

Terminate

launch

Terminate

Amazon Machine Image (AMI)

Amazon EC2インスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

31

EC2インスタンスの停止と終了了

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

32

EC2インスタンスのタイプ変更Stop(停止)しているといつでもタイプ(スペック)を変更更できる

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

33

EBSボリュームのアタッチ

Copyright copy 2011 Amazon Web Services

EC2インスタンスと同じゾーンに作ることを注意 スナップショットから複製も可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

34

EC2インスタンスのアドレス

  全てのインスタンスが下記を持つsect  Private IPアドレス(VPC内のサブネットから割り当てる)sect  Private DNS名(internal)sect  Public DNS名 (amazonawscom)

  public IPアドレスをオプションで付けられる   固定されたPublic IP Addresses はEIPと呼ぶ

sect  稼働しているEC2インスタンスに瞬時に付け外しが可能sect  インスタンスにアサインしているときは料料金金はかからない

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

35

EIPの割り当て

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

36

EIPの使いどころ

  通常のケースはEIPは必要なくEC2のPublic DNS名を用いてCNAMEで名前変換を行行う

  Route 53(名前解決サービス)でPublic DNSを用いる

  固定IPアドレスが必要なときに限りEIPを用いる   メールサーバー監視サーバー等

  メールサーバの送信制限解除逆引き申請が必要な場合は下記から申請を行行うhttpsaws-‐‑‒portalamazoncomgpawshtml-‐‑‒forms-‐‑‒controllercontactusec2-‐‑‒email-‐‑‒limit-‐‑‒rdns-‐‑‒request

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

37

リージョン間コピー(AMIEBS)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

38

Amazon EC2の関連サービス関連情報   監視負荷分散自動スケール

rarrCloudWatchELBAutoScaling   閉域網での利利用仮想ネットワーキング

rarrAmazon VPC (Virtual Private Cloud)   ① 社内ネットワークからVPN接続   ② ルーティングイントラIPアドレス仮想NIC等々

  占有サーバ rarrAmazon Dedicated Instance   専用線接続 rarrAmazon Direct Connect   Windowsemsp emsp  rarrWindowsインスタンス   スパコンrarrHPCインスタンス   アクセス管理理emsp  rarrIAM (Identity and Access Management)   料料金金関係emsp  rarrConsolidated Billing資料料集emsp httpawsamazoncomjpaws-‐‑‒meister

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

39

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

40

AWSのセキュリティの考え方

第三者認証

SOC 1SSAE 16ISAE 3402 ISO 27001 PCI DSS HIPAA ITAR

FISMA Moderate FIPS 140-2 ファシリティ

DC電源ネットワーク冗長化

Your Apps

Webサイトアプリケーションこれまでと同様のセキュリティを

お客様SI様で実現可能

インフラよりハイレベルの

セキュリティをAWSが提供

シェアードレスポンシビリティモデル(責任共有モデル)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

41

EC2の責任共有モデル

物理インタフェース

ファイアウォール

      ハイバーバイザー

Sm

all

Larg

e

hellip

Sm

all Amazon EC2

インスタンス

物理ホスト

ユーザーが 責任を持って 管理する

AWSが 責任を持って 管理する

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

42

ファイアウォールを実現するSecurity Group

  インスタンスのINOUTトラフィックを制限するファイアウォール機能

  デフォルトIN向けは全トラフィック閉

  必要な受信アクセスに対してアクセスルールを定義する

bull  プロトコル( TCPUDP)bull  宛先ポートbull  アクセス元IP Security Group

  ルールをひとまとめにしたテンプレートを Security Groupと呼ぶ

EC2 インスタンス

ポート22(SSH)

ポート80(HTTP)

EC2ファイアウォール

Security Group

ポート25(SMTP)

ポート22(SSH)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

43

Security Groupの使い方   インスタンスの用途に応じたSecurity Groupを用意する

bull  Webサーバ用DBサーバ用メールサーバ用等   アクセス元にSecurity Groupも設定して限定可能

Webサーバ

Webサーバ

DBサーバ

sg-1234

22 00000 80 00000 25 sg-1234

sg-1234

sg-1234

sg-abcd sg-abcd

22 00000 3306 sg-1234

Webサーバ

sg-xyz

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

44

セキュリティ証明書

仮想サーバ(Amazon EC2)Windows( スタンダード)

コマンドライン SDK利利用

SSH公開鍵認証

仮想デスクトップ

ターミナル

REST SOAPAPI

Webコンソール

①EC2インスタンスへのアクセスrarr鍵認証

②Webコンソールへのアクセス

rarrパスワード認証 多要素認証 IAM

③APIへのアクセスrarrアクセスキー X509証明書 IAM

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

45

Key Pair(キーペア)を用いた鍵認証   鍵認証はユーザ名パスワードの認証よりも安全な認証方式

ダウンロードされた秘密鍵

①キーペア作成

②インスタンス起動時にemsp emsp emsp 公開鍵をコピー

公開鍵

③公開鍵秘密鍵のペアが合致するとログイン可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

46

EC2のSLA13

sect  EC2の可用性が9995 sect 上記に満たない場合はServiceクレジットを返還する

sect 詳細は sect  httpawsamazoncomec2-sla

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

47

AWSセキュリティセンター 13

 日本語のホワイトペーパー bull  セキュリティ概要 bull  リスクとコンプライアンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

48

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

49

最近追加された機能

  VM Import for Linux   IAM EC2 Resource Permissions   リザーブドインスタンスの変更更可能に   SR-‐‑‒IOVネットワークDriverネットワーク性能向上

bull  C3 I2 R3インスタンスで対応

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

50

インスタンスのさらなる追加

  一般的な目的なら M3   Compute Optimizedなら C3   Memory Optimizedなら R3(もうすぐ)   GPUが必要なら G2   IOPS重視なら I2   Disk Based Storage ならHS1

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

51

Intel Processor Features

  m3 c3 cc2 g2 cr1 i2 r3の全てが対応

  AES New Instructions (AES-‐‑‒NI)bull  c1 cg1 m2でも対応

  Advanced Vector Extensions (Intel AVX)bull  HVMでのみ対応

  Turbo Boost Technology

  詳細は httpawsamazoncomec2instance-‐‑‒types

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

52

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

53

故障のための設計 Design for Failure   故障に備えた設計をしておく

  すべてが故障しうると考えシステム全体での保守的設計   SPOF(単一障害点)の排除   障害からの復復旧(対応品質)を重視する

  EC2における故障のための設計   AMIを常にとっておく   EBSスナップショットでバックアップ   複数アベイラビリティゾーンへの分散   ELBでサーバを冗長化Auto Scalingで自動復復帰   Reserved Instanceでキャパシティ保障

  他の冗長性高いサービスとの組み合わせ   S3 SimpleDB RDS他

httpwwwslidesharenetkentamagawaaws-‐‑‒7991623

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

54

定期的なバックアップ

  EC2のAMIを定期的に作成する   (参考) 無停止でAMI取得

Cloudpackさんブログhttpblogcloudpackjp201103aws-‐‑‒news-‐‑‒ec2-‐‑‒instance-‐‑‒no-‐‑‒reboot-‐‑‒amihtml

  データボリュームとしてのEBSの場合EBSのスナップショットを定期的に作成

  スクリプトを書いて定期的なバックアップを行行うことも可能 Coderockさんブログ

httpblogdateofrockcom201003auto-‐‑‒backup-‐‑‒amazon-‐‑‒ebs-‐‑‒with-‐‑‒rubyhtml   サーバーワークスさんブログ

httpblogserverworkscojptech20110721awssdk-‐‑‒for-‐‑‒ruby-‐‑‒create-‐‑‒snapshot

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

55

Instance StorageにSSDを積んだインスタンスが増えてきた

  EC2のタイプによって選択できるInstance Storeは以下の通り

Instance Type Instance Store Volumesm1small 1 x 160 GBdaggerm1medium 1 x 410 GBm1large 2 x 420 GB (840 GB)m1xlarge 4 x 420 GB (1680 GB)m2xlarge 1 x 420 GBm22xlarge 1 x 850 GBm24xlarge 2 x 840 GB (1680 GB)m3medium 1 x 4 GB SSDm3large 1 x 32 GB SSDm3xlarge 2 x 40 GB SSD (80 GB)m32xlarge 2 x 80 GB SSD (160 GB)

t1micro None (use Amazon EBS volumes)

c1medium 1 x 350 GBdaggerc1xlarge 4 x 420 GB (1680 GB)

Instance Type Instance Store Volumes

c3large 2 x 16 GB SSD (32 GB)c3xlarge 2 x 40 GB SSD (80 GB)c32xlarge 2 x 80 GB SSD (160 GB)c34xlarge 2 x 160 GB SSD (320 GB)c38xlarge 2 x 320 GB SSD (640 GB)cc28xlarge 4 x 840 GB (3360 GB)cg14xlarge 2 x 840 GB (1680 GB)cr18xlarge 2 x 120 GB SSD (240 GB)hi14xlarge 2 x 1024 GB SSD (2048 GB)hs18xlarge 24 x 2048 GB (49 TB)i2xlarge 1 x 800 GB SSDi22xlarge 2 x 800 GB SSD (1600 GB)i24xlarge 4 x 800 GB SSD (3200 GB)i28xlarge 8 x 800 GB SSD (6400 GB)

2014年年1月29日時点

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

56

Instance Storageを使うべきなのは

 高IOPS高帯域なストレージが必要な場合

 消えても良良い一次データの置き場として使う場合

 ストレージ冗長化を準備できる場合

S3活かしたいメリット

考慮すべき制約

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

57

EC2へのファイル転送は

  SCPを使う scp pk-‐‑‒XXXpem rootec2-‐‑‒XXXamazonawscomxxx

  Windowsの場合はWinSCPなど   S3経由で共有する

  S3にアップロードしEC2からwgetでアクセスする   FTPを立立ち上げる

  EC2側でFTPサーバーを立立ち上げておく

  高速に送信したい   Tsunami UDP Aspera等のソリューション

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

58

VM Import Export

  複数プラットフォームのVMイメージをAmazon EC2に移行行(インポートエクスポート)可能

httpawstypepadcomaws_japan201012vm-‐‑‒import-‐‑‒bring-‐‑‒your-‐‑‒vmware-‐‑‒images-‐‑‒to-‐‑‒the-‐‑‒cloudhtml

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

59

稼働EC2インスタンスからメタデータ取得

  ami-‐‑‒id   ami-‐‑‒launch-‐‑‒index   ami-‐‑‒manifest-‐‑‒path   block-‐‑‒device-‐‑‒mapping   hostname   instance-‐‑‒action   instance-‐‑‒id   Instance-‐‑‒type   kernel-‐‑‒id

  local-‐‑‒hostname   local-‐‑‒ipv4   mac   network   placement   profile   public-‐‑‒hostname   public-‐‑‒ipv4   public-‐‑‒keys   reservation-‐‑‒id

curl http169254169254latestmeta-‐‑‒data

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

60

起動時にパラメーターを渡す   起動時に16KB以内で任意のものを渡せる

  ChefやPuppetなどを利利用して自己構成できるAMIに   参照emsp AWSマイスターemsp CloudFormation資料料httpwwwslidesharenetkentamagawacloudformation-‐‑‒aws5

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

61

EC2コマンドラインツール amp AWS SDKs

  コマンドラインからEC2のAPIにアクセスできるツール   ツールをインストールしセキュリティ証明書を配置

  AWS SDKs httpawsamazoncomcode

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

62

マネージメントコンソールだけでなくAPIからプログラマブルにアクセス

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1a --instance-type m1small

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1b --instance-type m1small

Tokyo リージョン

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

63

EC2のスケジュールイベント表示機能

  EC2インスタンスが稼働しているハードかソフトにメンテナンスが必要な場合に情報を提供する仕組み

  インスタンスリブートシステムリブートリタイヤ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

64

EC2のステータスチェック機能

  下記の2種類のチェックを自動テストで実行行し情報を提示   システムステータスチェック

  EC2インスタンスにネットワークパケットが通るかチェック   インスタンスステータスチェック

  EC2インスタンスのOSがネットワークパケットを受け取るかチェック

  もし状況に乖離離がある場合はレポートできます

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

65

AWS制限増加申請

  EC2を誤って大量量に作成しないよう最大インスタンス数の上限を20に制限しています

  制限増加申請フォームで各種制限の増加を行行えますbull  httpawsamazoncomjpcontact-‐‑‒usemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

66

既存EBSボリュームのサイズ変更更

  例例 10GB -‐‑‒gt 100GB変更更への流流れ   EBSをデタッチする   EBSからS3にスナップショットを作成する

  新たなボリュームサイズを指定してEBSを作成する

  EBSをアタッチする   マウントしてリサイズする

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

スナップショット

EBS (10GB)

EBS (100GB)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

67

EBSとS3

EBSは複数EC2にアタッチ不不可   単独のEC2インスタンスへのブロックデバイスとしての使い方

  NFSのような使い方をする際はEC2にミドルウェアを導入(GlusterFS等)

S3は複数のEC2からアクセス可   ただしWrite Once Read A Lotな使い方に向いている

  アップロード並列列化も使える   耐久性の設計は99999999999で非常に高い

Copyright copy 2011 Amazon Web Services

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

バケット

EBS

EC2インスタンス

HTTPHTTPS

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

68

EIP使用時の注意点

  グローバルIP(EIP)を用いた場合インターネット経由のアクセスとなり課金発生するケースがある

  名前解決したいサーバに固定IPを付与する13   各サーバは固定グローバルIPを元に

AWSのDNSに名前を問い合わせ13   問い合わせた結果返ってくる外部DNS名でサーバにアクセスを行う13   EC2内部で外部DNS名を使ってアクセスすると プライベートIPアドレスに変換されるため 目的のサーバにプライベートIPでアクセスできる13

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

69

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

70

AWSの課金金の仕組みインターネット

ELB

EC2

EBS

S3

データ転送量量

ELB利利用料料データ処理理量量

インスタンスタイプ別利利用料料

EBSの利利用料料

S3の利利用料料

大半を占める

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

71

Simple Monthly Calculator

  Web上にある計算機を使って概算費用を計算できますsect  httpcalculators3amazonawscomcalc5htmllng=ja_JP

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

72

複数の価格モデル

 課金金モデルが選べるsect 通常の時間課金金のオンデマンドインスタンス

sect ある程度度継続してEC2を使う(1年年3年年)EC2リザーブドインスタンス

sect 入札を利利用してより安く使うEC2スポットインスタンス

rarrマイスターシリーズ RIampスポットインスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

73

AWS無料料試用枠

  AWSでは無料料試用枠を用意していますbull  httpawsamazoncomjpfreeemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

74

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

75

Appendix

  参考資料料bull  Amazon Glacier Developer Guidehttpdocsamazonwebservicescomamazonglacierlatestdevintroductionhtml

bull  Amazon Glacier FAQhttpawsamazoncomjpglacierfaqs

bull  Amazon Glaceir価格httpawsamazoncomjpglacierpricing

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

76

QampA

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 31: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

31

EC2インスタンスの停止と終了了

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

32

EC2インスタンスのタイプ変更Stop(停止)しているといつでもタイプ(スペック)を変更更できる

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

33

EBSボリュームのアタッチ

Copyright copy 2011 Amazon Web Services

EC2インスタンスと同じゾーンに作ることを注意 スナップショットから複製も可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

34

EC2インスタンスのアドレス

  全てのインスタンスが下記を持つsect  Private IPアドレス(VPC内のサブネットから割り当てる)sect  Private DNS名(internal)sect  Public DNS名 (amazonawscom)

  public IPアドレスをオプションで付けられる   固定されたPublic IP Addresses はEIPと呼ぶ

sect  稼働しているEC2インスタンスに瞬時に付け外しが可能sect  インスタンスにアサインしているときは料料金金はかからない

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

35

EIPの割り当て

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

36

EIPの使いどころ

  通常のケースはEIPは必要なくEC2のPublic DNS名を用いてCNAMEで名前変換を行行う

  Route 53(名前解決サービス)でPublic DNSを用いる

  固定IPアドレスが必要なときに限りEIPを用いる   メールサーバー監視サーバー等

  メールサーバの送信制限解除逆引き申請が必要な場合は下記から申請を行行うhttpsaws-‐‑‒portalamazoncomgpawshtml-‐‑‒forms-‐‑‒controllercontactusec2-‐‑‒email-‐‑‒limit-‐‑‒rdns-‐‑‒request

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

37

リージョン間コピー(AMIEBS)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

38

Amazon EC2の関連サービス関連情報   監視負荷分散自動スケール

rarrCloudWatchELBAutoScaling   閉域網での利利用仮想ネットワーキング

rarrAmazon VPC (Virtual Private Cloud)   ① 社内ネットワークからVPN接続   ② ルーティングイントラIPアドレス仮想NIC等々

  占有サーバ rarrAmazon Dedicated Instance   専用線接続 rarrAmazon Direct Connect   Windowsemsp emsp  rarrWindowsインスタンス   スパコンrarrHPCインスタンス   アクセス管理理emsp  rarrIAM (Identity and Access Management)   料料金金関係emsp  rarrConsolidated Billing資料料集emsp httpawsamazoncomjpaws-‐‑‒meister

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

39

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

40

AWSのセキュリティの考え方

第三者認証

SOC 1SSAE 16ISAE 3402 ISO 27001 PCI DSS HIPAA ITAR

FISMA Moderate FIPS 140-2 ファシリティ

DC電源ネットワーク冗長化

Your Apps

Webサイトアプリケーションこれまでと同様のセキュリティを

お客様SI様で実現可能

インフラよりハイレベルの

セキュリティをAWSが提供

シェアードレスポンシビリティモデル(責任共有モデル)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

41

EC2の責任共有モデル

物理インタフェース

ファイアウォール

      ハイバーバイザー

Sm

all

Larg

e

hellip

Sm

all Amazon EC2

インスタンス

物理ホスト

ユーザーが 責任を持って 管理する

AWSが 責任を持って 管理する

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

42

ファイアウォールを実現するSecurity Group

  インスタンスのINOUTトラフィックを制限するファイアウォール機能

  デフォルトIN向けは全トラフィック閉

  必要な受信アクセスに対してアクセスルールを定義する

bull  プロトコル( TCPUDP)bull  宛先ポートbull  アクセス元IP Security Group

  ルールをひとまとめにしたテンプレートを Security Groupと呼ぶ

EC2 インスタンス

ポート22(SSH)

ポート80(HTTP)

EC2ファイアウォール

Security Group

ポート25(SMTP)

ポート22(SSH)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

43

Security Groupの使い方   インスタンスの用途に応じたSecurity Groupを用意する

bull  Webサーバ用DBサーバ用メールサーバ用等   アクセス元にSecurity Groupも設定して限定可能

Webサーバ

Webサーバ

DBサーバ

sg-1234

22 00000 80 00000 25 sg-1234

sg-1234

sg-1234

sg-abcd sg-abcd

22 00000 3306 sg-1234

Webサーバ

sg-xyz

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

44

セキュリティ証明書

仮想サーバ(Amazon EC2)Windows( スタンダード)

コマンドライン SDK利利用

SSH公開鍵認証

仮想デスクトップ

ターミナル

REST SOAPAPI

Webコンソール

①EC2インスタンスへのアクセスrarr鍵認証

②Webコンソールへのアクセス

rarrパスワード認証 多要素認証 IAM

③APIへのアクセスrarrアクセスキー X509証明書 IAM

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

45

Key Pair(キーペア)を用いた鍵認証   鍵認証はユーザ名パスワードの認証よりも安全な認証方式

ダウンロードされた秘密鍵

①キーペア作成

②インスタンス起動時にemsp emsp emsp 公開鍵をコピー

公開鍵

③公開鍵秘密鍵のペアが合致するとログイン可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

46

EC2のSLA13

sect  EC2の可用性が9995 sect 上記に満たない場合はServiceクレジットを返還する

sect 詳細は sect  httpawsamazoncomec2-sla

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

47

AWSセキュリティセンター 13

 日本語のホワイトペーパー bull  セキュリティ概要 bull  リスクとコンプライアンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

48

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

49

最近追加された機能

  VM Import for Linux   IAM EC2 Resource Permissions   リザーブドインスタンスの変更更可能に   SR-‐‑‒IOVネットワークDriverネットワーク性能向上

bull  C3 I2 R3インスタンスで対応

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

50

インスタンスのさらなる追加

  一般的な目的なら M3   Compute Optimizedなら C3   Memory Optimizedなら R3(もうすぐ)   GPUが必要なら G2   IOPS重視なら I2   Disk Based Storage ならHS1

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

51

Intel Processor Features

  m3 c3 cc2 g2 cr1 i2 r3の全てが対応

  AES New Instructions (AES-‐‑‒NI)bull  c1 cg1 m2でも対応

  Advanced Vector Extensions (Intel AVX)bull  HVMでのみ対応

  Turbo Boost Technology

  詳細は httpawsamazoncomec2instance-‐‑‒types

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

52

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

53

故障のための設計 Design for Failure   故障に備えた設計をしておく

  すべてが故障しうると考えシステム全体での保守的設計   SPOF(単一障害点)の排除   障害からの復復旧(対応品質)を重視する

  EC2における故障のための設計   AMIを常にとっておく   EBSスナップショットでバックアップ   複数アベイラビリティゾーンへの分散   ELBでサーバを冗長化Auto Scalingで自動復復帰   Reserved Instanceでキャパシティ保障

  他の冗長性高いサービスとの組み合わせ   S3 SimpleDB RDS他

httpwwwslidesharenetkentamagawaaws-‐‑‒7991623

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

54

定期的なバックアップ

  EC2のAMIを定期的に作成する   (参考) 無停止でAMI取得

Cloudpackさんブログhttpblogcloudpackjp201103aws-‐‑‒news-‐‑‒ec2-‐‑‒instance-‐‑‒no-‐‑‒reboot-‐‑‒amihtml

  データボリュームとしてのEBSの場合EBSのスナップショットを定期的に作成

  スクリプトを書いて定期的なバックアップを行行うことも可能 Coderockさんブログ

httpblogdateofrockcom201003auto-‐‑‒backup-‐‑‒amazon-‐‑‒ebs-‐‑‒with-‐‑‒rubyhtml   サーバーワークスさんブログ

httpblogserverworkscojptech20110721awssdk-‐‑‒for-‐‑‒ruby-‐‑‒create-‐‑‒snapshot

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

55

Instance StorageにSSDを積んだインスタンスが増えてきた

  EC2のタイプによって選択できるInstance Storeは以下の通り

Instance Type Instance Store Volumesm1small 1 x 160 GBdaggerm1medium 1 x 410 GBm1large 2 x 420 GB (840 GB)m1xlarge 4 x 420 GB (1680 GB)m2xlarge 1 x 420 GBm22xlarge 1 x 850 GBm24xlarge 2 x 840 GB (1680 GB)m3medium 1 x 4 GB SSDm3large 1 x 32 GB SSDm3xlarge 2 x 40 GB SSD (80 GB)m32xlarge 2 x 80 GB SSD (160 GB)

t1micro None (use Amazon EBS volumes)

c1medium 1 x 350 GBdaggerc1xlarge 4 x 420 GB (1680 GB)

Instance Type Instance Store Volumes

c3large 2 x 16 GB SSD (32 GB)c3xlarge 2 x 40 GB SSD (80 GB)c32xlarge 2 x 80 GB SSD (160 GB)c34xlarge 2 x 160 GB SSD (320 GB)c38xlarge 2 x 320 GB SSD (640 GB)cc28xlarge 4 x 840 GB (3360 GB)cg14xlarge 2 x 840 GB (1680 GB)cr18xlarge 2 x 120 GB SSD (240 GB)hi14xlarge 2 x 1024 GB SSD (2048 GB)hs18xlarge 24 x 2048 GB (49 TB)i2xlarge 1 x 800 GB SSDi22xlarge 2 x 800 GB SSD (1600 GB)i24xlarge 4 x 800 GB SSD (3200 GB)i28xlarge 8 x 800 GB SSD (6400 GB)

2014年年1月29日時点

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

56

Instance Storageを使うべきなのは

 高IOPS高帯域なストレージが必要な場合

 消えても良良い一次データの置き場として使う場合

 ストレージ冗長化を準備できる場合

S3活かしたいメリット

考慮すべき制約

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

57

EC2へのファイル転送は

  SCPを使う scp pk-‐‑‒XXXpem rootec2-‐‑‒XXXamazonawscomxxx

  Windowsの場合はWinSCPなど   S3経由で共有する

  S3にアップロードしEC2からwgetでアクセスする   FTPを立立ち上げる

  EC2側でFTPサーバーを立立ち上げておく

  高速に送信したい   Tsunami UDP Aspera等のソリューション

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

58

VM Import Export

  複数プラットフォームのVMイメージをAmazon EC2に移行行(インポートエクスポート)可能

httpawstypepadcomaws_japan201012vm-‐‑‒import-‐‑‒bring-‐‑‒your-‐‑‒vmware-‐‑‒images-‐‑‒to-‐‑‒the-‐‑‒cloudhtml

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

59

稼働EC2インスタンスからメタデータ取得

  ami-‐‑‒id   ami-‐‑‒launch-‐‑‒index   ami-‐‑‒manifest-‐‑‒path   block-‐‑‒device-‐‑‒mapping   hostname   instance-‐‑‒action   instance-‐‑‒id   Instance-‐‑‒type   kernel-‐‑‒id

  local-‐‑‒hostname   local-‐‑‒ipv4   mac   network   placement   profile   public-‐‑‒hostname   public-‐‑‒ipv4   public-‐‑‒keys   reservation-‐‑‒id

curl http169254169254latestmeta-‐‑‒data

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

60

起動時にパラメーターを渡す   起動時に16KB以内で任意のものを渡せる

  ChefやPuppetなどを利利用して自己構成できるAMIに   参照emsp AWSマイスターemsp CloudFormation資料料httpwwwslidesharenetkentamagawacloudformation-‐‑‒aws5

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

61

EC2コマンドラインツール amp AWS SDKs

  コマンドラインからEC2のAPIにアクセスできるツール   ツールをインストールしセキュリティ証明書を配置

  AWS SDKs httpawsamazoncomcode

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

62

マネージメントコンソールだけでなくAPIからプログラマブルにアクセス

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1a --instance-type m1small

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1b --instance-type m1small

Tokyo リージョン

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

63

EC2のスケジュールイベント表示機能

  EC2インスタンスが稼働しているハードかソフトにメンテナンスが必要な場合に情報を提供する仕組み

  インスタンスリブートシステムリブートリタイヤ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

64

EC2のステータスチェック機能

  下記の2種類のチェックを自動テストで実行行し情報を提示   システムステータスチェック

  EC2インスタンスにネットワークパケットが通るかチェック   インスタンスステータスチェック

  EC2インスタンスのOSがネットワークパケットを受け取るかチェック

  もし状況に乖離離がある場合はレポートできます

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

65

AWS制限増加申請

  EC2を誤って大量量に作成しないよう最大インスタンス数の上限を20に制限しています

  制限増加申請フォームで各種制限の増加を行行えますbull  httpawsamazoncomjpcontact-‐‑‒usemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

66

既存EBSボリュームのサイズ変更更

  例例 10GB -‐‑‒gt 100GB変更更への流流れ   EBSをデタッチする   EBSからS3にスナップショットを作成する

  新たなボリュームサイズを指定してEBSを作成する

  EBSをアタッチする   マウントしてリサイズする

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

スナップショット

EBS (10GB)

EBS (100GB)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

67

EBSとS3

EBSは複数EC2にアタッチ不不可   単独のEC2インスタンスへのブロックデバイスとしての使い方

  NFSのような使い方をする際はEC2にミドルウェアを導入(GlusterFS等)

S3は複数のEC2からアクセス可   ただしWrite Once Read A Lotな使い方に向いている

  アップロード並列列化も使える   耐久性の設計は99999999999で非常に高い

Copyright copy 2011 Amazon Web Services

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

バケット

EBS

EC2インスタンス

HTTPHTTPS

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

68

EIP使用時の注意点

  グローバルIP(EIP)を用いた場合インターネット経由のアクセスとなり課金発生するケースがある

  名前解決したいサーバに固定IPを付与する13   各サーバは固定グローバルIPを元に

AWSのDNSに名前を問い合わせ13   問い合わせた結果返ってくる外部DNS名でサーバにアクセスを行う13   EC2内部で外部DNS名を使ってアクセスすると プライベートIPアドレスに変換されるため 目的のサーバにプライベートIPでアクセスできる13

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

69

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

70

AWSの課金金の仕組みインターネット

ELB

EC2

EBS

S3

データ転送量量

ELB利利用料料データ処理理量量

インスタンスタイプ別利利用料料

EBSの利利用料料

S3の利利用料料

大半を占める

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

71

Simple Monthly Calculator

  Web上にある計算機を使って概算費用を計算できますsect  httpcalculators3amazonawscomcalc5htmllng=ja_JP

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

72

複数の価格モデル

 課金金モデルが選べるsect 通常の時間課金金のオンデマンドインスタンス

sect ある程度度継続してEC2を使う(1年年3年年)EC2リザーブドインスタンス

sect 入札を利利用してより安く使うEC2スポットインスタンス

rarrマイスターシリーズ RIampスポットインスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

73

AWS無料料試用枠

  AWSでは無料料試用枠を用意していますbull  httpawsamazoncomjpfreeemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

74

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

75

Appendix

  参考資料料bull  Amazon Glacier Developer Guidehttpdocsamazonwebservicescomamazonglacierlatestdevintroductionhtml

bull  Amazon Glacier FAQhttpawsamazoncomjpglacierfaqs

bull  Amazon Glaceir価格httpawsamazoncomjpglacierpricing

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

76

QampA

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 32: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

32

EC2インスタンスのタイプ変更Stop(停止)しているといつでもタイプ(スペック)を変更更できる

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

33

EBSボリュームのアタッチ

Copyright copy 2011 Amazon Web Services

EC2インスタンスと同じゾーンに作ることを注意 スナップショットから複製も可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

34

EC2インスタンスのアドレス

  全てのインスタンスが下記を持つsect  Private IPアドレス(VPC内のサブネットから割り当てる)sect  Private DNS名(internal)sect  Public DNS名 (amazonawscom)

  public IPアドレスをオプションで付けられる   固定されたPublic IP Addresses はEIPと呼ぶ

sect  稼働しているEC2インスタンスに瞬時に付け外しが可能sect  インスタンスにアサインしているときは料料金金はかからない

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

35

EIPの割り当て

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

36

EIPの使いどころ

  通常のケースはEIPは必要なくEC2のPublic DNS名を用いてCNAMEで名前変換を行行う

  Route 53(名前解決サービス)でPublic DNSを用いる

  固定IPアドレスが必要なときに限りEIPを用いる   メールサーバー監視サーバー等

  メールサーバの送信制限解除逆引き申請が必要な場合は下記から申請を行行うhttpsaws-‐‑‒portalamazoncomgpawshtml-‐‑‒forms-‐‑‒controllercontactusec2-‐‑‒email-‐‑‒limit-‐‑‒rdns-‐‑‒request

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

37

リージョン間コピー(AMIEBS)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

38

Amazon EC2の関連サービス関連情報   監視負荷分散自動スケール

rarrCloudWatchELBAutoScaling   閉域網での利利用仮想ネットワーキング

rarrAmazon VPC (Virtual Private Cloud)   ① 社内ネットワークからVPN接続   ② ルーティングイントラIPアドレス仮想NIC等々

  占有サーバ rarrAmazon Dedicated Instance   専用線接続 rarrAmazon Direct Connect   Windowsemsp emsp  rarrWindowsインスタンス   スパコンrarrHPCインスタンス   アクセス管理理emsp  rarrIAM (Identity and Access Management)   料料金金関係emsp  rarrConsolidated Billing資料料集emsp httpawsamazoncomjpaws-‐‑‒meister

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

39

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

40

AWSのセキュリティの考え方

第三者認証

SOC 1SSAE 16ISAE 3402 ISO 27001 PCI DSS HIPAA ITAR

FISMA Moderate FIPS 140-2 ファシリティ

DC電源ネットワーク冗長化

Your Apps

Webサイトアプリケーションこれまでと同様のセキュリティを

お客様SI様で実現可能

インフラよりハイレベルの

セキュリティをAWSが提供

シェアードレスポンシビリティモデル(責任共有モデル)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

41

EC2の責任共有モデル

物理インタフェース

ファイアウォール

      ハイバーバイザー

Sm

all

Larg

e

hellip

Sm

all Amazon EC2

インスタンス

物理ホスト

ユーザーが 責任を持って 管理する

AWSが 責任を持って 管理する

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

42

ファイアウォールを実現するSecurity Group

  インスタンスのINOUTトラフィックを制限するファイアウォール機能

  デフォルトIN向けは全トラフィック閉

  必要な受信アクセスに対してアクセスルールを定義する

bull  プロトコル( TCPUDP)bull  宛先ポートbull  アクセス元IP Security Group

  ルールをひとまとめにしたテンプレートを Security Groupと呼ぶ

EC2 インスタンス

ポート22(SSH)

ポート80(HTTP)

EC2ファイアウォール

Security Group

ポート25(SMTP)

ポート22(SSH)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

43

Security Groupの使い方   インスタンスの用途に応じたSecurity Groupを用意する

bull  Webサーバ用DBサーバ用メールサーバ用等   アクセス元にSecurity Groupも設定して限定可能

Webサーバ

Webサーバ

DBサーバ

sg-1234

22 00000 80 00000 25 sg-1234

sg-1234

sg-1234

sg-abcd sg-abcd

22 00000 3306 sg-1234

Webサーバ

sg-xyz

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

44

セキュリティ証明書

仮想サーバ(Amazon EC2)Windows( スタンダード)

コマンドライン SDK利利用

SSH公開鍵認証

仮想デスクトップ

ターミナル

REST SOAPAPI

Webコンソール

①EC2インスタンスへのアクセスrarr鍵認証

②Webコンソールへのアクセス

rarrパスワード認証 多要素認証 IAM

③APIへのアクセスrarrアクセスキー X509証明書 IAM

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

45

Key Pair(キーペア)を用いた鍵認証   鍵認証はユーザ名パスワードの認証よりも安全な認証方式

ダウンロードされた秘密鍵

①キーペア作成

②インスタンス起動時にemsp emsp emsp 公開鍵をコピー

公開鍵

③公開鍵秘密鍵のペアが合致するとログイン可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

46

EC2のSLA13

sect  EC2の可用性が9995 sect 上記に満たない場合はServiceクレジットを返還する

sect 詳細は sect  httpawsamazoncomec2-sla

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

47

AWSセキュリティセンター 13

 日本語のホワイトペーパー bull  セキュリティ概要 bull  リスクとコンプライアンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

48

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

49

最近追加された機能

  VM Import for Linux   IAM EC2 Resource Permissions   リザーブドインスタンスの変更更可能に   SR-‐‑‒IOVネットワークDriverネットワーク性能向上

bull  C3 I2 R3インスタンスで対応

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

50

インスタンスのさらなる追加

  一般的な目的なら M3   Compute Optimizedなら C3   Memory Optimizedなら R3(もうすぐ)   GPUが必要なら G2   IOPS重視なら I2   Disk Based Storage ならHS1

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

51

Intel Processor Features

  m3 c3 cc2 g2 cr1 i2 r3の全てが対応

  AES New Instructions (AES-‐‑‒NI)bull  c1 cg1 m2でも対応

  Advanced Vector Extensions (Intel AVX)bull  HVMでのみ対応

  Turbo Boost Technology

  詳細は httpawsamazoncomec2instance-‐‑‒types

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

52

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

53

故障のための設計 Design for Failure   故障に備えた設計をしておく

  すべてが故障しうると考えシステム全体での保守的設計   SPOF(単一障害点)の排除   障害からの復復旧(対応品質)を重視する

  EC2における故障のための設計   AMIを常にとっておく   EBSスナップショットでバックアップ   複数アベイラビリティゾーンへの分散   ELBでサーバを冗長化Auto Scalingで自動復復帰   Reserved Instanceでキャパシティ保障

  他の冗長性高いサービスとの組み合わせ   S3 SimpleDB RDS他

httpwwwslidesharenetkentamagawaaws-‐‑‒7991623

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

54

定期的なバックアップ

  EC2のAMIを定期的に作成する   (参考) 無停止でAMI取得

Cloudpackさんブログhttpblogcloudpackjp201103aws-‐‑‒news-‐‑‒ec2-‐‑‒instance-‐‑‒no-‐‑‒reboot-‐‑‒amihtml

  データボリュームとしてのEBSの場合EBSのスナップショットを定期的に作成

  スクリプトを書いて定期的なバックアップを行行うことも可能 Coderockさんブログ

httpblogdateofrockcom201003auto-‐‑‒backup-‐‑‒amazon-‐‑‒ebs-‐‑‒with-‐‑‒rubyhtml   サーバーワークスさんブログ

httpblogserverworkscojptech20110721awssdk-‐‑‒for-‐‑‒ruby-‐‑‒create-‐‑‒snapshot

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

55

Instance StorageにSSDを積んだインスタンスが増えてきた

  EC2のタイプによって選択できるInstance Storeは以下の通り

Instance Type Instance Store Volumesm1small 1 x 160 GBdaggerm1medium 1 x 410 GBm1large 2 x 420 GB (840 GB)m1xlarge 4 x 420 GB (1680 GB)m2xlarge 1 x 420 GBm22xlarge 1 x 850 GBm24xlarge 2 x 840 GB (1680 GB)m3medium 1 x 4 GB SSDm3large 1 x 32 GB SSDm3xlarge 2 x 40 GB SSD (80 GB)m32xlarge 2 x 80 GB SSD (160 GB)

t1micro None (use Amazon EBS volumes)

c1medium 1 x 350 GBdaggerc1xlarge 4 x 420 GB (1680 GB)

Instance Type Instance Store Volumes

c3large 2 x 16 GB SSD (32 GB)c3xlarge 2 x 40 GB SSD (80 GB)c32xlarge 2 x 80 GB SSD (160 GB)c34xlarge 2 x 160 GB SSD (320 GB)c38xlarge 2 x 320 GB SSD (640 GB)cc28xlarge 4 x 840 GB (3360 GB)cg14xlarge 2 x 840 GB (1680 GB)cr18xlarge 2 x 120 GB SSD (240 GB)hi14xlarge 2 x 1024 GB SSD (2048 GB)hs18xlarge 24 x 2048 GB (49 TB)i2xlarge 1 x 800 GB SSDi22xlarge 2 x 800 GB SSD (1600 GB)i24xlarge 4 x 800 GB SSD (3200 GB)i28xlarge 8 x 800 GB SSD (6400 GB)

2014年年1月29日時点

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

56

Instance Storageを使うべきなのは

 高IOPS高帯域なストレージが必要な場合

 消えても良良い一次データの置き場として使う場合

 ストレージ冗長化を準備できる場合

S3活かしたいメリット

考慮すべき制約

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

57

EC2へのファイル転送は

  SCPを使う scp pk-‐‑‒XXXpem rootec2-‐‑‒XXXamazonawscomxxx

  Windowsの場合はWinSCPなど   S3経由で共有する

  S3にアップロードしEC2からwgetでアクセスする   FTPを立立ち上げる

  EC2側でFTPサーバーを立立ち上げておく

  高速に送信したい   Tsunami UDP Aspera等のソリューション

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

58

VM Import Export

  複数プラットフォームのVMイメージをAmazon EC2に移行行(インポートエクスポート)可能

httpawstypepadcomaws_japan201012vm-‐‑‒import-‐‑‒bring-‐‑‒your-‐‑‒vmware-‐‑‒images-‐‑‒to-‐‑‒the-‐‑‒cloudhtml

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

59

稼働EC2インスタンスからメタデータ取得

  ami-‐‑‒id   ami-‐‑‒launch-‐‑‒index   ami-‐‑‒manifest-‐‑‒path   block-‐‑‒device-‐‑‒mapping   hostname   instance-‐‑‒action   instance-‐‑‒id   Instance-‐‑‒type   kernel-‐‑‒id

  local-‐‑‒hostname   local-‐‑‒ipv4   mac   network   placement   profile   public-‐‑‒hostname   public-‐‑‒ipv4   public-‐‑‒keys   reservation-‐‑‒id

curl http169254169254latestmeta-‐‑‒data

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

60

起動時にパラメーターを渡す   起動時に16KB以内で任意のものを渡せる

  ChefやPuppetなどを利利用して自己構成できるAMIに   参照emsp AWSマイスターemsp CloudFormation資料料httpwwwslidesharenetkentamagawacloudformation-‐‑‒aws5

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

61

EC2コマンドラインツール amp AWS SDKs

  コマンドラインからEC2のAPIにアクセスできるツール   ツールをインストールしセキュリティ証明書を配置

  AWS SDKs httpawsamazoncomcode

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

62

マネージメントコンソールだけでなくAPIからプログラマブルにアクセス

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1a --instance-type m1small

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1b --instance-type m1small

Tokyo リージョン

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

63

EC2のスケジュールイベント表示機能

  EC2インスタンスが稼働しているハードかソフトにメンテナンスが必要な場合に情報を提供する仕組み

  インスタンスリブートシステムリブートリタイヤ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

64

EC2のステータスチェック機能

  下記の2種類のチェックを自動テストで実行行し情報を提示   システムステータスチェック

  EC2インスタンスにネットワークパケットが通るかチェック   インスタンスステータスチェック

  EC2インスタンスのOSがネットワークパケットを受け取るかチェック

  もし状況に乖離離がある場合はレポートできます

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

65

AWS制限増加申請

  EC2を誤って大量量に作成しないよう最大インスタンス数の上限を20に制限しています

  制限増加申請フォームで各種制限の増加を行行えますbull  httpawsamazoncomjpcontact-‐‑‒usemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

66

既存EBSボリュームのサイズ変更更

  例例 10GB -‐‑‒gt 100GB変更更への流流れ   EBSをデタッチする   EBSからS3にスナップショットを作成する

  新たなボリュームサイズを指定してEBSを作成する

  EBSをアタッチする   マウントしてリサイズする

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

スナップショット

EBS (10GB)

EBS (100GB)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

67

EBSとS3

EBSは複数EC2にアタッチ不不可   単独のEC2インスタンスへのブロックデバイスとしての使い方

  NFSのような使い方をする際はEC2にミドルウェアを導入(GlusterFS等)

S3は複数のEC2からアクセス可   ただしWrite Once Read A Lotな使い方に向いている

  アップロード並列列化も使える   耐久性の設計は99999999999で非常に高い

Copyright copy 2011 Amazon Web Services

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

バケット

EBS

EC2インスタンス

HTTPHTTPS

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

68

EIP使用時の注意点

  グローバルIP(EIP)を用いた場合インターネット経由のアクセスとなり課金発生するケースがある

  名前解決したいサーバに固定IPを付与する13   各サーバは固定グローバルIPを元に

AWSのDNSに名前を問い合わせ13   問い合わせた結果返ってくる外部DNS名でサーバにアクセスを行う13   EC2内部で外部DNS名を使ってアクセスすると プライベートIPアドレスに変換されるため 目的のサーバにプライベートIPでアクセスできる13

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

69

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

70

AWSの課金金の仕組みインターネット

ELB

EC2

EBS

S3

データ転送量量

ELB利利用料料データ処理理量量

インスタンスタイプ別利利用料料

EBSの利利用料料

S3の利利用料料

大半を占める

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

71

Simple Monthly Calculator

  Web上にある計算機を使って概算費用を計算できますsect  httpcalculators3amazonawscomcalc5htmllng=ja_JP

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

72

複数の価格モデル

 課金金モデルが選べるsect 通常の時間課金金のオンデマンドインスタンス

sect ある程度度継続してEC2を使う(1年年3年年)EC2リザーブドインスタンス

sect 入札を利利用してより安く使うEC2スポットインスタンス

rarrマイスターシリーズ RIampスポットインスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

73

AWS無料料試用枠

  AWSでは無料料試用枠を用意していますbull  httpawsamazoncomjpfreeemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

74

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

75

Appendix

  参考資料料bull  Amazon Glacier Developer Guidehttpdocsamazonwebservicescomamazonglacierlatestdevintroductionhtml

bull  Amazon Glacier FAQhttpawsamazoncomjpglacierfaqs

bull  Amazon Glaceir価格httpawsamazoncomjpglacierpricing

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

76

QampA

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 33: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

33

EBSボリュームのアタッチ

Copyright copy 2011 Amazon Web Services

EC2インスタンスと同じゾーンに作ることを注意 スナップショットから複製も可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

34

EC2インスタンスのアドレス

  全てのインスタンスが下記を持つsect  Private IPアドレス(VPC内のサブネットから割り当てる)sect  Private DNS名(internal)sect  Public DNS名 (amazonawscom)

  public IPアドレスをオプションで付けられる   固定されたPublic IP Addresses はEIPと呼ぶ

sect  稼働しているEC2インスタンスに瞬時に付け外しが可能sect  インスタンスにアサインしているときは料料金金はかからない

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

35

EIPの割り当て

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

36

EIPの使いどころ

  通常のケースはEIPは必要なくEC2のPublic DNS名を用いてCNAMEで名前変換を行行う

  Route 53(名前解決サービス)でPublic DNSを用いる

  固定IPアドレスが必要なときに限りEIPを用いる   メールサーバー監視サーバー等

  メールサーバの送信制限解除逆引き申請が必要な場合は下記から申請を行行うhttpsaws-‐‑‒portalamazoncomgpawshtml-‐‑‒forms-‐‑‒controllercontactusec2-‐‑‒email-‐‑‒limit-‐‑‒rdns-‐‑‒request

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

37

リージョン間コピー(AMIEBS)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

38

Amazon EC2の関連サービス関連情報   監視負荷分散自動スケール

rarrCloudWatchELBAutoScaling   閉域網での利利用仮想ネットワーキング

rarrAmazon VPC (Virtual Private Cloud)   ① 社内ネットワークからVPN接続   ② ルーティングイントラIPアドレス仮想NIC等々

  占有サーバ rarrAmazon Dedicated Instance   専用線接続 rarrAmazon Direct Connect   Windowsemsp emsp  rarrWindowsインスタンス   スパコンrarrHPCインスタンス   アクセス管理理emsp  rarrIAM (Identity and Access Management)   料料金金関係emsp  rarrConsolidated Billing資料料集emsp httpawsamazoncomjpaws-‐‑‒meister

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

39

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

40

AWSのセキュリティの考え方

第三者認証

SOC 1SSAE 16ISAE 3402 ISO 27001 PCI DSS HIPAA ITAR

FISMA Moderate FIPS 140-2 ファシリティ

DC電源ネットワーク冗長化

Your Apps

Webサイトアプリケーションこれまでと同様のセキュリティを

お客様SI様で実現可能

インフラよりハイレベルの

セキュリティをAWSが提供

シェアードレスポンシビリティモデル(責任共有モデル)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

41

EC2の責任共有モデル

物理インタフェース

ファイアウォール

      ハイバーバイザー

Sm

all

Larg

e

hellip

Sm

all Amazon EC2

インスタンス

物理ホスト

ユーザーが 責任を持って 管理する

AWSが 責任を持って 管理する

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

42

ファイアウォールを実現するSecurity Group

  インスタンスのINOUTトラフィックを制限するファイアウォール機能

  デフォルトIN向けは全トラフィック閉

  必要な受信アクセスに対してアクセスルールを定義する

bull  プロトコル( TCPUDP)bull  宛先ポートbull  アクセス元IP Security Group

  ルールをひとまとめにしたテンプレートを Security Groupと呼ぶ

EC2 インスタンス

ポート22(SSH)

ポート80(HTTP)

EC2ファイアウォール

Security Group

ポート25(SMTP)

ポート22(SSH)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

43

Security Groupの使い方   インスタンスの用途に応じたSecurity Groupを用意する

bull  Webサーバ用DBサーバ用メールサーバ用等   アクセス元にSecurity Groupも設定して限定可能

Webサーバ

Webサーバ

DBサーバ

sg-1234

22 00000 80 00000 25 sg-1234

sg-1234

sg-1234

sg-abcd sg-abcd

22 00000 3306 sg-1234

Webサーバ

sg-xyz

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

44

セキュリティ証明書

仮想サーバ(Amazon EC2)Windows( スタンダード)

コマンドライン SDK利利用

SSH公開鍵認証

仮想デスクトップ

ターミナル

REST SOAPAPI

Webコンソール

①EC2インスタンスへのアクセスrarr鍵認証

②Webコンソールへのアクセス

rarrパスワード認証 多要素認証 IAM

③APIへのアクセスrarrアクセスキー X509証明書 IAM

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

45

Key Pair(キーペア)を用いた鍵認証   鍵認証はユーザ名パスワードの認証よりも安全な認証方式

ダウンロードされた秘密鍵

①キーペア作成

②インスタンス起動時にemsp emsp emsp 公開鍵をコピー

公開鍵

③公開鍵秘密鍵のペアが合致するとログイン可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

46

EC2のSLA13

sect  EC2の可用性が9995 sect 上記に満たない場合はServiceクレジットを返還する

sect 詳細は sect  httpawsamazoncomec2-sla

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

47

AWSセキュリティセンター 13

 日本語のホワイトペーパー bull  セキュリティ概要 bull  リスクとコンプライアンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

48

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

49

最近追加された機能

  VM Import for Linux   IAM EC2 Resource Permissions   リザーブドインスタンスの変更更可能に   SR-‐‑‒IOVネットワークDriverネットワーク性能向上

bull  C3 I2 R3インスタンスで対応

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

50

インスタンスのさらなる追加

  一般的な目的なら M3   Compute Optimizedなら C3   Memory Optimizedなら R3(もうすぐ)   GPUが必要なら G2   IOPS重視なら I2   Disk Based Storage ならHS1

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

51

Intel Processor Features

  m3 c3 cc2 g2 cr1 i2 r3の全てが対応

  AES New Instructions (AES-‐‑‒NI)bull  c1 cg1 m2でも対応

  Advanced Vector Extensions (Intel AVX)bull  HVMでのみ対応

  Turbo Boost Technology

  詳細は httpawsamazoncomec2instance-‐‑‒types

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

52

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

53

故障のための設計 Design for Failure   故障に備えた設計をしておく

  すべてが故障しうると考えシステム全体での保守的設計   SPOF(単一障害点)の排除   障害からの復復旧(対応品質)を重視する

  EC2における故障のための設計   AMIを常にとっておく   EBSスナップショットでバックアップ   複数アベイラビリティゾーンへの分散   ELBでサーバを冗長化Auto Scalingで自動復復帰   Reserved Instanceでキャパシティ保障

  他の冗長性高いサービスとの組み合わせ   S3 SimpleDB RDS他

httpwwwslidesharenetkentamagawaaws-‐‑‒7991623

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

54

定期的なバックアップ

  EC2のAMIを定期的に作成する   (参考) 無停止でAMI取得

Cloudpackさんブログhttpblogcloudpackjp201103aws-‐‑‒news-‐‑‒ec2-‐‑‒instance-‐‑‒no-‐‑‒reboot-‐‑‒amihtml

  データボリュームとしてのEBSの場合EBSのスナップショットを定期的に作成

  スクリプトを書いて定期的なバックアップを行行うことも可能 Coderockさんブログ

httpblogdateofrockcom201003auto-‐‑‒backup-‐‑‒amazon-‐‑‒ebs-‐‑‒with-‐‑‒rubyhtml   サーバーワークスさんブログ

httpblogserverworkscojptech20110721awssdk-‐‑‒for-‐‑‒ruby-‐‑‒create-‐‑‒snapshot

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

55

Instance StorageにSSDを積んだインスタンスが増えてきた

  EC2のタイプによって選択できるInstance Storeは以下の通り

Instance Type Instance Store Volumesm1small 1 x 160 GBdaggerm1medium 1 x 410 GBm1large 2 x 420 GB (840 GB)m1xlarge 4 x 420 GB (1680 GB)m2xlarge 1 x 420 GBm22xlarge 1 x 850 GBm24xlarge 2 x 840 GB (1680 GB)m3medium 1 x 4 GB SSDm3large 1 x 32 GB SSDm3xlarge 2 x 40 GB SSD (80 GB)m32xlarge 2 x 80 GB SSD (160 GB)

t1micro None (use Amazon EBS volumes)

c1medium 1 x 350 GBdaggerc1xlarge 4 x 420 GB (1680 GB)

Instance Type Instance Store Volumes

c3large 2 x 16 GB SSD (32 GB)c3xlarge 2 x 40 GB SSD (80 GB)c32xlarge 2 x 80 GB SSD (160 GB)c34xlarge 2 x 160 GB SSD (320 GB)c38xlarge 2 x 320 GB SSD (640 GB)cc28xlarge 4 x 840 GB (3360 GB)cg14xlarge 2 x 840 GB (1680 GB)cr18xlarge 2 x 120 GB SSD (240 GB)hi14xlarge 2 x 1024 GB SSD (2048 GB)hs18xlarge 24 x 2048 GB (49 TB)i2xlarge 1 x 800 GB SSDi22xlarge 2 x 800 GB SSD (1600 GB)i24xlarge 4 x 800 GB SSD (3200 GB)i28xlarge 8 x 800 GB SSD (6400 GB)

2014年年1月29日時点

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

56

Instance Storageを使うべきなのは

 高IOPS高帯域なストレージが必要な場合

 消えても良良い一次データの置き場として使う場合

 ストレージ冗長化を準備できる場合

S3活かしたいメリット

考慮すべき制約

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

57

EC2へのファイル転送は

  SCPを使う scp pk-‐‑‒XXXpem rootec2-‐‑‒XXXamazonawscomxxx

  Windowsの場合はWinSCPなど   S3経由で共有する

  S3にアップロードしEC2からwgetでアクセスする   FTPを立立ち上げる

  EC2側でFTPサーバーを立立ち上げておく

  高速に送信したい   Tsunami UDP Aspera等のソリューション

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

58

VM Import Export

  複数プラットフォームのVMイメージをAmazon EC2に移行行(インポートエクスポート)可能

httpawstypepadcomaws_japan201012vm-‐‑‒import-‐‑‒bring-‐‑‒your-‐‑‒vmware-‐‑‒images-‐‑‒to-‐‑‒the-‐‑‒cloudhtml

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

59

稼働EC2インスタンスからメタデータ取得

  ami-‐‑‒id   ami-‐‑‒launch-‐‑‒index   ami-‐‑‒manifest-‐‑‒path   block-‐‑‒device-‐‑‒mapping   hostname   instance-‐‑‒action   instance-‐‑‒id   Instance-‐‑‒type   kernel-‐‑‒id

  local-‐‑‒hostname   local-‐‑‒ipv4   mac   network   placement   profile   public-‐‑‒hostname   public-‐‑‒ipv4   public-‐‑‒keys   reservation-‐‑‒id

curl http169254169254latestmeta-‐‑‒data

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

60

起動時にパラメーターを渡す   起動時に16KB以内で任意のものを渡せる

  ChefやPuppetなどを利利用して自己構成できるAMIに   参照emsp AWSマイスターemsp CloudFormation資料料httpwwwslidesharenetkentamagawacloudformation-‐‑‒aws5

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

61

EC2コマンドラインツール amp AWS SDKs

  コマンドラインからEC2のAPIにアクセスできるツール   ツールをインストールしセキュリティ証明書を配置

  AWS SDKs httpawsamazoncomcode

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

62

マネージメントコンソールだけでなくAPIからプログラマブルにアクセス

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1a --instance-type m1small

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1b --instance-type m1small

Tokyo リージョン

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

63

EC2のスケジュールイベント表示機能

  EC2インスタンスが稼働しているハードかソフトにメンテナンスが必要な場合に情報を提供する仕組み

  インスタンスリブートシステムリブートリタイヤ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

64

EC2のステータスチェック機能

  下記の2種類のチェックを自動テストで実行行し情報を提示   システムステータスチェック

  EC2インスタンスにネットワークパケットが通るかチェック   インスタンスステータスチェック

  EC2インスタンスのOSがネットワークパケットを受け取るかチェック

  もし状況に乖離離がある場合はレポートできます

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

65

AWS制限増加申請

  EC2を誤って大量量に作成しないよう最大インスタンス数の上限を20に制限しています

  制限増加申請フォームで各種制限の増加を行行えますbull  httpawsamazoncomjpcontact-‐‑‒usemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

66

既存EBSボリュームのサイズ変更更

  例例 10GB -‐‑‒gt 100GB変更更への流流れ   EBSをデタッチする   EBSからS3にスナップショットを作成する

  新たなボリュームサイズを指定してEBSを作成する

  EBSをアタッチする   マウントしてリサイズする

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

スナップショット

EBS (10GB)

EBS (100GB)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

67

EBSとS3

EBSは複数EC2にアタッチ不不可   単独のEC2インスタンスへのブロックデバイスとしての使い方

  NFSのような使い方をする際はEC2にミドルウェアを導入(GlusterFS等)

S3は複数のEC2からアクセス可   ただしWrite Once Read A Lotな使い方に向いている

  アップロード並列列化も使える   耐久性の設計は99999999999で非常に高い

Copyright copy 2011 Amazon Web Services

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

バケット

EBS

EC2インスタンス

HTTPHTTPS

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

68

EIP使用時の注意点

  グローバルIP(EIP)を用いた場合インターネット経由のアクセスとなり課金発生するケースがある

  名前解決したいサーバに固定IPを付与する13   各サーバは固定グローバルIPを元に

AWSのDNSに名前を問い合わせ13   問い合わせた結果返ってくる外部DNS名でサーバにアクセスを行う13   EC2内部で外部DNS名を使ってアクセスすると プライベートIPアドレスに変換されるため 目的のサーバにプライベートIPでアクセスできる13

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

69

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

70

AWSの課金金の仕組みインターネット

ELB

EC2

EBS

S3

データ転送量量

ELB利利用料料データ処理理量量

インスタンスタイプ別利利用料料

EBSの利利用料料

S3の利利用料料

大半を占める

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

71

Simple Monthly Calculator

  Web上にある計算機を使って概算費用を計算できますsect  httpcalculators3amazonawscomcalc5htmllng=ja_JP

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

72

複数の価格モデル

 課金金モデルが選べるsect 通常の時間課金金のオンデマンドインスタンス

sect ある程度度継続してEC2を使う(1年年3年年)EC2リザーブドインスタンス

sect 入札を利利用してより安く使うEC2スポットインスタンス

rarrマイスターシリーズ RIampスポットインスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

73

AWS無料料試用枠

  AWSでは無料料試用枠を用意していますbull  httpawsamazoncomjpfreeemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

74

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

75

Appendix

  参考資料料bull  Amazon Glacier Developer Guidehttpdocsamazonwebservicescomamazonglacierlatestdevintroductionhtml

bull  Amazon Glacier FAQhttpawsamazoncomjpglacierfaqs

bull  Amazon Glaceir価格httpawsamazoncomjpglacierpricing

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

76

QampA

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 34: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

34

EC2インスタンスのアドレス

  全てのインスタンスが下記を持つsect  Private IPアドレス(VPC内のサブネットから割り当てる)sect  Private DNS名(internal)sect  Public DNS名 (amazonawscom)

  public IPアドレスをオプションで付けられる   固定されたPublic IP Addresses はEIPと呼ぶ

sect  稼働しているEC2インスタンスに瞬時に付け外しが可能sect  インスタンスにアサインしているときは料料金金はかからない

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

35

EIPの割り当て

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

36

EIPの使いどころ

  通常のケースはEIPは必要なくEC2のPublic DNS名を用いてCNAMEで名前変換を行行う

  Route 53(名前解決サービス)でPublic DNSを用いる

  固定IPアドレスが必要なときに限りEIPを用いる   メールサーバー監視サーバー等

  メールサーバの送信制限解除逆引き申請が必要な場合は下記から申請を行行うhttpsaws-‐‑‒portalamazoncomgpawshtml-‐‑‒forms-‐‑‒controllercontactusec2-‐‑‒email-‐‑‒limit-‐‑‒rdns-‐‑‒request

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

37

リージョン間コピー(AMIEBS)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

38

Amazon EC2の関連サービス関連情報   監視負荷分散自動スケール

rarrCloudWatchELBAutoScaling   閉域網での利利用仮想ネットワーキング

rarrAmazon VPC (Virtual Private Cloud)   ① 社内ネットワークからVPN接続   ② ルーティングイントラIPアドレス仮想NIC等々

  占有サーバ rarrAmazon Dedicated Instance   専用線接続 rarrAmazon Direct Connect   Windowsemsp emsp  rarrWindowsインスタンス   スパコンrarrHPCインスタンス   アクセス管理理emsp  rarrIAM (Identity and Access Management)   料料金金関係emsp  rarrConsolidated Billing資料料集emsp httpawsamazoncomjpaws-‐‑‒meister

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

39

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

40

AWSのセキュリティの考え方

第三者認証

SOC 1SSAE 16ISAE 3402 ISO 27001 PCI DSS HIPAA ITAR

FISMA Moderate FIPS 140-2 ファシリティ

DC電源ネットワーク冗長化

Your Apps

Webサイトアプリケーションこれまでと同様のセキュリティを

お客様SI様で実現可能

インフラよりハイレベルの

セキュリティをAWSが提供

シェアードレスポンシビリティモデル(責任共有モデル)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

41

EC2の責任共有モデル

物理インタフェース

ファイアウォール

      ハイバーバイザー

Sm

all

Larg

e

hellip

Sm

all Amazon EC2

インスタンス

物理ホスト

ユーザーが 責任を持って 管理する

AWSが 責任を持って 管理する

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

42

ファイアウォールを実現するSecurity Group

  インスタンスのINOUTトラフィックを制限するファイアウォール機能

  デフォルトIN向けは全トラフィック閉

  必要な受信アクセスに対してアクセスルールを定義する

bull  プロトコル( TCPUDP)bull  宛先ポートbull  アクセス元IP Security Group

  ルールをひとまとめにしたテンプレートを Security Groupと呼ぶ

EC2 インスタンス

ポート22(SSH)

ポート80(HTTP)

EC2ファイアウォール

Security Group

ポート25(SMTP)

ポート22(SSH)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

43

Security Groupの使い方   インスタンスの用途に応じたSecurity Groupを用意する

bull  Webサーバ用DBサーバ用メールサーバ用等   アクセス元にSecurity Groupも設定して限定可能

Webサーバ

Webサーバ

DBサーバ

sg-1234

22 00000 80 00000 25 sg-1234

sg-1234

sg-1234

sg-abcd sg-abcd

22 00000 3306 sg-1234

Webサーバ

sg-xyz

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

44

セキュリティ証明書

仮想サーバ(Amazon EC2)Windows( スタンダード)

コマンドライン SDK利利用

SSH公開鍵認証

仮想デスクトップ

ターミナル

REST SOAPAPI

Webコンソール

①EC2インスタンスへのアクセスrarr鍵認証

②Webコンソールへのアクセス

rarrパスワード認証 多要素認証 IAM

③APIへのアクセスrarrアクセスキー X509証明書 IAM

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

45

Key Pair(キーペア)を用いた鍵認証   鍵認証はユーザ名パスワードの認証よりも安全な認証方式

ダウンロードされた秘密鍵

①キーペア作成

②インスタンス起動時にemsp emsp emsp 公開鍵をコピー

公開鍵

③公開鍵秘密鍵のペアが合致するとログイン可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

46

EC2のSLA13

sect  EC2の可用性が9995 sect 上記に満たない場合はServiceクレジットを返還する

sect 詳細は sect  httpawsamazoncomec2-sla

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

47

AWSセキュリティセンター 13

 日本語のホワイトペーパー bull  セキュリティ概要 bull  リスクとコンプライアンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

48

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

49

最近追加された機能

  VM Import for Linux   IAM EC2 Resource Permissions   リザーブドインスタンスの変更更可能に   SR-‐‑‒IOVネットワークDriverネットワーク性能向上

bull  C3 I2 R3インスタンスで対応

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

50

インスタンスのさらなる追加

  一般的な目的なら M3   Compute Optimizedなら C3   Memory Optimizedなら R3(もうすぐ)   GPUが必要なら G2   IOPS重視なら I2   Disk Based Storage ならHS1

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

51

Intel Processor Features

  m3 c3 cc2 g2 cr1 i2 r3の全てが対応

  AES New Instructions (AES-‐‑‒NI)bull  c1 cg1 m2でも対応

  Advanced Vector Extensions (Intel AVX)bull  HVMでのみ対応

  Turbo Boost Technology

  詳細は httpawsamazoncomec2instance-‐‑‒types

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

52

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

53

故障のための設計 Design for Failure   故障に備えた設計をしておく

  すべてが故障しうると考えシステム全体での保守的設計   SPOF(単一障害点)の排除   障害からの復復旧(対応品質)を重視する

  EC2における故障のための設計   AMIを常にとっておく   EBSスナップショットでバックアップ   複数アベイラビリティゾーンへの分散   ELBでサーバを冗長化Auto Scalingで自動復復帰   Reserved Instanceでキャパシティ保障

  他の冗長性高いサービスとの組み合わせ   S3 SimpleDB RDS他

httpwwwslidesharenetkentamagawaaws-‐‑‒7991623

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

54

定期的なバックアップ

  EC2のAMIを定期的に作成する   (参考) 無停止でAMI取得

Cloudpackさんブログhttpblogcloudpackjp201103aws-‐‑‒news-‐‑‒ec2-‐‑‒instance-‐‑‒no-‐‑‒reboot-‐‑‒amihtml

  データボリュームとしてのEBSの場合EBSのスナップショットを定期的に作成

  スクリプトを書いて定期的なバックアップを行行うことも可能 Coderockさんブログ

httpblogdateofrockcom201003auto-‐‑‒backup-‐‑‒amazon-‐‑‒ebs-‐‑‒with-‐‑‒rubyhtml   サーバーワークスさんブログ

httpblogserverworkscojptech20110721awssdk-‐‑‒for-‐‑‒ruby-‐‑‒create-‐‑‒snapshot

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

55

Instance StorageにSSDを積んだインスタンスが増えてきた

  EC2のタイプによって選択できるInstance Storeは以下の通り

Instance Type Instance Store Volumesm1small 1 x 160 GBdaggerm1medium 1 x 410 GBm1large 2 x 420 GB (840 GB)m1xlarge 4 x 420 GB (1680 GB)m2xlarge 1 x 420 GBm22xlarge 1 x 850 GBm24xlarge 2 x 840 GB (1680 GB)m3medium 1 x 4 GB SSDm3large 1 x 32 GB SSDm3xlarge 2 x 40 GB SSD (80 GB)m32xlarge 2 x 80 GB SSD (160 GB)

t1micro None (use Amazon EBS volumes)

c1medium 1 x 350 GBdaggerc1xlarge 4 x 420 GB (1680 GB)

Instance Type Instance Store Volumes

c3large 2 x 16 GB SSD (32 GB)c3xlarge 2 x 40 GB SSD (80 GB)c32xlarge 2 x 80 GB SSD (160 GB)c34xlarge 2 x 160 GB SSD (320 GB)c38xlarge 2 x 320 GB SSD (640 GB)cc28xlarge 4 x 840 GB (3360 GB)cg14xlarge 2 x 840 GB (1680 GB)cr18xlarge 2 x 120 GB SSD (240 GB)hi14xlarge 2 x 1024 GB SSD (2048 GB)hs18xlarge 24 x 2048 GB (49 TB)i2xlarge 1 x 800 GB SSDi22xlarge 2 x 800 GB SSD (1600 GB)i24xlarge 4 x 800 GB SSD (3200 GB)i28xlarge 8 x 800 GB SSD (6400 GB)

2014年年1月29日時点

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

56

Instance Storageを使うべきなのは

 高IOPS高帯域なストレージが必要な場合

 消えても良良い一次データの置き場として使う場合

 ストレージ冗長化を準備できる場合

S3活かしたいメリット

考慮すべき制約

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

57

EC2へのファイル転送は

  SCPを使う scp pk-‐‑‒XXXpem rootec2-‐‑‒XXXamazonawscomxxx

  Windowsの場合はWinSCPなど   S3経由で共有する

  S3にアップロードしEC2からwgetでアクセスする   FTPを立立ち上げる

  EC2側でFTPサーバーを立立ち上げておく

  高速に送信したい   Tsunami UDP Aspera等のソリューション

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

58

VM Import Export

  複数プラットフォームのVMイメージをAmazon EC2に移行行(インポートエクスポート)可能

httpawstypepadcomaws_japan201012vm-‐‑‒import-‐‑‒bring-‐‑‒your-‐‑‒vmware-‐‑‒images-‐‑‒to-‐‑‒the-‐‑‒cloudhtml

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

59

稼働EC2インスタンスからメタデータ取得

  ami-‐‑‒id   ami-‐‑‒launch-‐‑‒index   ami-‐‑‒manifest-‐‑‒path   block-‐‑‒device-‐‑‒mapping   hostname   instance-‐‑‒action   instance-‐‑‒id   Instance-‐‑‒type   kernel-‐‑‒id

  local-‐‑‒hostname   local-‐‑‒ipv4   mac   network   placement   profile   public-‐‑‒hostname   public-‐‑‒ipv4   public-‐‑‒keys   reservation-‐‑‒id

curl http169254169254latestmeta-‐‑‒data

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

60

起動時にパラメーターを渡す   起動時に16KB以内で任意のものを渡せる

  ChefやPuppetなどを利利用して自己構成できるAMIに   参照emsp AWSマイスターemsp CloudFormation資料料httpwwwslidesharenetkentamagawacloudformation-‐‑‒aws5

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

61

EC2コマンドラインツール amp AWS SDKs

  コマンドラインからEC2のAPIにアクセスできるツール   ツールをインストールしセキュリティ証明書を配置

  AWS SDKs httpawsamazoncomcode

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

62

マネージメントコンソールだけでなくAPIからプログラマブルにアクセス

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1a --instance-type m1small

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1b --instance-type m1small

Tokyo リージョン

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

63

EC2のスケジュールイベント表示機能

  EC2インスタンスが稼働しているハードかソフトにメンテナンスが必要な場合に情報を提供する仕組み

  インスタンスリブートシステムリブートリタイヤ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

64

EC2のステータスチェック機能

  下記の2種類のチェックを自動テストで実行行し情報を提示   システムステータスチェック

  EC2インスタンスにネットワークパケットが通るかチェック   インスタンスステータスチェック

  EC2インスタンスのOSがネットワークパケットを受け取るかチェック

  もし状況に乖離離がある場合はレポートできます

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

65

AWS制限増加申請

  EC2を誤って大量量に作成しないよう最大インスタンス数の上限を20に制限しています

  制限増加申請フォームで各種制限の増加を行行えますbull  httpawsamazoncomjpcontact-‐‑‒usemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

66

既存EBSボリュームのサイズ変更更

  例例 10GB -‐‑‒gt 100GB変更更への流流れ   EBSをデタッチする   EBSからS3にスナップショットを作成する

  新たなボリュームサイズを指定してEBSを作成する

  EBSをアタッチする   マウントしてリサイズする

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

スナップショット

EBS (10GB)

EBS (100GB)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

67

EBSとS3

EBSは複数EC2にアタッチ不不可   単独のEC2インスタンスへのブロックデバイスとしての使い方

  NFSのような使い方をする際はEC2にミドルウェアを導入(GlusterFS等)

S3は複数のEC2からアクセス可   ただしWrite Once Read A Lotな使い方に向いている

  アップロード並列列化も使える   耐久性の設計は99999999999で非常に高い

Copyright copy 2011 Amazon Web Services

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

バケット

EBS

EC2インスタンス

HTTPHTTPS

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

68

EIP使用時の注意点

  グローバルIP(EIP)を用いた場合インターネット経由のアクセスとなり課金発生するケースがある

  名前解決したいサーバに固定IPを付与する13   各サーバは固定グローバルIPを元に

AWSのDNSに名前を問い合わせ13   問い合わせた結果返ってくる外部DNS名でサーバにアクセスを行う13   EC2内部で外部DNS名を使ってアクセスすると プライベートIPアドレスに変換されるため 目的のサーバにプライベートIPでアクセスできる13

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

69

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

70

AWSの課金金の仕組みインターネット

ELB

EC2

EBS

S3

データ転送量量

ELB利利用料料データ処理理量量

インスタンスタイプ別利利用料料

EBSの利利用料料

S3の利利用料料

大半を占める

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

71

Simple Monthly Calculator

  Web上にある計算機を使って概算費用を計算できますsect  httpcalculators3amazonawscomcalc5htmllng=ja_JP

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

72

複数の価格モデル

 課金金モデルが選べるsect 通常の時間課金金のオンデマンドインスタンス

sect ある程度度継続してEC2を使う(1年年3年年)EC2リザーブドインスタンス

sect 入札を利利用してより安く使うEC2スポットインスタンス

rarrマイスターシリーズ RIampスポットインスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

73

AWS無料料試用枠

  AWSでは無料料試用枠を用意していますbull  httpawsamazoncomjpfreeemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

74

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

75

Appendix

  参考資料料bull  Amazon Glacier Developer Guidehttpdocsamazonwebservicescomamazonglacierlatestdevintroductionhtml

bull  Amazon Glacier FAQhttpawsamazoncomjpglacierfaqs

bull  Amazon Glaceir価格httpawsamazoncomjpglacierpricing

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

76

QampA

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 35: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

35

EIPの割り当て

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

36

EIPの使いどころ

  通常のケースはEIPは必要なくEC2のPublic DNS名を用いてCNAMEで名前変換を行行う

  Route 53(名前解決サービス)でPublic DNSを用いる

  固定IPアドレスが必要なときに限りEIPを用いる   メールサーバー監視サーバー等

  メールサーバの送信制限解除逆引き申請が必要な場合は下記から申請を行行うhttpsaws-‐‑‒portalamazoncomgpawshtml-‐‑‒forms-‐‑‒controllercontactusec2-‐‑‒email-‐‑‒limit-‐‑‒rdns-‐‑‒request

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

37

リージョン間コピー(AMIEBS)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

38

Amazon EC2の関連サービス関連情報   監視負荷分散自動スケール

rarrCloudWatchELBAutoScaling   閉域網での利利用仮想ネットワーキング

rarrAmazon VPC (Virtual Private Cloud)   ① 社内ネットワークからVPN接続   ② ルーティングイントラIPアドレス仮想NIC等々

  占有サーバ rarrAmazon Dedicated Instance   専用線接続 rarrAmazon Direct Connect   Windowsemsp emsp  rarrWindowsインスタンス   スパコンrarrHPCインスタンス   アクセス管理理emsp  rarrIAM (Identity and Access Management)   料料金金関係emsp  rarrConsolidated Billing資料料集emsp httpawsamazoncomjpaws-‐‑‒meister

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

39

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

40

AWSのセキュリティの考え方

第三者認証

SOC 1SSAE 16ISAE 3402 ISO 27001 PCI DSS HIPAA ITAR

FISMA Moderate FIPS 140-2 ファシリティ

DC電源ネットワーク冗長化

Your Apps

Webサイトアプリケーションこれまでと同様のセキュリティを

お客様SI様で実現可能

インフラよりハイレベルの

セキュリティをAWSが提供

シェアードレスポンシビリティモデル(責任共有モデル)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

41

EC2の責任共有モデル

物理インタフェース

ファイアウォール

      ハイバーバイザー

Sm

all

Larg

e

hellip

Sm

all Amazon EC2

インスタンス

物理ホスト

ユーザーが 責任を持って 管理する

AWSが 責任を持って 管理する

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

42

ファイアウォールを実現するSecurity Group

  インスタンスのINOUTトラフィックを制限するファイアウォール機能

  デフォルトIN向けは全トラフィック閉

  必要な受信アクセスに対してアクセスルールを定義する

bull  プロトコル( TCPUDP)bull  宛先ポートbull  アクセス元IP Security Group

  ルールをひとまとめにしたテンプレートを Security Groupと呼ぶ

EC2 インスタンス

ポート22(SSH)

ポート80(HTTP)

EC2ファイアウォール

Security Group

ポート25(SMTP)

ポート22(SSH)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

43

Security Groupの使い方   インスタンスの用途に応じたSecurity Groupを用意する

bull  Webサーバ用DBサーバ用メールサーバ用等   アクセス元にSecurity Groupも設定して限定可能

Webサーバ

Webサーバ

DBサーバ

sg-1234

22 00000 80 00000 25 sg-1234

sg-1234

sg-1234

sg-abcd sg-abcd

22 00000 3306 sg-1234

Webサーバ

sg-xyz

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

44

セキュリティ証明書

仮想サーバ(Amazon EC2)Windows( スタンダード)

コマンドライン SDK利利用

SSH公開鍵認証

仮想デスクトップ

ターミナル

REST SOAPAPI

Webコンソール

①EC2インスタンスへのアクセスrarr鍵認証

②Webコンソールへのアクセス

rarrパスワード認証 多要素認証 IAM

③APIへのアクセスrarrアクセスキー X509証明書 IAM

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

45

Key Pair(キーペア)を用いた鍵認証   鍵認証はユーザ名パスワードの認証よりも安全な認証方式

ダウンロードされた秘密鍵

①キーペア作成

②インスタンス起動時にemsp emsp emsp 公開鍵をコピー

公開鍵

③公開鍵秘密鍵のペアが合致するとログイン可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

46

EC2のSLA13

sect  EC2の可用性が9995 sect 上記に満たない場合はServiceクレジットを返還する

sect 詳細は sect  httpawsamazoncomec2-sla

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

47

AWSセキュリティセンター 13

 日本語のホワイトペーパー bull  セキュリティ概要 bull  リスクとコンプライアンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

48

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

49

最近追加された機能

  VM Import for Linux   IAM EC2 Resource Permissions   リザーブドインスタンスの変更更可能に   SR-‐‑‒IOVネットワークDriverネットワーク性能向上

bull  C3 I2 R3インスタンスで対応

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

50

インスタンスのさらなる追加

  一般的な目的なら M3   Compute Optimizedなら C3   Memory Optimizedなら R3(もうすぐ)   GPUが必要なら G2   IOPS重視なら I2   Disk Based Storage ならHS1

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

51

Intel Processor Features

  m3 c3 cc2 g2 cr1 i2 r3の全てが対応

  AES New Instructions (AES-‐‑‒NI)bull  c1 cg1 m2でも対応

  Advanced Vector Extensions (Intel AVX)bull  HVMでのみ対応

  Turbo Boost Technology

  詳細は httpawsamazoncomec2instance-‐‑‒types

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

52

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

53

故障のための設計 Design for Failure   故障に備えた設計をしておく

  すべてが故障しうると考えシステム全体での保守的設計   SPOF(単一障害点)の排除   障害からの復復旧(対応品質)を重視する

  EC2における故障のための設計   AMIを常にとっておく   EBSスナップショットでバックアップ   複数アベイラビリティゾーンへの分散   ELBでサーバを冗長化Auto Scalingで自動復復帰   Reserved Instanceでキャパシティ保障

  他の冗長性高いサービスとの組み合わせ   S3 SimpleDB RDS他

httpwwwslidesharenetkentamagawaaws-‐‑‒7991623

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

54

定期的なバックアップ

  EC2のAMIを定期的に作成する   (参考) 無停止でAMI取得

Cloudpackさんブログhttpblogcloudpackjp201103aws-‐‑‒news-‐‑‒ec2-‐‑‒instance-‐‑‒no-‐‑‒reboot-‐‑‒amihtml

  データボリュームとしてのEBSの場合EBSのスナップショットを定期的に作成

  スクリプトを書いて定期的なバックアップを行行うことも可能 Coderockさんブログ

httpblogdateofrockcom201003auto-‐‑‒backup-‐‑‒amazon-‐‑‒ebs-‐‑‒with-‐‑‒rubyhtml   サーバーワークスさんブログ

httpblogserverworkscojptech20110721awssdk-‐‑‒for-‐‑‒ruby-‐‑‒create-‐‑‒snapshot

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

55

Instance StorageにSSDを積んだインスタンスが増えてきた

  EC2のタイプによって選択できるInstance Storeは以下の通り

Instance Type Instance Store Volumesm1small 1 x 160 GBdaggerm1medium 1 x 410 GBm1large 2 x 420 GB (840 GB)m1xlarge 4 x 420 GB (1680 GB)m2xlarge 1 x 420 GBm22xlarge 1 x 850 GBm24xlarge 2 x 840 GB (1680 GB)m3medium 1 x 4 GB SSDm3large 1 x 32 GB SSDm3xlarge 2 x 40 GB SSD (80 GB)m32xlarge 2 x 80 GB SSD (160 GB)

t1micro None (use Amazon EBS volumes)

c1medium 1 x 350 GBdaggerc1xlarge 4 x 420 GB (1680 GB)

Instance Type Instance Store Volumes

c3large 2 x 16 GB SSD (32 GB)c3xlarge 2 x 40 GB SSD (80 GB)c32xlarge 2 x 80 GB SSD (160 GB)c34xlarge 2 x 160 GB SSD (320 GB)c38xlarge 2 x 320 GB SSD (640 GB)cc28xlarge 4 x 840 GB (3360 GB)cg14xlarge 2 x 840 GB (1680 GB)cr18xlarge 2 x 120 GB SSD (240 GB)hi14xlarge 2 x 1024 GB SSD (2048 GB)hs18xlarge 24 x 2048 GB (49 TB)i2xlarge 1 x 800 GB SSDi22xlarge 2 x 800 GB SSD (1600 GB)i24xlarge 4 x 800 GB SSD (3200 GB)i28xlarge 8 x 800 GB SSD (6400 GB)

2014年年1月29日時点

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

56

Instance Storageを使うべきなのは

 高IOPS高帯域なストレージが必要な場合

 消えても良良い一次データの置き場として使う場合

 ストレージ冗長化を準備できる場合

S3活かしたいメリット

考慮すべき制約

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

57

EC2へのファイル転送は

  SCPを使う scp pk-‐‑‒XXXpem rootec2-‐‑‒XXXamazonawscomxxx

  Windowsの場合はWinSCPなど   S3経由で共有する

  S3にアップロードしEC2からwgetでアクセスする   FTPを立立ち上げる

  EC2側でFTPサーバーを立立ち上げておく

  高速に送信したい   Tsunami UDP Aspera等のソリューション

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

58

VM Import Export

  複数プラットフォームのVMイメージをAmazon EC2に移行行(インポートエクスポート)可能

httpawstypepadcomaws_japan201012vm-‐‑‒import-‐‑‒bring-‐‑‒your-‐‑‒vmware-‐‑‒images-‐‑‒to-‐‑‒the-‐‑‒cloudhtml

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

59

稼働EC2インスタンスからメタデータ取得

  ami-‐‑‒id   ami-‐‑‒launch-‐‑‒index   ami-‐‑‒manifest-‐‑‒path   block-‐‑‒device-‐‑‒mapping   hostname   instance-‐‑‒action   instance-‐‑‒id   Instance-‐‑‒type   kernel-‐‑‒id

  local-‐‑‒hostname   local-‐‑‒ipv4   mac   network   placement   profile   public-‐‑‒hostname   public-‐‑‒ipv4   public-‐‑‒keys   reservation-‐‑‒id

curl http169254169254latestmeta-‐‑‒data

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

60

起動時にパラメーターを渡す   起動時に16KB以内で任意のものを渡せる

  ChefやPuppetなどを利利用して自己構成できるAMIに   参照emsp AWSマイスターemsp CloudFormation資料料httpwwwslidesharenetkentamagawacloudformation-‐‑‒aws5

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

61

EC2コマンドラインツール amp AWS SDKs

  コマンドラインからEC2のAPIにアクセスできるツール   ツールをインストールしセキュリティ証明書を配置

  AWS SDKs httpawsamazoncomcode

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

62

マネージメントコンソールだけでなくAPIからプログラマブルにアクセス

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1a --instance-type m1small

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1b --instance-type m1small

Tokyo リージョン

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

63

EC2のスケジュールイベント表示機能

  EC2インスタンスが稼働しているハードかソフトにメンテナンスが必要な場合に情報を提供する仕組み

  インスタンスリブートシステムリブートリタイヤ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

64

EC2のステータスチェック機能

  下記の2種類のチェックを自動テストで実行行し情報を提示   システムステータスチェック

  EC2インスタンスにネットワークパケットが通るかチェック   インスタンスステータスチェック

  EC2インスタンスのOSがネットワークパケットを受け取るかチェック

  もし状況に乖離離がある場合はレポートできます

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

65

AWS制限増加申請

  EC2を誤って大量量に作成しないよう最大インスタンス数の上限を20に制限しています

  制限増加申請フォームで各種制限の増加を行行えますbull  httpawsamazoncomjpcontact-‐‑‒usemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

66

既存EBSボリュームのサイズ変更更

  例例 10GB -‐‑‒gt 100GB変更更への流流れ   EBSをデタッチする   EBSからS3にスナップショットを作成する

  新たなボリュームサイズを指定してEBSを作成する

  EBSをアタッチする   マウントしてリサイズする

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

スナップショット

EBS (10GB)

EBS (100GB)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

67

EBSとS3

EBSは複数EC2にアタッチ不不可   単独のEC2インスタンスへのブロックデバイスとしての使い方

  NFSのような使い方をする際はEC2にミドルウェアを導入(GlusterFS等)

S3は複数のEC2からアクセス可   ただしWrite Once Read A Lotな使い方に向いている

  アップロード並列列化も使える   耐久性の設計は99999999999で非常に高い

Copyright copy 2011 Amazon Web Services

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

バケット

EBS

EC2インスタンス

HTTPHTTPS

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

68

EIP使用時の注意点

  グローバルIP(EIP)を用いた場合インターネット経由のアクセスとなり課金発生するケースがある

  名前解決したいサーバに固定IPを付与する13   各サーバは固定グローバルIPを元に

AWSのDNSに名前を問い合わせ13   問い合わせた結果返ってくる外部DNS名でサーバにアクセスを行う13   EC2内部で外部DNS名を使ってアクセスすると プライベートIPアドレスに変換されるため 目的のサーバにプライベートIPでアクセスできる13

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

69

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

70

AWSの課金金の仕組みインターネット

ELB

EC2

EBS

S3

データ転送量量

ELB利利用料料データ処理理量量

インスタンスタイプ別利利用料料

EBSの利利用料料

S3の利利用料料

大半を占める

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

71

Simple Monthly Calculator

  Web上にある計算機を使って概算費用を計算できますsect  httpcalculators3amazonawscomcalc5htmllng=ja_JP

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

72

複数の価格モデル

 課金金モデルが選べるsect 通常の時間課金金のオンデマンドインスタンス

sect ある程度度継続してEC2を使う(1年年3年年)EC2リザーブドインスタンス

sect 入札を利利用してより安く使うEC2スポットインスタンス

rarrマイスターシリーズ RIampスポットインスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

73

AWS無料料試用枠

  AWSでは無料料試用枠を用意していますbull  httpawsamazoncomjpfreeemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

74

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

75

Appendix

  参考資料料bull  Amazon Glacier Developer Guidehttpdocsamazonwebservicescomamazonglacierlatestdevintroductionhtml

bull  Amazon Glacier FAQhttpawsamazoncomjpglacierfaqs

bull  Amazon Glaceir価格httpawsamazoncomjpglacierpricing

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

76

QampA

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 36: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

36

EIPの使いどころ

  通常のケースはEIPは必要なくEC2のPublic DNS名を用いてCNAMEで名前変換を行行う

  Route 53(名前解決サービス)でPublic DNSを用いる

  固定IPアドレスが必要なときに限りEIPを用いる   メールサーバー監視サーバー等

  メールサーバの送信制限解除逆引き申請が必要な場合は下記から申請を行行うhttpsaws-‐‑‒portalamazoncomgpawshtml-‐‑‒forms-‐‑‒controllercontactusec2-‐‑‒email-‐‑‒limit-‐‑‒rdns-‐‑‒request

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

37

リージョン間コピー(AMIEBS)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

38

Amazon EC2の関連サービス関連情報   監視負荷分散自動スケール

rarrCloudWatchELBAutoScaling   閉域網での利利用仮想ネットワーキング

rarrAmazon VPC (Virtual Private Cloud)   ① 社内ネットワークからVPN接続   ② ルーティングイントラIPアドレス仮想NIC等々

  占有サーバ rarrAmazon Dedicated Instance   専用線接続 rarrAmazon Direct Connect   Windowsemsp emsp  rarrWindowsインスタンス   スパコンrarrHPCインスタンス   アクセス管理理emsp  rarrIAM (Identity and Access Management)   料料金金関係emsp  rarrConsolidated Billing資料料集emsp httpawsamazoncomjpaws-‐‑‒meister

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

39

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

40

AWSのセキュリティの考え方

第三者認証

SOC 1SSAE 16ISAE 3402 ISO 27001 PCI DSS HIPAA ITAR

FISMA Moderate FIPS 140-2 ファシリティ

DC電源ネットワーク冗長化

Your Apps

Webサイトアプリケーションこれまでと同様のセキュリティを

お客様SI様で実現可能

インフラよりハイレベルの

セキュリティをAWSが提供

シェアードレスポンシビリティモデル(責任共有モデル)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

41

EC2の責任共有モデル

物理インタフェース

ファイアウォール

      ハイバーバイザー

Sm

all

Larg

e

hellip

Sm

all Amazon EC2

インスタンス

物理ホスト

ユーザーが 責任を持って 管理する

AWSが 責任を持って 管理する

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

42

ファイアウォールを実現するSecurity Group

  インスタンスのINOUTトラフィックを制限するファイアウォール機能

  デフォルトIN向けは全トラフィック閉

  必要な受信アクセスに対してアクセスルールを定義する

bull  プロトコル( TCPUDP)bull  宛先ポートbull  アクセス元IP Security Group

  ルールをひとまとめにしたテンプレートを Security Groupと呼ぶ

EC2 インスタンス

ポート22(SSH)

ポート80(HTTP)

EC2ファイアウォール

Security Group

ポート25(SMTP)

ポート22(SSH)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

43

Security Groupの使い方   インスタンスの用途に応じたSecurity Groupを用意する

bull  Webサーバ用DBサーバ用メールサーバ用等   アクセス元にSecurity Groupも設定して限定可能

Webサーバ

Webサーバ

DBサーバ

sg-1234

22 00000 80 00000 25 sg-1234

sg-1234

sg-1234

sg-abcd sg-abcd

22 00000 3306 sg-1234

Webサーバ

sg-xyz

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

44

セキュリティ証明書

仮想サーバ(Amazon EC2)Windows( スタンダード)

コマンドライン SDK利利用

SSH公開鍵認証

仮想デスクトップ

ターミナル

REST SOAPAPI

Webコンソール

①EC2インスタンスへのアクセスrarr鍵認証

②Webコンソールへのアクセス

rarrパスワード認証 多要素認証 IAM

③APIへのアクセスrarrアクセスキー X509証明書 IAM

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

45

Key Pair(キーペア)を用いた鍵認証   鍵認証はユーザ名パスワードの認証よりも安全な認証方式

ダウンロードされた秘密鍵

①キーペア作成

②インスタンス起動時にemsp emsp emsp 公開鍵をコピー

公開鍵

③公開鍵秘密鍵のペアが合致するとログイン可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

46

EC2のSLA13

sect  EC2の可用性が9995 sect 上記に満たない場合はServiceクレジットを返還する

sect 詳細は sect  httpawsamazoncomec2-sla

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

47

AWSセキュリティセンター 13

 日本語のホワイトペーパー bull  セキュリティ概要 bull  リスクとコンプライアンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

48

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

49

最近追加された機能

  VM Import for Linux   IAM EC2 Resource Permissions   リザーブドインスタンスの変更更可能に   SR-‐‑‒IOVネットワークDriverネットワーク性能向上

bull  C3 I2 R3インスタンスで対応

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

50

インスタンスのさらなる追加

  一般的な目的なら M3   Compute Optimizedなら C3   Memory Optimizedなら R3(もうすぐ)   GPUが必要なら G2   IOPS重視なら I2   Disk Based Storage ならHS1

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

51

Intel Processor Features

  m3 c3 cc2 g2 cr1 i2 r3の全てが対応

  AES New Instructions (AES-‐‑‒NI)bull  c1 cg1 m2でも対応

  Advanced Vector Extensions (Intel AVX)bull  HVMでのみ対応

  Turbo Boost Technology

  詳細は httpawsamazoncomec2instance-‐‑‒types

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

52

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

53

故障のための設計 Design for Failure   故障に備えた設計をしておく

  すべてが故障しうると考えシステム全体での保守的設計   SPOF(単一障害点)の排除   障害からの復復旧(対応品質)を重視する

  EC2における故障のための設計   AMIを常にとっておく   EBSスナップショットでバックアップ   複数アベイラビリティゾーンへの分散   ELBでサーバを冗長化Auto Scalingで自動復復帰   Reserved Instanceでキャパシティ保障

  他の冗長性高いサービスとの組み合わせ   S3 SimpleDB RDS他

httpwwwslidesharenetkentamagawaaws-‐‑‒7991623

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

54

定期的なバックアップ

  EC2のAMIを定期的に作成する   (参考) 無停止でAMI取得

Cloudpackさんブログhttpblogcloudpackjp201103aws-‐‑‒news-‐‑‒ec2-‐‑‒instance-‐‑‒no-‐‑‒reboot-‐‑‒amihtml

  データボリュームとしてのEBSの場合EBSのスナップショットを定期的に作成

  スクリプトを書いて定期的なバックアップを行行うことも可能 Coderockさんブログ

httpblogdateofrockcom201003auto-‐‑‒backup-‐‑‒amazon-‐‑‒ebs-‐‑‒with-‐‑‒rubyhtml   サーバーワークスさんブログ

httpblogserverworkscojptech20110721awssdk-‐‑‒for-‐‑‒ruby-‐‑‒create-‐‑‒snapshot

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

55

Instance StorageにSSDを積んだインスタンスが増えてきた

  EC2のタイプによって選択できるInstance Storeは以下の通り

Instance Type Instance Store Volumesm1small 1 x 160 GBdaggerm1medium 1 x 410 GBm1large 2 x 420 GB (840 GB)m1xlarge 4 x 420 GB (1680 GB)m2xlarge 1 x 420 GBm22xlarge 1 x 850 GBm24xlarge 2 x 840 GB (1680 GB)m3medium 1 x 4 GB SSDm3large 1 x 32 GB SSDm3xlarge 2 x 40 GB SSD (80 GB)m32xlarge 2 x 80 GB SSD (160 GB)

t1micro None (use Amazon EBS volumes)

c1medium 1 x 350 GBdaggerc1xlarge 4 x 420 GB (1680 GB)

Instance Type Instance Store Volumes

c3large 2 x 16 GB SSD (32 GB)c3xlarge 2 x 40 GB SSD (80 GB)c32xlarge 2 x 80 GB SSD (160 GB)c34xlarge 2 x 160 GB SSD (320 GB)c38xlarge 2 x 320 GB SSD (640 GB)cc28xlarge 4 x 840 GB (3360 GB)cg14xlarge 2 x 840 GB (1680 GB)cr18xlarge 2 x 120 GB SSD (240 GB)hi14xlarge 2 x 1024 GB SSD (2048 GB)hs18xlarge 24 x 2048 GB (49 TB)i2xlarge 1 x 800 GB SSDi22xlarge 2 x 800 GB SSD (1600 GB)i24xlarge 4 x 800 GB SSD (3200 GB)i28xlarge 8 x 800 GB SSD (6400 GB)

2014年年1月29日時点

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

56

Instance Storageを使うべきなのは

 高IOPS高帯域なストレージが必要な場合

 消えても良良い一次データの置き場として使う場合

 ストレージ冗長化を準備できる場合

S3活かしたいメリット

考慮すべき制約

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

57

EC2へのファイル転送は

  SCPを使う scp pk-‐‑‒XXXpem rootec2-‐‑‒XXXamazonawscomxxx

  Windowsの場合はWinSCPなど   S3経由で共有する

  S3にアップロードしEC2からwgetでアクセスする   FTPを立立ち上げる

  EC2側でFTPサーバーを立立ち上げておく

  高速に送信したい   Tsunami UDP Aspera等のソリューション

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

58

VM Import Export

  複数プラットフォームのVMイメージをAmazon EC2に移行行(インポートエクスポート)可能

httpawstypepadcomaws_japan201012vm-‐‑‒import-‐‑‒bring-‐‑‒your-‐‑‒vmware-‐‑‒images-‐‑‒to-‐‑‒the-‐‑‒cloudhtml

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

59

稼働EC2インスタンスからメタデータ取得

  ami-‐‑‒id   ami-‐‑‒launch-‐‑‒index   ami-‐‑‒manifest-‐‑‒path   block-‐‑‒device-‐‑‒mapping   hostname   instance-‐‑‒action   instance-‐‑‒id   Instance-‐‑‒type   kernel-‐‑‒id

  local-‐‑‒hostname   local-‐‑‒ipv4   mac   network   placement   profile   public-‐‑‒hostname   public-‐‑‒ipv4   public-‐‑‒keys   reservation-‐‑‒id

curl http169254169254latestmeta-‐‑‒data

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

60

起動時にパラメーターを渡す   起動時に16KB以内で任意のものを渡せる

  ChefやPuppetなどを利利用して自己構成できるAMIに   参照emsp AWSマイスターemsp CloudFormation資料料httpwwwslidesharenetkentamagawacloudformation-‐‑‒aws5

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

61

EC2コマンドラインツール amp AWS SDKs

  コマンドラインからEC2のAPIにアクセスできるツール   ツールをインストールしセキュリティ証明書を配置

  AWS SDKs httpawsamazoncomcode

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

62

マネージメントコンソールだけでなくAPIからプログラマブルにアクセス

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1a --instance-type m1small

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1b --instance-type m1small

Tokyo リージョン

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

63

EC2のスケジュールイベント表示機能

  EC2インスタンスが稼働しているハードかソフトにメンテナンスが必要な場合に情報を提供する仕組み

  インスタンスリブートシステムリブートリタイヤ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

64

EC2のステータスチェック機能

  下記の2種類のチェックを自動テストで実行行し情報を提示   システムステータスチェック

  EC2インスタンスにネットワークパケットが通るかチェック   インスタンスステータスチェック

  EC2インスタンスのOSがネットワークパケットを受け取るかチェック

  もし状況に乖離離がある場合はレポートできます

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

65

AWS制限増加申請

  EC2を誤って大量量に作成しないよう最大インスタンス数の上限を20に制限しています

  制限増加申請フォームで各種制限の増加を行行えますbull  httpawsamazoncomjpcontact-‐‑‒usemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

66

既存EBSボリュームのサイズ変更更

  例例 10GB -‐‑‒gt 100GB変更更への流流れ   EBSをデタッチする   EBSからS3にスナップショットを作成する

  新たなボリュームサイズを指定してEBSを作成する

  EBSをアタッチする   マウントしてリサイズする

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

スナップショット

EBS (10GB)

EBS (100GB)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

67

EBSとS3

EBSは複数EC2にアタッチ不不可   単独のEC2インスタンスへのブロックデバイスとしての使い方

  NFSのような使い方をする際はEC2にミドルウェアを導入(GlusterFS等)

S3は複数のEC2からアクセス可   ただしWrite Once Read A Lotな使い方に向いている

  アップロード並列列化も使える   耐久性の設計は99999999999で非常に高い

Copyright copy 2011 Amazon Web Services

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

バケット

EBS

EC2インスタンス

HTTPHTTPS

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

68

EIP使用時の注意点

  グローバルIP(EIP)を用いた場合インターネット経由のアクセスとなり課金発生するケースがある

  名前解決したいサーバに固定IPを付与する13   各サーバは固定グローバルIPを元に

AWSのDNSに名前を問い合わせ13   問い合わせた結果返ってくる外部DNS名でサーバにアクセスを行う13   EC2内部で外部DNS名を使ってアクセスすると プライベートIPアドレスに変換されるため 目的のサーバにプライベートIPでアクセスできる13

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

69

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

70

AWSの課金金の仕組みインターネット

ELB

EC2

EBS

S3

データ転送量量

ELB利利用料料データ処理理量量

インスタンスタイプ別利利用料料

EBSの利利用料料

S3の利利用料料

大半を占める

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

71

Simple Monthly Calculator

  Web上にある計算機を使って概算費用を計算できますsect  httpcalculators3amazonawscomcalc5htmllng=ja_JP

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

72

複数の価格モデル

 課金金モデルが選べるsect 通常の時間課金金のオンデマンドインスタンス

sect ある程度度継続してEC2を使う(1年年3年年)EC2リザーブドインスタンス

sect 入札を利利用してより安く使うEC2スポットインスタンス

rarrマイスターシリーズ RIampスポットインスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

73

AWS無料料試用枠

  AWSでは無料料試用枠を用意していますbull  httpawsamazoncomjpfreeemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

74

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

75

Appendix

  参考資料料bull  Amazon Glacier Developer Guidehttpdocsamazonwebservicescomamazonglacierlatestdevintroductionhtml

bull  Amazon Glacier FAQhttpawsamazoncomjpglacierfaqs

bull  Amazon Glaceir価格httpawsamazoncomjpglacierpricing

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

76

QampA

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 37: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

37

リージョン間コピー(AMIEBS)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

38

Amazon EC2の関連サービス関連情報   監視負荷分散自動スケール

rarrCloudWatchELBAutoScaling   閉域網での利利用仮想ネットワーキング

rarrAmazon VPC (Virtual Private Cloud)   ① 社内ネットワークからVPN接続   ② ルーティングイントラIPアドレス仮想NIC等々

  占有サーバ rarrAmazon Dedicated Instance   専用線接続 rarrAmazon Direct Connect   Windowsemsp emsp  rarrWindowsインスタンス   スパコンrarrHPCインスタンス   アクセス管理理emsp  rarrIAM (Identity and Access Management)   料料金金関係emsp  rarrConsolidated Billing資料料集emsp httpawsamazoncomjpaws-‐‑‒meister

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

39

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

40

AWSのセキュリティの考え方

第三者認証

SOC 1SSAE 16ISAE 3402 ISO 27001 PCI DSS HIPAA ITAR

FISMA Moderate FIPS 140-2 ファシリティ

DC電源ネットワーク冗長化

Your Apps

Webサイトアプリケーションこれまでと同様のセキュリティを

お客様SI様で実現可能

インフラよりハイレベルの

セキュリティをAWSが提供

シェアードレスポンシビリティモデル(責任共有モデル)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

41

EC2の責任共有モデル

物理インタフェース

ファイアウォール

      ハイバーバイザー

Sm

all

Larg

e

hellip

Sm

all Amazon EC2

インスタンス

物理ホスト

ユーザーが 責任を持って 管理する

AWSが 責任を持って 管理する

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

42

ファイアウォールを実現するSecurity Group

  インスタンスのINOUTトラフィックを制限するファイアウォール機能

  デフォルトIN向けは全トラフィック閉

  必要な受信アクセスに対してアクセスルールを定義する

bull  プロトコル( TCPUDP)bull  宛先ポートbull  アクセス元IP Security Group

  ルールをひとまとめにしたテンプレートを Security Groupと呼ぶ

EC2 インスタンス

ポート22(SSH)

ポート80(HTTP)

EC2ファイアウォール

Security Group

ポート25(SMTP)

ポート22(SSH)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

43

Security Groupの使い方   インスタンスの用途に応じたSecurity Groupを用意する

bull  Webサーバ用DBサーバ用メールサーバ用等   アクセス元にSecurity Groupも設定して限定可能

Webサーバ

Webサーバ

DBサーバ

sg-1234

22 00000 80 00000 25 sg-1234

sg-1234

sg-1234

sg-abcd sg-abcd

22 00000 3306 sg-1234

Webサーバ

sg-xyz

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

44

セキュリティ証明書

仮想サーバ(Amazon EC2)Windows( スタンダード)

コマンドライン SDK利利用

SSH公開鍵認証

仮想デスクトップ

ターミナル

REST SOAPAPI

Webコンソール

①EC2インスタンスへのアクセスrarr鍵認証

②Webコンソールへのアクセス

rarrパスワード認証 多要素認証 IAM

③APIへのアクセスrarrアクセスキー X509証明書 IAM

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

45

Key Pair(キーペア)を用いた鍵認証   鍵認証はユーザ名パスワードの認証よりも安全な認証方式

ダウンロードされた秘密鍵

①キーペア作成

②インスタンス起動時にemsp emsp emsp 公開鍵をコピー

公開鍵

③公開鍵秘密鍵のペアが合致するとログイン可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

46

EC2のSLA13

sect  EC2の可用性が9995 sect 上記に満たない場合はServiceクレジットを返還する

sect 詳細は sect  httpawsamazoncomec2-sla

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

47

AWSセキュリティセンター 13

 日本語のホワイトペーパー bull  セキュリティ概要 bull  リスクとコンプライアンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

48

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

49

最近追加された機能

  VM Import for Linux   IAM EC2 Resource Permissions   リザーブドインスタンスの変更更可能に   SR-‐‑‒IOVネットワークDriverネットワーク性能向上

bull  C3 I2 R3インスタンスで対応

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

50

インスタンスのさらなる追加

  一般的な目的なら M3   Compute Optimizedなら C3   Memory Optimizedなら R3(もうすぐ)   GPUが必要なら G2   IOPS重視なら I2   Disk Based Storage ならHS1

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

51

Intel Processor Features

  m3 c3 cc2 g2 cr1 i2 r3の全てが対応

  AES New Instructions (AES-‐‑‒NI)bull  c1 cg1 m2でも対応

  Advanced Vector Extensions (Intel AVX)bull  HVMでのみ対応

  Turbo Boost Technology

  詳細は httpawsamazoncomec2instance-‐‑‒types

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

52

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

53

故障のための設計 Design for Failure   故障に備えた設計をしておく

  すべてが故障しうると考えシステム全体での保守的設計   SPOF(単一障害点)の排除   障害からの復復旧(対応品質)を重視する

  EC2における故障のための設計   AMIを常にとっておく   EBSスナップショットでバックアップ   複数アベイラビリティゾーンへの分散   ELBでサーバを冗長化Auto Scalingで自動復復帰   Reserved Instanceでキャパシティ保障

  他の冗長性高いサービスとの組み合わせ   S3 SimpleDB RDS他

httpwwwslidesharenetkentamagawaaws-‐‑‒7991623

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

54

定期的なバックアップ

  EC2のAMIを定期的に作成する   (参考) 無停止でAMI取得

Cloudpackさんブログhttpblogcloudpackjp201103aws-‐‑‒news-‐‑‒ec2-‐‑‒instance-‐‑‒no-‐‑‒reboot-‐‑‒amihtml

  データボリュームとしてのEBSの場合EBSのスナップショットを定期的に作成

  スクリプトを書いて定期的なバックアップを行行うことも可能 Coderockさんブログ

httpblogdateofrockcom201003auto-‐‑‒backup-‐‑‒amazon-‐‑‒ebs-‐‑‒with-‐‑‒rubyhtml   サーバーワークスさんブログ

httpblogserverworkscojptech20110721awssdk-‐‑‒for-‐‑‒ruby-‐‑‒create-‐‑‒snapshot

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

55

Instance StorageにSSDを積んだインスタンスが増えてきた

  EC2のタイプによって選択できるInstance Storeは以下の通り

Instance Type Instance Store Volumesm1small 1 x 160 GBdaggerm1medium 1 x 410 GBm1large 2 x 420 GB (840 GB)m1xlarge 4 x 420 GB (1680 GB)m2xlarge 1 x 420 GBm22xlarge 1 x 850 GBm24xlarge 2 x 840 GB (1680 GB)m3medium 1 x 4 GB SSDm3large 1 x 32 GB SSDm3xlarge 2 x 40 GB SSD (80 GB)m32xlarge 2 x 80 GB SSD (160 GB)

t1micro None (use Amazon EBS volumes)

c1medium 1 x 350 GBdaggerc1xlarge 4 x 420 GB (1680 GB)

Instance Type Instance Store Volumes

c3large 2 x 16 GB SSD (32 GB)c3xlarge 2 x 40 GB SSD (80 GB)c32xlarge 2 x 80 GB SSD (160 GB)c34xlarge 2 x 160 GB SSD (320 GB)c38xlarge 2 x 320 GB SSD (640 GB)cc28xlarge 4 x 840 GB (3360 GB)cg14xlarge 2 x 840 GB (1680 GB)cr18xlarge 2 x 120 GB SSD (240 GB)hi14xlarge 2 x 1024 GB SSD (2048 GB)hs18xlarge 24 x 2048 GB (49 TB)i2xlarge 1 x 800 GB SSDi22xlarge 2 x 800 GB SSD (1600 GB)i24xlarge 4 x 800 GB SSD (3200 GB)i28xlarge 8 x 800 GB SSD (6400 GB)

2014年年1月29日時点

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

56

Instance Storageを使うべきなのは

 高IOPS高帯域なストレージが必要な場合

 消えても良良い一次データの置き場として使う場合

 ストレージ冗長化を準備できる場合

S3活かしたいメリット

考慮すべき制約

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

57

EC2へのファイル転送は

  SCPを使う scp pk-‐‑‒XXXpem rootec2-‐‑‒XXXamazonawscomxxx

  Windowsの場合はWinSCPなど   S3経由で共有する

  S3にアップロードしEC2からwgetでアクセスする   FTPを立立ち上げる

  EC2側でFTPサーバーを立立ち上げておく

  高速に送信したい   Tsunami UDP Aspera等のソリューション

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

58

VM Import Export

  複数プラットフォームのVMイメージをAmazon EC2に移行行(インポートエクスポート)可能

httpawstypepadcomaws_japan201012vm-‐‑‒import-‐‑‒bring-‐‑‒your-‐‑‒vmware-‐‑‒images-‐‑‒to-‐‑‒the-‐‑‒cloudhtml

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

59

稼働EC2インスタンスからメタデータ取得

  ami-‐‑‒id   ami-‐‑‒launch-‐‑‒index   ami-‐‑‒manifest-‐‑‒path   block-‐‑‒device-‐‑‒mapping   hostname   instance-‐‑‒action   instance-‐‑‒id   Instance-‐‑‒type   kernel-‐‑‒id

  local-‐‑‒hostname   local-‐‑‒ipv4   mac   network   placement   profile   public-‐‑‒hostname   public-‐‑‒ipv4   public-‐‑‒keys   reservation-‐‑‒id

curl http169254169254latestmeta-‐‑‒data

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

60

起動時にパラメーターを渡す   起動時に16KB以内で任意のものを渡せる

  ChefやPuppetなどを利利用して自己構成できるAMIに   参照emsp AWSマイスターemsp CloudFormation資料料httpwwwslidesharenetkentamagawacloudformation-‐‑‒aws5

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

61

EC2コマンドラインツール amp AWS SDKs

  コマンドラインからEC2のAPIにアクセスできるツール   ツールをインストールしセキュリティ証明書を配置

  AWS SDKs httpawsamazoncomcode

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

62

マネージメントコンソールだけでなくAPIからプログラマブルにアクセス

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1a --instance-type m1small

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1b --instance-type m1small

Tokyo リージョン

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

63

EC2のスケジュールイベント表示機能

  EC2インスタンスが稼働しているハードかソフトにメンテナンスが必要な場合に情報を提供する仕組み

  インスタンスリブートシステムリブートリタイヤ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

64

EC2のステータスチェック機能

  下記の2種類のチェックを自動テストで実行行し情報を提示   システムステータスチェック

  EC2インスタンスにネットワークパケットが通るかチェック   インスタンスステータスチェック

  EC2インスタンスのOSがネットワークパケットを受け取るかチェック

  もし状況に乖離離がある場合はレポートできます

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

65

AWS制限増加申請

  EC2を誤って大量量に作成しないよう最大インスタンス数の上限を20に制限しています

  制限増加申請フォームで各種制限の増加を行行えますbull  httpawsamazoncomjpcontact-‐‑‒usemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

66

既存EBSボリュームのサイズ変更更

  例例 10GB -‐‑‒gt 100GB変更更への流流れ   EBSをデタッチする   EBSからS3にスナップショットを作成する

  新たなボリュームサイズを指定してEBSを作成する

  EBSをアタッチする   マウントしてリサイズする

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

スナップショット

EBS (10GB)

EBS (100GB)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

67

EBSとS3

EBSは複数EC2にアタッチ不不可   単独のEC2インスタンスへのブロックデバイスとしての使い方

  NFSのような使い方をする際はEC2にミドルウェアを導入(GlusterFS等)

S3は複数のEC2からアクセス可   ただしWrite Once Read A Lotな使い方に向いている

  アップロード並列列化も使える   耐久性の設計は99999999999で非常に高い

Copyright copy 2011 Amazon Web Services

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

バケット

EBS

EC2インスタンス

HTTPHTTPS

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

68

EIP使用時の注意点

  グローバルIP(EIP)を用いた場合インターネット経由のアクセスとなり課金発生するケースがある

  名前解決したいサーバに固定IPを付与する13   各サーバは固定グローバルIPを元に

AWSのDNSに名前を問い合わせ13   問い合わせた結果返ってくる外部DNS名でサーバにアクセスを行う13   EC2内部で外部DNS名を使ってアクセスすると プライベートIPアドレスに変換されるため 目的のサーバにプライベートIPでアクセスできる13

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

69

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

70

AWSの課金金の仕組みインターネット

ELB

EC2

EBS

S3

データ転送量量

ELB利利用料料データ処理理量量

インスタンスタイプ別利利用料料

EBSの利利用料料

S3の利利用料料

大半を占める

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

71

Simple Monthly Calculator

  Web上にある計算機を使って概算費用を計算できますsect  httpcalculators3amazonawscomcalc5htmllng=ja_JP

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

72

複数の価格モデル

 課金金モデルが選べるsect 通常の時間課金金のオンデマンドインスタンス

sect ある程度度継続してEC2を使う(1年年3年年)EC2リザーブドインスタンス

sect 入札を利利用してより安く使うEC2スポットインスタンス

rarrマイスターシリーズ RIampスポットインスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

73

AWS無料料試用枠

  AWSでは無料料試用枠を用意していますbull  httpawsamazoncomjpfreeemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

74

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

75

Appendix

  参考資料料bull  Amazon Glacier Developer Guidehttpdocsamazonwebservicescomamazonglacierlatestdevintroductionhtml

bull  Amazon Glacier FAQhttpawsamazoncomjpglacierfaqs

bull  Amazon Glaceir価格httpawsamazoncomjpglacierpricing

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

76

QampA

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 38: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

38

Amazon EC2の関連サービス関連情報   監視負荷分散自動スケール

rarrCloudWatchELBAutoScaling   閉域網での利利用仮想ネットワーキング

rarrAmazon VPC (Virtual Private Cloud)   ① 社内ネットワークからVPN接続   ② ルーティングイントラIPアドレス仮想NIC等々

  占有サーバ rarrAmazon Dedicated Instance   専用線接続 rarrAmazon Direct Connect   Windowsemsp emsp  rarrWindowsインスタンス   スパコンrarrHPCインスタンス   アクセス管理理emsp  rarrIAM (Identity and Access Management)   料料金金関係emsp  rarrConsolidated Billing資料料集emsp httpawsamazoncomjpaws-‐‑‒meister

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

39

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

40

AWSのセキュリティの考え方

第三者認証

SOC 1SSAE 16ISAE 3402 ISO 27001 PCI DSS HIPAA ITAR

FISMA Moderate FIPS 140-2 ファシリティ

DC電源ネットワーク冗長化

Your Apps

Webサイトアプリケーションこれまでと同様のセキュリティを

お客様SI様で実現可能

インフラよりハイレベルの

セキュリティをAWSが提供

シェアードレスポンシビリティモデル(責任共有モデル)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

41

EC2の責任共有モデル

物理インタフェース

ファイアウォール

      ハイバーバイザー

Sm

all

Larg

e

hellip

Sm

all Amazon EC2

インスタンス

物理ホスト

ユーザーが 責任を持って 管理する

AWSが 責任を持って 管理する

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

42

ファイアウォールを実現するSecurity Group

  インスタンスのINOUTトラフィックを制限するファイアウォール機能

  デフォルトIN向けは全トラフィック閉

  必要な受信アクセスに対してアクセスルールを定義する

bull  プロトコル( TCPUDP)bull  宛先ポートbull  アクセス元IP Security Group

  ルールをひとまとめにしたテンプレートを Security Groupと呼ぶ

EC2 インスタンス

ポート22(SSH)

ポート80(HTTP)

EC2ファイアウォール

Security Group

ポート25(SMTP)

ポート22(SSH)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

43

Security Groupの使い方   インスタンスの用途に応じたSecurity Groupを用意する

bull  Webサーバ用DBサーバ用メールサーバ用等   アクセス元にSecurity Groupも設定して限定可能

Webサーバ

Webサーバ

DBサーバ

sg-1234

22 00000 80 00000 25 sg-1234

sg-1234

sg-1234

sg-abcd sg-abcd

22 00000 3306 sg-1234

Webサーバ

sg-xyz

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

44

セキュリティ証明書

仮想サーバ(Amazon EC2)Windows( スタンダード)

コマンドライン SDK利利用

SSH公開鍵認証

仮想デスクトップ

ターミナル

REST SOAPAPI

Webコンソール

①EC2インスタンスへのアクセスrarr鍵認証

②Webコンソールへのアクセス

rarrパスワード認証 多要素認証 IAM

③APIへのアクセスrarrアクセスキー X509証明書 IAM

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

45

Key Pair(キーペア)を用いた鍵認証   鍵認証はユーザ名パスワードの認証よりも安全な認証方式

ダウンロードされた秘密鍵

①キーペア作成

②インスタンス起動時にemsp emsp emsp 公開鍵をコピー

公開鍵

③公開鍵秘密鍵のペアが合致するとログイン可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

46

EC2のSLA13

sect  EC2の可用性が9995 sect 上記に満たない場合はServiceクレジットを返還する

sect 詳細は sect  httpawsamazoncomec2-sla

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

47

AWSセキュリティセンター 13

 日本語のホワイトペーパー bull  セキュリティ概要 bull  リスクとコンプライアンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

48

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

49

最近追加された機能

  VM Import for Linux   IAM EC2 Resource Permissions   リザーブドインスタンスの変更更可能に   SR-‐‑‒IOVネットワークDriverネットワーク性能向上

bull  C3 I2 R3インスタンスで対応

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

50

インスタンスのさらなる追加

  一般的な目的なら M3   Compute Optimizedなら C3   Memory Optimizedなら R3(もうすぐ)   GPUが必要なら G2   IOPS重視なら I2   Disk Based Storage ならHS1

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

51

Intel Processor Features

  m3 c3 cc2 g2 cr1 i2 r3の全てが対応

  AES New Instructions (AES-‐‑‒NI)bull  c1 cg1 m2でも対応

  Advanced Vector Extensions (Intel AVX)bull  HVMでのみ対応

  Turbo Boost Technology

  詳細は httpawsamazoncomec2instance-‐‑‒types

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

52

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

53

故障のための設計 Design for Failure   故障に備えた設計をしておく

  すべてが故障しうると考えシステム全体での保守的設計   SPOF(単一障害点)の排除   障害からの復復旧(対応品質)を重視する

  EC2における故障のための設計   AMIを常にとっておく   EBSスナップショットでバックアップ   複数アベイラビリティゾーンへの分散   ELBでサーバを冗長化Auto Scalingで自動復復帰   Reserved Instanceでキャパシティ保障

  他の冗長性高いサービスとの組み合わせ   S3 SimpleDB RDS他

httpwwwslidesharenetkentamagawaaws-‐‑‒7991623

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

54

定期的なバックアップ

  EC2のAMIを定期的に作成する   (参考) 無停止でAMI取得

Cloudpackさんブログhttpblogcloudpackjp201103aws-‐‑‒news-‐‑‒ec2-‐‑‒instance-‐‑‒no-‐‑‒reboot-‐‑‒amihtml

  データボリュームとしてのEBSの場合EBSのスナップショットを定期的に作成

  スクリプトを書いて定期的なバックアップを行行うことも可能 Coderockさんブログ

httpblogdateofrockcom201003auto-‐‑‒backup-‐‑‒amazon-‐‑‒ebs-‐‑‒with-‐‑‒rubyhtml   サーバーワークスさんブログ

httpblogserverworkscojptech20110721awssdk-‐‑‒for-‐‑‒ruby-‐‑‒create-‐‑‒snapshot

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

55

Instance StorageにSSDを積んだインスタンスが増えてきた

  EC2のタイプによって選択できるInstance Storeは以下の通り

Instance Type Instance Store Volumesm1small 1 x 160 GBdaggerm1medium 1 x 410 GBm1large 2 x 420 GB (840 GB)m1xlarge 4 x 420 GB (1680 GB)m2xlarge 1 x 420 GBm22xlarge 1 x 850 GBm24xlarge 2 x 840 GB (1680 GB)m3medium 1 x 4 GB SSDm3large 1 x 32 GB SSDm3xlarge 2 x 40 GB SSD (80 GB)m32xlarge 2 x 80 GB SSD (160 GB)

t1micro None (use Amazon EBS volumes)

c1medium 1 x 350 GBdaggerc1xlarge 4 x 420 GB (1680 GB)

Instance Type Instance Store Volumes

c3large 2 x 16 GB SSD (32 GB)c3xlarge 2 x 40 GB SSD (80 GB)c32xlarge 2 x 80 GB SSD (160 GB)c34xlarge 2 x 160 GB SSD (320 GB)c38xlarge 2 x 320 GB SSD (640 GB)cc28xlarge 4 x 840 GB (3360 GB)cg14xlarge 2 x 840 GB (1680 GB)cr18xlarge 2 x 120 GB SSD (240 GB)hi14xlarge 2 x 1024 GB SSD (2048 GB)hs18xlarge 24 x 2048 GB (49 TB)i2xlarge 1 x 800 GB SSDi22xlarge 2 x 800 GB SSD (1600 GB)i24xlarge 4 x 800 GB SSD (3200 GB)i28xlarge 8 x 800 GB SSD (6400 GB)

2014年年1月29日時点

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

56

Instance Storageを使うべきなのは

 高IOPS高帯域なストレージが必要な場合

 消えても良良い一次データの置き場として使う場合

 ストレージ冗長化を準備できる場合

S3活かしたいメリット

考慮すべき制約

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

57

EC2へのファイル転送は

  SCPを使う scp pk-‐‑‒XXXpem rootec2-‐‑‒XXXamazonawscomxxx

  Windowsの場合はWinSCPなど   S3経由で共有する

  S3にアップロードしEC2からwgetでアクセスする   FTPを立立ち上げる

  EC2側でFTPサーバーを立立ち上げておく

  高速に送信したい   Tsunami UDP Aspera等のソリューション

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

58

VM Import Export

  複数プラットフォームのVMイメージをAmazon EC2に移行行(インポートエクスポート)可能

httpawstypepadcomaws_japan201012vm-‐‑‒import-‐‑‒bring-‐‑‒your-‐‑‒vmware-‐‑‒images-‐‑‒to-‐‑‒the-‐‑‒cloudhtml

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

59

稼働EC2インスタンスからメタデータ取得

  ami-‐‑‒id   ami-‐‑‒launch-‐‑‒index   ami-‐‑‒manifest-‐‑‒path   block-‐‑‒device-‐‑‒mapping   hostname   instance-‐‑‒action   instance-‐‑‒id   Instance-‐‑‒type   kernel-‐‑‒id

  local-‐‑‒hostname   local-‐‑‒ipv4   mac   network   placement   profile   public-‐‑‒hostname   public-‐‑‒ipv4   public-‐‑‒keys   reservation-‐‑‒id

curl http169254169254latestmeta-‐‑‒data

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

60

起動時にパラメーターを渡す   起動時に16KB以内で任意のものを渡せる

  ChefやPuppetなどを利利用して自己構成できるAMIに   参照emsp AWSマイスターemsp CloudFormation資料料httpwwwslidesharenetkentamagawacloudformation-‐‑‒aws5

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

61

EC2コマンドラインツール amp AWS SDKs

  コマンドラインからEC2のAPIにアクセスできるツール   ツールをインストールしセキュリティ証明書を配置

  AWS SDKs httpawsamazoncomcode

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

62

マネージメントコンソールだけでなくAPIからプログラマブルにアクセス

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1a --instance-type m1small

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1b --instance-type m1small

Tokyo リージョン

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

63

EC2のスケジュールイベント表示機能

  EC2インスタンスが稼働しているハードかソフトにメンテナンスが必要な場合に情報を提供する仕組み

  インスタンスリブートシステムリブートリタイヤ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

64

EC2のステータスチェック機能

  下記の2種類のチェックを自動テストで実行行し情報を提示   システムステータスチェック

  EC2インスタンスにネットワークパケットが通るかチェック   インスタンスステータスチェック

  EC2インスタンスのOSがネットワークパケットを受け取るかチェック

  もし状況に乖離離がある場合はレポートできます

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

65

AWS制限増加申請

  EC2を誤って大量量に作成しないよう最大インスタンス数の上限を20に制限しています

  制限増加申請フォームで各種制限の増加を行行えますbull  httpawsamazoncomjpcontact-‐‑‒usemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

66

既存EBSボリュームのサイズ変更更

  例例 10GB -‐‑‒gt 100GB変更更への流流れ   EBSをデタッチする   EBSからS3にスナップショットを作成する

  新たなボリュームサイズを指定してEBSを作成する

  EBSをアタッチする   マウントしてリサイズする

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

スナップショット

EBS (10GB)

EBS (100GB)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

67

EBSとS3

EBSは複数EC2にアタッチ不不可   単独のEC2インスタンスへのブロックデバイスとしての使い方

  NFSのような使い方をする際はEC2にミドルウェアを導入(GlusterFS等)

S3は複数のEC2からアクセス可   ただしWrite Once Read A Lotな使い方に向いている

  アップロード並列列化も使える   耐久性の設計は99999999999で非常に高い

Copyright copy 2011 Amazon Web Services

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

バケット

EBS

EC2インスタンス

HTTPHTTPS

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

68

EIP使用時の注意点

  グローバルIP(EIP)を用いた場合インターネット経由のアクセスとなり課金発生するケースがある

  名前解決したいサーバに固定IPを付与する13   各サーバは固定グローバルIPを元に

AWSのDNSに名前を問い合わせ13   問い合わせた結果返ってくる外部DNS名でサーバにアクセスを行う13   EC2内部で外部DNS名を使ってアクセスすると プライベートIPアドレスに変換されるため 目的のサーバにプライベートIPでアクセスできる13

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

69

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

70

AWSの課金金の仕組みインターネット

ELB

EC2

EBS

S3

データ転送量量

ELB利利用料料データ処理理量量

インスタンスタイプ別利利用料料

EBSの利利用料料

S3の利利用料料

大半を占める

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

71

Simple Monthly Calculator

  Web上にある計算機を使って概算費用を計算できますsect  httpcalculators3amazonawscomcalc5htmllng=ja_JP

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

72

複数の価格モデル

 課金金モデルが選べるsect 通常の時間課金金のオンデマンドインスタンス

sect ある程度度継続してEC2を使う(1年年3年年)EC2リザーブドインスタンス

sect 入札を利利用してより安く使うEC2スポットインスタンス

rarrマイスターシリーズ RIampスポットインスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

73

AWS無料料試用枠

  AWSでは無料料試用枠を用意していますbull  httpawsamazoncomjpfreeemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

74

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

75

Appendix

  参考資料料bull  Amazon Glacier Developer Guidehttpdocsamazonwebservicescomamazonglacierlatestdevintroductionhtml

bull  Amazon Glacier FAQhttpawsamazoncomjpglacierfaqs

bull  Amazon Glaceir価格httpawsamazoncomjpglacierpricing

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

76

QampA

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 39: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

39

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

40

AWSのセキュリティの考え方

第三者認証

SOC 1SSAE 16ISAE 3402 ISO 27001 PCI DSS HIPAA ITAR

FISMA Moderate FIPS 140-2 ファシリティ

DC電源ネットワーク冗長化

Your Apps

Webサイトアプリケーションこれまでと同様のセキュリティを

お客様SI様で実現可能

インフラよりハイレベルの

セキュリティをAWSが提供

シェアードレスポンシビリティモデル(責任共有モデル)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

41

EC2の責任共有モデル

物理インタフェース

ファイアウォール

      ハイバーバイザー

Sm

all

Larg

e

hellip

Sm

all Amazon EC2

インスタンス

物理ホスト

ユーザーが 責任を持って 管理する

AWSが 責任を持って 管理する

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

42

ファイアウォールを実現するSecurity Group

  インスタンスのINOUTトラフィックを制限するファイアウォール機能

  デフォルトIN向けは全トラフィック閉

  必要な受信アクセスに対してアクセスルールを定義する

bull  プロトコル( TCPUDP)bull  宛先ポートbull  アクセス元IP Security Group

  ルールをひとまとめにしたテンプレートを Security Groupと呼ぶ

EC2 インスタンス

ポート22(SSH)

ポート80(HTTP)

EC2ファイアウォール

Security Group

ポート25(SMTP)

ポート22(SSH)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

43

Security Groupの使い方   インスタンスの用途に応じたSecurity Groupを用意する

bull  Webサーバ用DBサーバ用メールサーバ用等   アクセス元にSecurity Groupも設定して限定可能

Webサーバ

Webサーバ

DBサーバ

sg-1234

22 00000 80 00000 25 sg-1234

sg-1234

sg-1234

sg-abcd sg-abcd

22 00000 3306 sg-1234

Webサーバ

sg-xyz

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

44

セキュリティ証明書

仮想サーバ(Amazon EC2)Windows( スタンダード)

コマンドライン SDK利利用

SSH公開鍵認証

仮想デスクトップ

ターミナル

REST SOAPAPI

Webコンソール

①EC2インスタンスへのアクセスrarr鍵認証

②Webコンソールへのアクセス

rarrパスワード認証 多要素認証 IAM

③APIへのアクセスrarrアクセスキー X509証明書 IAM

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

45

Key Pair(キーペア)を用いた鍵認証   鍵認証はユーザ名パスワードの認証よりも安全な認証方式

ダウンロードされた秘密鍵

①キーペア作成

②インスタンス起動時にemsp emsp emsp 公開鍵をコピー

公開鍵

③公開鍵秘密鍵のペアが合致するとログイン可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

46

EC2のSLA13

sect  EC2の可用性が9995 sect 上記に満たない場合はServiceクレジットを返還する

sect 詳細は sect  httpawsamazoncomec2-sla

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

47

AWSセキュリティセンター 13

 日本語のホワイトペーパー bull  セキュリティ概要 bull  リスクとコンプライアンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

48

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

49

最近追加された機能

  VM Import for Linux   IAM EC2 Resource Permissions   リザーブドインスタンスの変更更可能に   SR-‐‑‒IOVネットワークDriverネットワーク性能向上

bull  C3 I2 R3インスタンスで対応

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

50

インスタンスのさらなる追加

  一般的な目的なら M3   Compute Optimizedなら C3   Memory Optimizedなら R3(もうすぐ)   GPUが必要なら G2   IOPS重視なら I2   Disk Based Storage ならHS1

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

51

Intel Processor Features

  m3 c3 cc2 g2 cr1 i2 r3の全てが対応

  AES New Instructions (AES-‐‑‒NI)bull  c1 cg1 m2でも対応

  Advanced Vector Extensions (Intel AVX)bull  HVMでのみ対応

  Turbo Boost Technology

  詳細は httpawsamazoncomec2instance-‐‑‒types

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

52

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

53

故障のための設計 Design for Failure   故障に備えた設計をしておく

  すべてが故障しうると考えシステム全体での保守的設計   SPOF(単一障害点)の排除   障害からの復復旧(対応品質)を重視する

  EC2における故障のための設計   AMIを常にとっておく   EBSスナップショットでバックアップ   複数アベイラビリティゾーンへの分散   ELBでサーバを冗長化Auto Scalingで自動復復帰   Reserved Instanceでキャパシティ保障

  他の冗長性高いサービスとの組み合わせ   S3 SimpleDB RDS他

httpwwwslidesharenetkentamagawaaws-‐‑‒7991623

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

54

定期的なバックアップ

  EC2のAMIを定期的に作成する   (参考) 無停止でAMI取得

Cloudpackさんブログhttpblogcloudpackjp201103aws-‐‑‒news-‐‑‒ec2-‐‑‒instance-‐‑‒no-‐‑‒reboot-‐‑‒amihtml

  データボリュームとしてのEBSの場合EBSのスナップショットを定期的に作成

  スクリプトを書いて定期的なバックアップを行行うことも可能 Coderockさんブログ

httpblogdateofrockcom201003auto-‐‑‒backup-‐‑‒amazon-‐‑‒ebs-‐‑‒with-‐‑‒rubyhtml   サーバーワークスさんブログ

httpblogserverworkscojptech20110721awssdk-‐‑‒for-‐‑‒ruby-‐‑‒create-‐‑‒snapshot

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

55

Instance StorageにSSDを積んだインスタンスが増えてきた

  EC2のタイプによって選択できるInstance Storeは以下の通り

Instance Type Instance Store Volumesm1small 1 x 160 GBdaggerm1medium 1 x 410 GBm1large 2 x 420 GB (840 GB)m1xlarge 4 x 420 GB (1680 GB)m2xlarge 1 x 420 GBm22xlarge 1 x 850 GBm24xlarge 2 x 840 GB (1680 GB)m3medium 1 x 4 GB SSDm3large 1 x 32 GB SSDm3xlarge 2 x 40 GB SSD (80 GB)m32xlarge 2 x 80 GB SSD (160 GB)

t1micro None (use Amazon EBS volumes)

c1medium 1 x 350 GBdaggerc1xlarge 4 x 420 GB (1680 GB)

Instance Type Instance Store Volumes

c3large 2 x 16 GB SSD (32 GB)c3xlarge 2 x 40 GB SSD (80 GB)c32xlarge 2 x 80 GB SSD (160 GB)c34xlarge 2 x 160 GB SSD (320 GB)c38xlarge 2 x 320 GB SSD (640 GB)cc28xlarge 4 x 840 GB (3360 GB)cg14xlarge 2 x 840 GB (1680 GB)cr18xlarge 2 x 120 GB SSD (240 GB)hi14xlarge 2 x 1024 GB SSD (2048 GB)hs18xlarge 24 x 2048 GB (49 TB)i2xlarge 1 x 800 GB SSDi22xlarge 2 x 800 GB SSD (1600 GB)i24xlarge 4 x 800 GB SSD (3200 GB)i28xlarge 8 x 800 GB SSD (6400 GB)

2014年年1月29日時点

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

56

Instance Storageを使うべきなのは

 高IOPS高帯域なストレージが必要な場合

 消えても良良い一次データの置き場として使う場合

 ストレージ冗長化を準備できる場合

S3活かしたいメリット

考慮すべき制約

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

57

EC2へのファイル転送は

  SCPを使う scp pk-‐‑‒XXXpem rootec2-‐‑‒XXXamazonawscomxxx

  Windowsの場合はWinSCPなど   S3経由で共有する

  S3にアップロードしEC2からwgetでアクセスする   FTPを立立ち上げる

  EC2側でFTPサーバーを立立ち上げておく

  高速に送信したい   Tsunami UDP Aspera等のソリューション

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

58

VM Import Export

  複数プラットフォームのVMイメージをAmazon EC2に移行行(インポートエクスポート)可能

httpawstypepadcomaws_japan201012vm-‐‑‒import-‐‑‒bring-‐‑‒your-‐‑‒vmware-‐‑‒images-‐‑‒to-‐‑‒the-‐‑‒cloudhtml

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

59

稼働EC2インスタンスからメタデータ取得

  ami-‐‑‒id   ami-‐‑‒launch-‐‑‒index   ami-‐‑‒manifest-‐‑‒path   block-‐‑‒device-‐‑‒mapping   hostname   instance-‐‑‒action   instance-‐‑‒id   Instance-‐‑‒type   kernel-‐‑‒id

  local-‐‑‒hostname   local-‐‑‒ipv4   mac   network   placement   profile   public-‐‑‒hostname   public-‐‑‒ipv4   public-‐‑‒keys   reservation-‐‑‒id

curl http169254169254latestmeta-‐‑‒data

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

60

起動時にパラメーターを渡す   起動時に16KB以内で任意のものを渡せる

  ChefやPuppetなどを利利用して自己構成できるAMIに   参照emsp AWSマイスターemsp CloudFormation資料料httpwwwslidesharenetkentamagawacloudformation-‐‑‒aws5

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

61

EC2コマンドラインツール amp AWS SDKs

  コマンドラインからEC2のAPIにアクセスできるツール   ツールをインストールしセキュリティ証明書を配置

  AWS SDKs httpawsamazoncomcode

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

62

マネージメントコンソールだけでなくAPIからプログラマブルにアクセス

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1a --instance-type m1small

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1b --instance-type m1small

Tokyo リージョン

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

63

EC2のスケジュールイベント表示機能

  EC2インスタンスが稼働しているハードかソフトにメンテナンスが必要な場合に情報を提供する仕組み

  インスタンスリブートシステムリブートリタイヤ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

64

EC2のステータスチェック機能

  下記の2種類のチェックを自動テストで実行行し情報を提示   システムステータスチェック

  EC2インスタンスにネットワークパケットが通るかチェック   インスタンスステータスチェック

  EC2インスタンスのOSがネットワークパケットを受け取るかチェック

  もし状況に乖離離がある場合はレポートできます

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

65

AWS制限増加申請

  EC2を誤って大量量に作成しないよう最大インスタンス数の上限を20に制限しています

  制限増加申請フォームで各種制限の増加を行行えますbull  httpawsamazoncomjpcontact-‐‑‒usemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

66

既存EBSボリュームのサイズ変更更

  例例 10GB -‐‑‒gt 100GB変更更への流流れ   EBSをデタッチする   EBSからS3にスナップショットを作成する

  新たなボリュームサイズを指定してEBSを作成する

  EBSをアタッチする   マウントしてリサイズする

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

スナップショット

EBS (10GB)

EBS (100GB)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

67

EBSとS3

EBSは複数EC2にアタッチ不不可   単独のEC2インスタンスへのブロックデバイスとしての使い方

  NFSのような使い方をする際はEC2にミドルウェアを導入(GlusterFS等)

S3は複数のEC2からアクセス可   ただしWrite Once Read A Lotな使い方に向いている

  アップロード並列列化も使える   耐久性の設計は99999999999で非常に高い

Copyright copy 2011 Amazon Web Services

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

バケット

EBS

EC2インスタンス

HTTPHTTPS

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

68

EIP使用時の注意点

  グローバルIP(EIP)を用いた場合インターネット経由のアクセスとなり課金発生するケースがある

  名前解決したいサーバに固定IPを付与する13   各サーバは固定グローバルIPを元に

AWSのDNSに名前を問い合わせ13   問い合わせた結果返ってくる外部DNS名でサーバにアクセスを行う13   EC2内部で外部DNS名を使ってアクセスすると プライベートIPアドレスに変換されるため 目的のサーバにプライベートIPでアクセスできる13

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

69

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

70

AWSの課金金の仕組みインターネット

ELB

EC2

EBS

S3

データ転送量量

ELB利利用料料データ処理理量量

インスタンスタイプ別利利用料料

EBSの利利用料料

S3の利利用料料

大半を占める

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

71

Simple Monthly Calculator

  Web上にある計算機を使って概算費用を計算できますsect  httpcalculators3amazonawscomcalc5htmllng=ja_JP

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

72

複数の価格モデル

 課金金モデルが選べるsect 通常の時間課金金のオンデマンドインスタンス

sect ある程度度継続してEC2を使う(1年年3年年)EC2リザーブドインスタンス

sect 入札を利利用してより安く使うEC2スポットインスタンス

rarrマイスターシリーズ RIampスポットインスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

73

AWS無料料試用枠

  AWSでは無料料試用枠を用意していますbull  httpawsamazoncomjpfreeemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

74

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

75

Appendix

  参考資料料bull  Amazon Glacier Developer Guidehttpdocsamazonwebservicescomamazonglacierlatestdevintroductionhtml

bull  Amazon Glacier FAQhttpawsamazoncomjpglacierfaqs

bull  Amazon Glaceir価格httpawsamazoncomjpglacierpricing

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

76

QampA

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 40: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

40

AWSのセキュリティの考え方

第三者認証

SOC 1SSAE 16ISAE 3402 ISO 27001 PCI DSS HIPAA ITAR

FISMA Moderate FIPS 140-2 ファシリティ

DC電源ネットワーク冗長化

Your Apps

Webサイトアプリケーションこれまでと同様のセキュリティを

お客様SI様で実現可能

インフラよりハイレベルの

セキュリティをAWSが提供

シェアードレスポンシビリティモデル(責任共有モデル)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

41

EC2の責任共有モデル

物理インタフェース

ファイアウォール

      ハイバーバイザー

Sm

all

Larg

e

hellip

Sm

all Amazon EC2

インスタンス

物理ホスト

ユーザーが 責任を持って 管理する

AWSが 責任を持って 管理する

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

42

ファイアウォールを実現するSecurity Group

  インスタンスのINOUTトラフィックを制限するファイアウォール機能

  デフォルトIN向けは全トラフィック閉

  必要な受信アクセスに対してアクセスルールを定義する

bull  プロトコル( TCPUDP)bull  宛先ポートbull  アクセス元IP Security Group

  ルールをひとまとめにしたテンプレートを Security Groupと呼ぶ

EC2 インスタンス

ポート22(SSH)

ポート80(HTTP)

EC2ファイアウォール

Security Group

ポート25(SMTP)

ポート22(SSH)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

43

Security Groupの使い方   インスタンスの用途に応じたSecurity Groupを用意する

bull  Webサーバ用DBサーバ用メールサーバ用等   アクセス元にSecurity Groupも設定して限定可能

Webサーバ

Webサーバ

DBサーバ

sg-1234

22 00000 80 00000 25 sg-1234

sg-1234

sg-1234

sg-abcd sg-abcd

22 00000 3306 sg-1234

Webサーバ

sg-xyz

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

44

セキュリティ証明書

仮想サーバ(Amazon EC2)Windows( スタンダード)

コマンドライン SDK利利用

SSH公開鍵認証

仮想デスクトップ

ターミナル

REST SOAPAPI

Webコンソール

①EC2インスタンスへのアクセスrarr鍵認証

②Webコンソールへのアクセス

rarrパスワード認証 多要素認証 IAM

③APIへのアクセスrarrアクセスキー X509証明書 IAM

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

45

Key Pair(キーペア)を用いた鍵認証   鍵認証はユーザ名パスワードの認証よりも安全な認証方式

ダウンロードされた秘密鍵

①キーペア作成

②インスタンス起動時にemsp emsp emsp 公開鍵をコピー

公開鍵

③公開鍵秘密鍵のペアが合致するとログイン可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

46

EC2のSLA13

sect  EC2の可用性が9995 sect 上記に満たない場合はServiceクレジットを返還する

sect 詳細は sect  httpawsamazoncomec2-sla

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

47

AWSセキュリティセンター 13

 日本語のホワイトペーパー bull  セキュリティ概要 bull  リスクとコンプライアンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

48

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

49

最近追加された機能

  VM Import for Linux   IAM EC2 Resource Permissions   リザーブドインスタンスの変更更可能に   SR-‐‑‒IOVネットワークDriverネットワーク性能向上

bull  C3 I2 R3インスタンスで対応

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

50

インスタンスのさらなる追加

  一般的な目的なら M3   Compute Optimizedなら C3   Memory Optimizedなら R3(もうすぐ)   GPUが必要なら G2   IOPS重視なら I2   Disk Based Storage ならHS1

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

51

Intel Processor Features

  m3 c3 cc2 g2 cr1 i2 r3の全てが対応

  AES New Instructions (AES-‐‑‒NI)bull  c1 cg1 m2でも対応

  Advanced Vector Extensions (Intel AVX)bull  HVMでのみ対応

  Turbo Boost Technology

  詳細は httpawsamazoncomec2instance-‐‑‒types

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

52

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

53

故障のための設計 Design for Failure   故障に備えた設計をしておく

  すべてが故障しうると考えシステム全体での保守的設計   SPOF(単一障害点)の排除   障害からの復復旧(対応品質)を重視する

  EC2における故障のための設計   AMIを常にとっておく   EBSスナップショットでバックアップ   複数アベイラビリティゾーンへの分散   ELBでサーバを冗長化Auto Scalingで自動復復帰   Reserved Instanceでキャパシティ保障

  他の冗長性高いサービスとの組み合わせ   S3 SimpleDB RDS他

httpwwwslidesharenetkentamagawaaws-‐‑‒7991623

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

54

定期的なバックアップ

  EC2のAMIを定期的に作成する   (参考) 無停止でAMI取得

Cloudpackさんブログhttpblogcloudpackjp201103aws-‐‑‒news-‐‑‒ec2-‐‑‒instance-‐‑‒no-‐‑‒reboot-‐‑‒amihtml

  データボリュームとしてのEBSの場合EBSのスナップショットを定期的に作成

  スクリプトを書いて定期的なバックアップを行行うことも可能 Coderockさんブログ

httpblogdateofrockcom201003auto-‐‑‒backup-‐‑‒amazon-‐‑‒ebs-‐‑‒with-‐‑‒rubyhtml   サーバーワークスさんブログ

httpblogserverworkscojptech20110721awssdk-‐‑‒for-‐‑‒ruby-‐‑‒create-‐‑‒snapshot

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

55

Instance StorageにSSDを積んだインスタンスが増えてきた

  EC2のタイプによって選択できるInstance Storeは以下の通り

Instance Type Instance Store Volumesm1small 1 x 160 GBdaggerm1medium 1 x 410 GBm1large 2 x 420 GB (840 GB)m1xlarge 4 x 420 GB (1680 GB)m2xlarge 1 x 420 GBm22xlarge 1 x 850 GBm24xlarge 2 x 840 GB (1680 GB)m3medium 1 x 4 GB SSDm3large 1 x 32 GB SSDm3xlarge 2 x 40 GB SSD (80 GB)m32xlarge 2 x 80 GB SSD (160 GB)

t1micro None (use Amazon EBS volumes)

c1medium 1 x 350 GBdaggerc1xlarge 4 x 420 GB (1680 GB)

Instance Type Instance Store Volumes

c3large 2 x 16 GB SSD (32 GB)c3xlarge 2 x 40 GB SSD (80 GB)c32xlarge 2 x 80 GB SSD (160 GB)c34xlarge 2 x 160 GB SSD (320 GB)c38xlarge 2 x 320 GB SSD (640 GB)cc28xlarge 4 x 840 GB (3360 GB)cg14xlarge 2 x 840 GB (1680 GB)cr18xlarge 2 x 120 GB SSD (240 GB)hi14xlarge 2 x 1024 GB SSD (2048 GB)hs18xlarge 24 x 2048 GB (49 TB)i2xlarge 1 x 800 GB SSDi22xlarge 2 x 800 GB SSD (1600 GB)i24xlarge 4 x 800 GB SSD (3200 GB)i28xlarge 8 x 800 GB SSD (6400 GB)

2014年年1月29日時点

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

56

Instance Storageを使うべきなのは

 高IOPS高帯域なストレージが必要な場合

 消えても良良い一次データの置き場として使う場合

 ストレージ冗長化を準備できる場合

S3活かしたいメリット

考慮すべき制約

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

57

EC2へのファイル転送は

  SCPを使う scp pk-‐‑‒XXXpem rootec2-‐‑‒XXXamazonawscomxxx

  Windowsの場合はWinSCPなど   S3経由で共有する

  S3にアップロードしEC2からwgetでアクセスする   FTPを立立ち上げる

  EC2側でFTPサーバーを立立ち上げておく

  高速に送信したい   Tsunami UDP Aspera等のソリューション

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

58

VM Import Export

  複数プラットフォームのVMイメージをAmazon EC2に移行行(インポートエクスポート)可能

httpawstypepadcomaws_japan201012vm-‐‑‒import-‐‑‒bring-‐‑‒your-‐‑‒vmware-‐‑‒images-‐‑‒to-‐‑‒the-‐‑‒cloudhtml

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

59

稼働EC2インスタンスからメタデータ取得

  ami-‐‑‒id   ami-‐‑‒launch-‐‑‒index   ami-‐‑‒manifest-‐‑‒path   block-‐‑‒device-‐‑‒mapping   hostname   instance-‐‑‒action   instance-‐‑‒id   Instance-‐‑‒type   kernel-‐‑‒id

  local-‐‑‒hostname   local-‐‑‒ipv4   mac   network   placement   profile   public-‐‑‒hostname   public-‐‑‒ipv4   public-‐‑‒keys   reservation-‐‑‒id

curl http169254169254latestmeta-‐‑‒data

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

60

起動時にパラメーターを渡す   起動時に16KB以内で任意のものを渡せる

  ChefやPuppetなどを利利用して自己構成できるAMIに   参照emsp AWSマイスターemsp CloudFormation資料料httpwwwslidesharenetkentamagawacloudformation-‐‑‒aws5

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

61

EC2コマンドラインツール amp AWS SDKs

  コマンドラインからEC2のAPIにアクセスできるツール   ツールをインストールしセキュリティ証明書を配置

  AWS SDKs httpawsamazoncomcode

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

62

マネージメントコンソールだけでなくAPIからプログラマブルにアクセス

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1a --instance-type m1small

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1b --instance-type m1small

Tokyo リージョン

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

63

EC2のスケジュールイベント表示機能

  EC2インスタンスが稼働しているハードかソフトにメンテナンスが必要な場合に情報を提供する仕組み

  インスタンスリブートシステムリブートリタイヤ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

64

EC2のステータスチェック機能

  下記の2種類のチェックを自動テストで実行行し情報を提示   システムステータスチェック

  EC2インスタンスにネットワークパケットが通るかチェック   インスタンスステータスチェック

  EC2インスタンスのOSがネットワークパケットを受け取るかチェック

  もし状況に乖離離がある場合はレポートできます

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

65

AWS制限増加申請

  EC2を誤って大量量に作成しないよう最大インスタンス数の上限を20に制限しています

  制限増加申請フォームで各種制限の増加を行行えますbull  httpawsamazoncomjpcontact-‐‑‒usemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

66

既存EBSボリュームのサイズ変更更

  例例 10GB -‐‑‒gt 100GB変更更への流流れ   EBSをデタッチする   EBSからS3にスナップショットを作成する

  新たなボリュームサイズを指定してEBSを作成する

  EBSをアタッチする   マウントしてリサイズする

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

スナップショット

EBS (10GB)

EBS (100GB)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

67

EBSとS3

EBSは複数EC2にアタッチ不不可   単独のEC2インスタンスへのブロックデバイスとしての使い方

  NFSのような使い方をする際はEC2にミドルウェアを導入(GlusterFS等)

S3は複数のEC2からアクセス可   ただしWrite Once Read A Lotな使い方に向いている

  アップロード並列列化も使える   耐久性の設計は99999999999で非常に高い

Copyright copy 2011 Amazon Web Services

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

バケット

EBS

EC2インスタンス

HTTPHTTPS

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

68

EIP使用時の注意点

  グローバルIP(EIP)を用いた場合インターネット経由のアクセスとなり課金発生するケースがある

  名前解決したいサーバに固定IPを付与する13   各サーバは固定グローバルIPを元に

AWSのDNSに名前を問い合わせ13   問い合わせた結果返ってくる外部DNS名でサーバにアクセスを行う13   EC2内部で外部DNS名を使ってアクセスすると プライベートIPアドレスに変換されるため 目的のサーバにプライベートIPでアクセスできる13

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

69

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

70

AWSの課金金の仕組みインターネット

ELB

EC2

EBS

S3

データ転送量量

ELB利利用料料データ処理理量量

インスタンスタイプ別利利用料料

EBSの利利用料料

S3の利利用料料

大半を占める

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

71

Simple Monthly Calculator

  Web上にある計算機を使って概算費用を計算できますsect  httpcalculators3amazonawscomcalc5htmllng=ja_JP

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

72

複数の価格モデル

 課金金モデルが選べるsect 通常の時間課金金のオンデマンドインスタンス

sect ある程度度継続してEC2を使う(1年年3年年)EC2リザーブドインスタンス

sect 入札を利利用してより安く使うEC2スポットインスタンス

rarrマイスターシリーズ RIampスポットインスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

73

AWS無料料試用枠

  AWSでは無料料試用枠を用意していますbull  httpawsamazoncomjpfreeemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

74

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

75

Appendix

  参考資料料bull  Amazon Glacier Developer Guidehttpdocsamazonwebservicescomamazonglacierlatestdevintroductionhtml

bull  Amazon Glacier FAQhttpawsamazoncomjpglacierfaqs

bull  Amazon Glaceir価格httpawsamazoncomjpglacierpricing

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

76

QampA

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 41: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

41

EC2の責任共有モデル

物理インタフェース

ファイアウォール

      ハイバーバイザー

Sm

all

Larg

e

hellip

Sm

all Amazon EC2

インスタンス

物理ホスト

ユーザーが 責任を持って 管理する

AWSが 責任を持って 管理する

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

42

ファイアウォールを実現するSecurity Group

  インスタンスのINOUTトラフィックを制限するファイアウォール機能

  デフォルトIN向けは全トラフィック閉

  必要な受信アクセスに対してアクセスルールを定義する

bull  プロトコル( TCPUDP)bull  宛先ポートbull  アクセス元IP Security Group

  ルールをひとまとめにしたテンプレートを Security Groupと呼ぶ

EC2 インスタンス

ポート22(SSH)

ポート80(HTTP)

EC2ファイアウォール

Security Group

ポート25(SMTP)

ポート22(SSH)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

43

Security Groupの使い方   インスタンスの用途に応じたSecurity Groupを用意する

bull  Webサーバ用DBサーバ用メールサーバ用等   アクセス元にSecurity Groupも設定して限定可能

Webサーバ

Webサーバ

DBサーバ

sg-1234

22 00000 80 00000 25 sg-1234

sg-1234

sg-1234

sg-abcd sg-abcd

22 00000 3306 sg-1234

Webサーバ

sg-xyz

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

44

セキュリティ証明書

仮想サーバ(Amazon EC2)Windows( スタンダード)

コマンドライン SDK利利用

SSH公開鍵認証

仮想デスクトップ

ターミナル

REST SOAPAPI

Webコンソール

①EC2インスタンスへのアクセスrarr鍵認証

②Webコンソールへのアクセス

rarrパスワード認証 多要素認証 IAM

③APIへのアクセスrarrアクセスキー X509証明書 IAM

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

45

Key Pair(キーペア)を用いた鍵認証   鍵認証はユーザ名パスワードの認証よりも安全な認証方式

ダウンロードされた秘密鍵

①キーペア作成

②インスタンス起動時にemsp emsp emsp 公開鍵をコピー

公開鍵

③公開鍵秘密鍵のペアが合致するとログイン可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

46

EC2のSLA13

sect  EC2の可用性が9995 sect 上記に満たない場合はServiceクレジットを返還する

sect 詳細は sect  httpawsamazoncomec2-sla

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

47

AWSセキュリティセンター 13

 日本語のホワイトペーパー bull  セキュリティ概要 bull  リスクとコンプライアンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

48

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

49

最近追加された機能

  VM Import for Linux   IAM EC2 Resource Permissions   リザーブドインスタンスの変更更可能に   SR-‐‑‒IOVネットワークDriverネットワーク性能向上

bull  C3 I2 R3インスタンスで対応

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

50

インスタンスのさらなる追加

  一般的な目的なら M3   Compute Optimizedなら C3   Memory Optimizedなら R3(もうすぐ)   GPUが必要なら G2   IOPS重視なら I2   Disk Based Storage ならHS1

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

51

Intel Processor Features

  m3 c3 cc2 g2 cr1 i2 r3の全てが対応

  AES New Instructions (AES-‐‑‒NI)bull  c1 cg1 m2でも対応

  Advanced Vector Extensions (Intel AVX)bull  HVMでのみ対応

  Turbo Boost Technology

  詳細は httpawsamazoncomec2instance-‐‑‒types

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

52

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

53

故障のための設計 Design for Failure   故障に備えた設計をしておく

  すべてが故障しうると考えシステム全体での保守的設計   SPOF(単一障害点)の排除   障害からの復復旧(対応品質)を重視する

  EC2における故障のための設計   AMIを常にとっておく   EBSスナップショットでバックアップ   複数アベイラビリティゾーンへの分散   ELBでサーバを冗長化Auto Scalingで自動復復帰   Reserved Instanceでキャパシティ保障

  他の冗長性高いサービスとの組み合わせ   S3 SimpleDB RDS他

httpwwwslidesharenetkentamagawaaws-‐‑‒7991623

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

54

定期的なバックアップ

  EC2のAMIを定期的に作成する   (参考) 無停止でAMI取得

Cloudpackさんブログhttpblogcloudpackjp201103aws-‐‑‒news-‐‑‒ec2-‐‑‒instance-‐‑‒no-‐‑‒reboot-‐‑‒amihtml

  データボリュームとしてのEBSの場合EBSのスナップショットを定期的に作成

  スクリプトを書いて定期的なバックアップを行行うことも可能 Coderockさんブログ

httpblogdateofrockcom201003auto-‐‑‒backup-‐‑‒amazon-‐‑‒ebs-‐‑‒with-‐‑‒rubyhtml   サーバーワークスさんブログ

httpblogserverworkscojptech20110721awssdk-‐‑‒for-‐‑‒ruby-‐‑‒create-‐‑‒snapshot

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

55

Instance StorageにSSDを積んだインスタンスが増えてきた

  EC2のタイプによって選択できるInstance Storeは以下の通り

Instance Type Instance Store Volumesm1small 1 x 160 GBdaggerm1medium 1 x 410 GBm1large 2 x 420 GB (840 GB)m1xlarge 4 x 420 GB (1680 GB)m2xlarge 1 x 420 GBm22xlarge 1 x 850 GBm24xlarge 2 x 840 GB (1680 GB)m3medium 1 x 4 GB SSDm3large 1 x 32 GB SSDm3xlarge 2 x 40 GB SSD (80 GB)m32xlarge 2 x 80 GB SSD (160 GB)

t1micro None (use Amazon EBS volumes)

c1medium 1 x 350 GBdaggerc1xlarge 4 x 420 GB (1680 GB)

Instance Type Instance Store Volumes

c3large 2 x 16 GB SSD (32 GB)c3xlarge 2 x 40 GB SSD (80 GB)c32xlarge 2 x 80 GB SSD (160 GB)c34xlarge 2 x 160 GB SSD (320 GB)c38xlarge 2 x 320 GB SSD (640 GB)cc28xlarge 4 x 840 GB (3360 GB)cg14xlarge 2 x 840 GB (1680 GB)cr18xlarge 2 x 120 GB SSD (240 GB)hi14xlarge 2 x 1024 GB SSD (2048 GB)hs18xlarge 24 x 2048 GB (49 TB)i2xlarge 1 x 800 GB SSDi22xlarge 2 x 800 GB SSD (1600 GB)i24xlarge 4 x 800 GB SSD (3200 GB)i28xlarge 8 x 800 GB SSD (6400 GB)

2014年年1月29日時点

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

56

Instance Storageを使うべきなのは

 高IOPS高帯域なストレージが必要な場合

 消えても良良い一次データの置き場として使う場合

 ストレージ冗長化を準備できる場合

S3活かしたいメリット

考慮すべき制約

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

57

EC2へのファイル転送は

  SCPを使う scp pk-‐‑‒XXXpem rootec2-‐‑‒XXXamazonawscomxxx

  Windowsの場合はWinSCPなど   S3経由で共有する

  S3にアップロードしEC2からwgetでアクセスする   FTPを立立ち上げる

  EC2側でFTPサーバーを立立ち上げておく

  高速に送信したい   Tsunami UDP Aspera等のソリューション

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

58

VM Import Export

  複数プラットフォームのVMイメージをAmazon EC2に移行行(インポートエクスポート)可能

httpawstypepadcomaws_japan201012vm-‐‑‒import-‐‑‒bring-‐‑‒your-‐‑‒vmware-‐‑‒images-‐‑‒to-‐‑‒the-‐‑‒cloudhtml

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

59

稼働EC2インスタンスからメタデータ取得

  ami-‐‑‒id   ami-‐‑‒launch-‐‑‒index   ami-‐‑‒manifest-‐‑‒path   block-‐‑‒device-‐‑‒mapping   hostname   instance-‐‑‒action   instance-‐‑‒id   Instance-‐‑‒type   kernel-‐‑‒id

  local-‐‑‒hostname   local-‐‑‒ipv4   mac   network   placement   profile   public-‐‑‒hostname   public-‐‑‒ipv4   public-‐‑‒keys   reservation-‐‑‒id

curl http169254169254latestmeta-‐‑‒data

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

60

起動時にパラメーターを渡す   起動時に16KB以内で任意のものを渡せる

  ChefやPuppetなどを利利用して自己構成できるAMIに   参照emsp AWSマイスターemsp CloudFormation資料料httpwwwslidesharenetkentamagawacloudformation-‐‑‒aws5

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

61

EC2コマンドラインツール amp AWS SDKs

  コマンドラインからEC2のAPIにアクセスできるツール   ツールをインストールしセキュリティ証明書を配置

  AWS SDKs httpawsamazoncomcode

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

62

マネージメントコンソールだけでなくAPIからプログラマブルにアクセス

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1a --instance-type m1small

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1b --instance-type m1small

Tokyo リージョン

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

63

EC2のスケジュールイベント表示機能

  EC2インスタンスが稼働しているハードかソフトにメンテナンスが必要な場合に情報を提供する仕組み

  インスタンスリブートシステムリブートリタイヤ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

64

EC2のステータスチェック機能

  下記の2種類のチェックを自動テストで実行行し情報を提示   システムステータスチェック

  EC2インスタンスにネットワークパケットが通るかチェック   インスタンスステータスチェック

  EC2インスタンスのOSがネットワークパケットを受け取るかチェック

  もし状況に乖離離がある場合はレポートできます

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

65

AWS制限増加申請

  EC2を誤って大量量に作成しないよう最大インスタンス数の上限を20に制限しています

  制限増加申請フォームで各種制限の増加を行行えますbull  httpawsamazoncomjpcontact-‐‑‒usemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

66

既存EBSボリュームのサイズ変更更

  例例 10GB -‐‑‒gt 100GB変更更への流流れ   EBSをデタッチする   EBSからS3にスナップショットを作成する

  新たなボリュームサイズを指定してEBSを作成する

  EBSをアタッチする   マウントしてリサイズする

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

スナップショット

EBS (10GB)

EBS (100GB)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

67

EBSとS3

EBSは複数EC2にアタッチ不不可   単独のEC2インスタンスへのブロックデバイスとしての使い方

  NFSのような使い方をする際はEC2にミドルウェアを導入(GlusterFS等)

S3は複数のEC2からアクセス可   ただしWrite Once Read A Lotな使い方に向いている

  アップロード並列列化も使える   耐久性の設計は99999999999で非常に高い

Copyright copy 2011 Amazon Web Services

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

バケット

EBS

EC2インスタンス

HTTPHTTPS

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

68

EIP使用時の注意点

  グローバルIP(EIP)を用いた場合インターネット経由のアクセスとなり課金発生するケースがある

  名前解決したいサーバに固定IPを付与する13   各サーバは固定グローバルIPを元に

AWSのDNSに名前を問い合わせ13   問い合わせた結果返ってくる外部DNS名でサーバにアクセスを行う13   EC2内部で外部DNS名を使ってアクセスすると プライベートIPアドレスに変換されるため 目的のサーバにプライベートIPでアクセスできる13

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

69

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

70

AWSの課金金の仕組みインターネット

ELB

EC2

EBS

S3

データ転送量量

ELB利利用料料データ処理理量量

インスタンスタイプ別利利用料料

EBSの利利用料料

S3の利利用料料

大半を占める

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

71

Simple Monthly Calculator

  Web上にある計算機を使って概算費用を計算できますsect  httpcalculators3amazonawscomcalc5htmllng=ja_JP

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

72

複数の価格モデル

 課金金モデルが選べるsect 通常の時間課金金のオンデマンドインスタンス

sect ある程度度継続してEC2を使う(1年年3年年)EC2リザーブドインスタンス

sect 入札を利利用してより安く使うEC2スポットインスタンス

rarrマイスターシリーズ RIampスポットインスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

73

AWS無料料試用枠

  AWSでは無料料試用枠を用意していますbull  httpawsamazoncomjpfreeemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

74

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

75

Appendix

  参考資料料bull  Amazon Glacier Developer Guidehttpdocsamazonwebservicescomamazonglacierlatestdevintroductionhtml

bull  Amazon Glacier FAQhttpawsamazoncomjpglacierfaqs

bull  Amazon Glaceir価格httpawsamazoncomjpglacierpricing

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

76

QampA

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 42: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

42

ファイアウォールを実現するSecurity Group

  インスタンスのINOUTトラフィックを制限するファイアウォール機能

  デフォルトIN向けは全トラフィック閉

  必要な受信アクセスに対してアクセスルールを定義する

bull  プロトコル( TCPUDP)bull  宛先ポートbull  アクセス元IP Security Group

  ルールをひとまとめにしたテンプレートを Security Groupと呼ぶ

EC2 インスタンス

ポート22(SSH)

ポート80(HTTP)

EC2ファイアウォール

Security Group

ポート25(SMTP)

ポート22(SSH)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

43

Security Groupの使い方   インスタンスの用途に応じたSecurity Groupを用意する

bull  Webサーバ用DBサーバ用メールサーバ用等   アクセス元にSecurity Groupも設定して限定可能

Webサーバ

Webサーバ

DBサーバ

sg-1234

22 00000 80 00000 25 sg-1234

sg-1234

sg-1234

sg-abcd sg-abcd

22 00000 3306 sg-1234

Webサーバ

sg-xyz

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

44

セキュリティ証明書

仮想サーバ(Amazon EC2)Windows( スタンダード)

コマンドライン SDK利利用

SSH公開鍵認証

仮想デスクトップ

ターミナル

REST SOAPAPI

Webコンソール

①EC2インスタンスへのアクセスrarr鍵認証

②Webコンソールへのアクセス

rarrパスワード認証 多要素認証 IAM

③APIへのアクセスrarrアクセスキー X509証明書 IAM

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

45

Key Pair(キーペア)を用いた鍵認証   鍵認証はユーザ名パスワードの認証よりも安全な認証方式

ダウンロードされた秘密鍵

①キーペア作成

②インスタンス起動時にemsp emsp emsp 公開鍵をコピー

公開鍵

③公開鍵秘密鍵のペアが合致するとログイン可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

46

EC2のSLA13

sect  EC2の可用性が9995 sect 上記に満たない場合はServiceクレジットを返還する

sect 詳細は sect  httpawsamazoncomec2-sla

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

47

AWSセキュリティセンター 13

 日本語のホワイトペーパー bull  セキュリティ概要 bull  リスクとコンプライアンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

48

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

49

最近追加された機能

  VM Import for Linux   IAM EC2 Resource Permissions   リザーブドインスタンスの変更更可能に   SR-‐‑‒IOVネットワークDriverネットワーク性能向上

bull  C3 I2 R3インスタンスで対応

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

50

インスタンスのさらなる追加

  一般的な目的なら M3   Compute Optimizedなら C3   Memory Optimizedなら R3(もうすぐ)   GPUが必要なら G2   IOPS重視なら I2   Disk Based Storage ならHS1

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

51

Intel Processor Features

  m3 c3 cc2 g2 cr1 i2 r3の全てが対応

  AES New Instructions (AES-‐‑‒NI)bull  c1 cg1 m2でも対応

  Advanced Vector Extensions (Intel AVX)bull  HVMでのみ対応

  Turbo Boost Technology

  詳細は httpawsamazoncomec2instance-‐‑‒types

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

52

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

53

故障のための設計 Design for Failure   故障に備えた設計をしておく

  すべてが故障しうると考えシステム全体での保守的設計   SPOF(単一障害点)の排除   障害からの復復旧(対応品質)を重視する

  EC2における故障のための設計   AMIを常にとっておく   EBSスナップショットでバックアップ   複数アベイラビリティゾーンへの分散   ELBでサーバを冗長化Auto Scalingで自動復復帰   Reserved Instanceでキャパシティ保障

  他の冗長性高いサービスとの組み合わせ   S3 SimpleDB RDS他

httpwwwslidesharenetkentamagawaaws-‐‑‒7991623

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

54

定期的なバックアップ

  EC2のAMIを定期的に作成する   (参考) 無停止でAMI取得

Cloudpackさんブログhttpblogcloudpackjp201103aws-‐‑‒news-‐‑‒ec2-‐‑‒instance-‐‑‒no-‐‑‒reboot-‐‑‒amihtml

  データボリュームとしてのEBSの場合EBSのスナップショットを定期的に作成

  スクリプトを書いて定期的なバックアップを行行うことも可能 Coderockさんブログ

httpblogdateofrockcom201003auto-‐‑‒backup-‐‑‒amazon-‐‑‒ebs-‐‑‒with-‐‑‒rubyhtml   サーバーワークスさんブログ

httpblogserverworkscojptech20110721awssdk-‐‑‒for-‐‑‒ruby-‐‑‒create-‐‑‒snapshot

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

55

Instance StorageにSSDを積んだインスタンスが増えてきた

  EC2のタイプによって選択できるInstance Storeは以下の通り

Instance Type Instance Store Volumesm1small 1 x 160 GBdaggerm1medium 1 x 410 GBm1large 2 x 420 GB (840 GB)m1xlarge 4 x 420 GB (1680 GB)m2xlarge 1 x 420 GBm22xlarge 1 x 850 GBm24xlarge 2 x 840 GB (1680 GB)m3medium 1 x 4 GB SSDm3large 1 x 32 GB SSDm3xlarge 2 x 40 GB SSD (80 GB)m32xlarge 2 x 80 GB SSD (160 GB)

t1micro None (use Amazon EBS volumes)

c1medium 1 x 350 GBdaggerc1xlarge 4 x 420 GB (1680 GB)

Instance Type Instance Store Volumes

c3large 2 x 16 GB SSD (32 GB)c3xlarge 2 x 40 GB SSD (80 GB)c32xlarge 2 x 80 GB SSD (160 GB)c34xlarge 2 x 160 GB SSD (320 GB)c38xlarge 2 x 320 GB SSD (640 GB)cc28xlarge 4 x 840 GB (3360 GB)cg14xlarge 2 x 840 GB (1680 GB)cr18xlarge 2 x 120 GB SSD (240 GB)hi14xlarge 2 x 1024 GB SSD (2048 GB)hs18xlarge 24 x 2048 GB (49 TB)i2xlarge 1 x 800 GB SSDi22xlarge 2 x 800 GB SSD (1600 GB)i24xlarge 4 x 800 GB SSD (3200 GB)i28xlarge 8 x 800 GB SSD (6400 GB)

2014年年1月29日時点

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

56

Instance Storageを使うべきなのは

 高IOPS高帯域なストレージが必要な場合

 消えても良良い一次データの置き場として使う場合

 ストレージ冗長化を準備できる場合

S3活かしたいメリット

考慮すべき制約

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

57

EC2へのファイル転送は

  SCPを使う scp pk-‐‑‒XXXpem rootec2-‐‑‒XXXamazonawscomxxx

  Windowsの場合はWinSCPなど   S3経由で共有する

  S3にアップロードしEC2からwgetでアクセスする   FTPを立立ち上げる

  EC2側でFTPサーバーを立立ち上げておく

  高速に送信したい   Tsunami UDP Aspera等のソリューション

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

58

VM Import Export

  複数プラットフォームのVMイメージをAmazon EC2に移行行(インポートエクスポート)可能

httpawstypepadcomaws_japan201012vm-‐‑‒import-‐‑‒bring-‐‑‒your-‐‑‒vmware-‐‑‒images-‐‑‒to-‐‑‒the-‐‑‒cloudhtml

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

59

稼働EC2インスタンスからメタデータ取得

  ami-‐‑‒id   ami-‐‑‒launch-‐‑‒index   ami-‐‑‒manifest-‐‑‒path   block-‐‑‒device-‐‑‒mapping   hostname   instance-‐‑‒action   instance-‐‑‒id   Instance-‐‑‒type   kernel-‐‑‒id

  local-‐‑‒hostname   local-‐‑‒ipv4   mac   network   placement   profile   public-‐‑‒hostname   public-‐‑‒ipv4   public-‐‑‒keys   reservation-‐‑‒id

curl http169254169254latestmeta-‐‑‒data

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

60

起動時にパラメーターを渡す   起動時に16KB以内で任意のものを渡せる

  ChefやPuppetなどを利利用して自己構成できるAMIに   参照emsp AWSマイスターemsp CloudFormation資料料httpwwwslidesharenetkentamagawacloudformation-‐‑‒aws5

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

61

EC2コマンドラインツール amp AWS SDKs

  コマンドラインからEC2のAPIにアクセスできるツール   ツールをインストールしセキュリティ証明書を配置

  AWS SDKs httpawsamazoncomcode

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

62

マネージメントコンソールだけでなくAPIからプログラマブルにアクセス

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1a --instance-type m1small

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1b --instance-type m1small

Tokyo リージョン

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

63

EC2のスケジュールイベント表示機能

  EC2インスタンスが稼働しているハードかソフトにメンテナンスが必要な場合に情報を提供する仕組み

  インスタンスリブートシステムリブートリタイヤ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

64

EC2のステータスチェック機能

  下記の2種類のチェックを自動テストで実行行し情報を提示   システムステータスチェック

  EC2インスタンスにネットワークパケットが通るかチェック   インスタンスステータスチェック

  EC2インスタンスのOSがネットワークパケットを受け取るかチェック

  もし状況に乖離離がある場合はレポートできます

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

65

AWS制限増加申請

  EC2を誤って大量量に作成しないよう最大インスタンス数の上限を20に制限しています

  制限増加申請フォームで各種制限の増加を行行えますbull  httpawsamazoncomjpcontact-‐‑‒usemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

66

既存EBSボリュームのサイズ変更更

  例例 10GB -‐‑‒gt 100GB変更更への流流れ   EBSをデタッチする   EBSからS3にスナップショットを作成する

  新たなボリュームサイズを指定してEBSを作成する

  EBSをアタッチする   マウントしてリサイズする

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

スナップショット

EBS (10GB)

EBS (100GB)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

67

EBSとS3

EBSは複数EC2にアタッチ不不可   単独のEC2インスタンスへのブロックデバイスとしての使い方

  NFSのような使い方をする際はEC2にミドルウェアを導入(GlusterFS等)

S3は複数のEC2からアクセス可   ただしWrite Once Read A Lotな使い方に向いている

  アップロード並列列化も使える   耐久性の設計は99999999999で非常に高い

Copyright copy 2011 Amazon Web Services

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

バケット

EBS

EC2インスタンス

HTTPHTTPS

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

68

EIP使用時の注意点

  グローバルIP(EIP)を用いた場合インターネット経由のアクセスとなり課金発生するケースがある

  名前解決したいサーバに固定IPを付与する13   各サーバは固定グローバルIPを元に

AWSのDNSに名前を問い合わせ13   問い合わせた結果返ってくる外部DNS名でサーバにアクセスを行う13   EC2内部で外部DNS名を使ってアクセスすると プライベートIPアドレスに変換されるため 目的のサーバにプライベートIPでアクセスできる13

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

69

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

70

AWSの課金金の仕組みインターネット

ELB

EC2

EBS

S3

データ転送量量

ELB利利用料料データ処理理量量

インスタンスタイプ別利利用料料

EBSの利利用料料

S3の利利用料料

大半を占める

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

71

Simple Monthly Calculator

  Web上にある計算機を使って概算費用を計算できますsect  httpcalculators3amazonawscomcalc5htmllng=ja_JP

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

72

複数の価格モデル

 課金金モデルが選べるsect 通常の時間課金金のオンデマンドインスタンス

sect ある程度度継続してEC2を使う(1年年3年年)EC2リザーブドインスタンス

sect 入札を利利用してより安く使うEC2スポットインスタンス

rarrマイスターシリーズ RIampスポットインスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

73

AWS無料料試用枠

  AWSでは無料料試用枠を用意していますbull  httpawsamazoncomjpfreeemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

74

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

75

Appendix

  参考資料料bull  Amazon Glacier Developer Guidehttpdocsamazonwebservicescomamazonglacierlatestdevintroductionhtml

bull  Amazon Glacier FAQhttpawsamazoncomjpglacierfaqs

bull  Amazon Glaceir価格httpawsamazoncomjpglacierpricing

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

76

QampA

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 43: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

43

Security Groupの使い方   インスタンスの用途に応じたSecurity Groupを用意する

bull  Webサーバ用DBサーバ用メールサーバ用等   アクセス元にSecurity Groupも設定して限定可能

Webサーバ

Webサーバ

DBサーバ

sg-1234

22 00000 80 00000 25 sg-1234

sg-1234

sg-1234

sg-abcd sg-abcd

22 00000 3306 sg-1234

Webサーバ

sg-xyz

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

44

セキュリティ証明書

仮想サーバ(Amazon EC2)Windows( スタンダード)

コマンドライン SDK利利用

SSH公開鍵認証

仮想デスクトップ

ターミナル

REST SOAPAPI

Webコンソール

①EC2インスタンスへのアクセスrarr鍵認証

②Webコンソールへのアクセス

rarrパスワード認証 多要素認証 IAM

③APIへのアクセスrarrアクセスキー X509証明書 IAM

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

45

Key Pair(キーペア)を用いた鍵認証   鍵認証はユーザ名パスワードの認証よりも安全な認証方式

ダウンロードされた秘密鍵

①キーペア作成

②インスタンス起動時にemsp emsp emsp 公開鍵をコピー

公開鍵

③公開鍵秘密鍵のペアが合致するとログイン可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

46

EC2のSLA13

sect  EC2の可用性が9995 sect 上記に満たない場合はServiceクレジットを返還する

sect 詳細は sect  httpawsamazoncomec2-sla

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

47

AWSセキュリティセンター 13

 日本語のホワイトペーパー bull  セキュリティ概要 bull  リスクとコンプライアンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

48

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

49

最近追加された機能

  VM Import for Linux   IAM EC2 Resource Permissions   リザーブドインスタンスの変更更可能に   SR-‐‑‒IOVネットワークDriverネットワーク性能向上

bull  C3 I2 R3インスタンスで対応

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

50

インスタンスのさらなる追加

  一般的な目的なら M3   Compute Optimizedなら C3   Memory Optimizedなら R3(もうすぐ)   GPUが必要なら G2   IOPS重視なら I2   Disk Based Storage ならHS1

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

51

Intel Processor Features

  m3 c3 cc2 g2 cr1 i2 r3の全てが対応

  AES New Instructions (AES-‐‑‒NI)bull  c1 cg1 m2でも対応

  Advanced Vector Extensions (Intel AVX)bull  HVMでのみ対応

  Turbo Boost Technology

  詳細は httpawsamazoncomec2instance-‐‑‒types

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

52

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

53

故障のための設計 Design for Failure   故障に備えた設計をしておく

  すべてが故障しうると考えシステム全体での保守的設計   SPOF(単一障害点)の排除   障害からの復復旧(対応品質)を重視する

  EC2における故障のための設計   AMIを常にとっておく   EBSスナップショットでバックアップ   複数アベイラビリティゾーンへの分散   ELBでサーバを冗長化Auto Scalingで自動復復帰   Reserved Instanceでキャパシティ保障

  他の冗長性高いサービスとの組み合わせ   S3 SimpleDB RDS他

httpwwwslidesharenetkentamagawaaws-‐‑‒7991623

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

54

定期的なバックアップ

  EC2のAMIを定期的に作成する   (参考) 無停止でAMI取得

Cloudpackさんブログhttpblogcloudpackjp201103aws-‐‑‒news-‐‑‒ec2-‐‑‒instance-‐‑‒no-‐‑‒reboot-‐‑‒amihtml

  データボリュームとしてのEBSの場合EBSのスナップショットを定期的に作成

  スクリプトを書いて定期的なバックアップを行行うことも可能 Coderockさんブログ

httpblogdateofrockcom201003auto-‐‑‒backup-‐‑‒amazon-‐‑‒ebs-‐‑‒with-‐‑‒rubyhtml   サーバーワークスさんブログ

httpblogserverworkscojptech20110721awssdk-‐‑‒for-‐‑‒ruby-‐‑‒create-‐‑‒snapshot

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

55

Instance StorageにSSDを積んだインスタンスが増えてきた

  EC2のタイプによって選択できるInstance Storeは以下の通り

Instance Type Instance Store Volumesm1small 1 x 160 GBdaggerm1medium 1 x 410 GBm1large 2 x 420 GB (840 GB)m1xlarge 4 x 420 GB (1680 GB)m2xlarge 1 x 420 GBm22xlarge 1 x 850 GBm24xlarge 2 x 840 GB (1680 GB)m3medium 1 x 4 GB SSDm3large 1 x 32 GB SSDm3xlarge 2 x 40 GB SSD (80 GB)m32xlarge 2 x 80 GB SSD (160 GB)

t1micro None (use Amazon EBS volumes)

c1medium 1 x 350 GBdaggerc1xlarge 4 x 420 GB (1680 GB)

Instance Type Instance Store Volumes

c3large 2 x 16 GB SSD (32 GB)c3xlarge 2 x 40 GB SSD (80 GB)c32xlarge 2 x 80 GB SSD (160 GB)c34xlarge 2 x 160 GB SSD (320 GB)c38xlarge 2 x 320 GB SSD (640 GB)cc28xlarge 4 x 840 GB (3360 GB)cg14xlarge 2 x 840 GB (1680 GB)cr18xlarge 2 x 120 GB SSD (240 GB)hi14xlarge 2 x 1024 GB SSD (2048 GB)hs18xlarge 24 x 2048 GB (49 TB)i2xlarge 1 x 800 GB SSDi22xlarge 2 x 800 GB SSD (1600 GB)i24xlarge 4 x 800 GB SSD (3200 GB)i28xlarge 8 x 800 GB SSD (6400 GB)

2014年年1月29日時点

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

56

Instance Storageを使うべきなのは

 高IOPS高帯域なストレージが必要な場合

 消えても良良い一次データの置き場として使う場合

 ストレージ冗長化を準備できる場合

S3活かしたいメリット

考慮すべき制約

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

57

EC2へのファイル転送は

  SCPを使う scp pk-‐‑‒XXXpem rootec2-‐‑‒XXXamazonawscomxxx

  Windowsの場合はWinSCPなど   S3経由で共有する

  S3にアップロードしEC2からwgetでアクセスする   FTPを立立ち上げる

  EC2側でFTPサーバーを立立ち上げておく

  高速に送信したい   Tsunami UDP Aspera等のソリューション

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

58

VM Import Export

  複数プラットフォームのVMイメージをAmazon EC2に移行行(インポートエクスポート)可能

httpawstypepadcomaws_japan201012vm-‐‑‒import-‐‑‒bring-‐‑‒your-‐‑‒vmware-‐‑‒images-‐‑‒to-‐‑‒the-‐‑‒cloudhtml

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

59

稼働EC2インスタンスからメタデータ取得

  ami-‐‑‒id   ami-‐‑‒launch-‐‑‒index   ami-‐‑‒manifest-‐‑‒path   block-‐‑‒device-‐‑‒mapping   hostname   instance-‐‑‒action   instance-‐‑‒id   Instance-‐‑‒type   kernel-‐‑‒id

  local-‐‑‒hostname   local-‐‑‒ipv4   mac   network   placement   profile   public-‐‑‒hostname   public-‐‑‒ipv4   public-‐‑‒keys   reservation-‐‑‒id

curl http169254169254latestmeta-‐‑‒data

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

60

起動時にパラメーターを渡す   起動時に16KB以内で任意のものを渡せる

  ChefやPuppetなどを利利用して自己構成できるAMIに   参照emsp AWSマイスターemsp CloudFormation資料料httpwwwslidesharenetkentamagawacloudformation-‐‑‒aws5

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

61

EC2コマンドラインツール amp AWS SDKs

  コマンドラインからEC2のAPIにアクセスできるツール   ツールをインストールしセキュリティ証明書を配置

  AWS SDKs httpawsamazoncomcode

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

62

マネージメントコンソールだけでなくAPIからプログラマブルにアクセス

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1a --instance-type m1small

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1b --instance-type m1small

Tokyo リージョン

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

63

EC2のスケジュールイベント表示機能

  EC2インスタンスが稼働しているハードかソフトにメンテナンスが必要な場合に情報を提供する仕組み

  インスタンスリブートシステムリブートリタイヤ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

64

EC2のステータスチェック機能

  下記の2種類のチェックを自動テストで実行行し情報を提示   システムステータスチェック

  EC2インスタンスにネットワークパケットが通るかチェック   インスタンスステータスチェック

  EC2インスタンスのOSがネットワークパケットを受け取るかチェック

  もし状況に乖離離がある場合はレポートできます

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

65

AWS制限増加申請

  EC2を誤って大量量に作成しないよう最大インスタンス数の上限を20に制限しています

  制限増加申請フォームで各種制限の増加を行行えますbull  httpawsamazoncomjpcontact-‐‑‒usemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

66

既存EBSボリュームのサイズ変更更

  例例 10GB -‐‑‒gt 100GB変更更への流流れ   EBSをデタッチする   EBSからS3にスナップショットを作成する

  新たなボリュームサイズを指定してEBSを作成する

  EBSをアタッチする   マウントしてリサイズする

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

スナップショット

EBS (10GB)

EBS (100GB)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

67

EBSとS3

EBSは複数EC2にアタッチ不不可   単独のEC2インスタンスへのブロックデバイスとしての使い方

  NFSのような使い方をする際はEC2にミドルウェアを導入(GlusterFS等)

S3は複数のEC2からアクセス可   ただしWrite Once Read A Lotな使い方に向いている

  アップロード並列列化も使える   耐久性の設計は99999999999で非常に高い

Copyright copy 2011 Amazon Web Services

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

バケット

EBS

EC2インスタンス

HTTPHTTPS

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

68

EIP使用時の注意点

  グローバルIP(EIP)を用いた場合インターネット経由のアクセスとなり課金発生するケースがある

  名前解決したいサーバに固定IPを付与する13   各サーバは固定グローバルIPを元に

AWSのDNSに名前を問い合わせ13   問い合わせた結果返ってくる外部DNS名でサーバにアクセスを行う13   EC2内部で外部DNS名を使ってアクセスすると プライベートIPアドレスに変換されるため 目的のサーバにプライベートIPでアクセスできる13

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

69

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

70

AWSの課金金の仕組みインターネット

ELB

EC2

EBS

S3

データ転送量量

ELB利利用料料データ処理理量量

インスタンスタイプ別利利用料料

EBSの利利用料料

S3の利利用料料

大半を占める

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

71

Simple Monthly Calculator

  Web上にある計算機を使って概算費用を計算できますsect  httpcalculators3amazonawscomcalc5htmllng=ja_JP

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

72

複数の価格モデル

 課金金モデルが選べるsect 通常の時間課金金のオンデマンドインスタンス

sect ある程度度継続してEC2を使う(1年年3年年)EC2リザーブドインスタンス

sect 入札を利利用してより安く使うEC2スポットインスタンス

rarrマイスターシリーズ RIampスポットインスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

73

AWS無料料試用枠

  AWSでは無料料試用枠を用意していますbull  httpawsamazoncomjpfreeemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

74

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

75

Appendix

  参考資料料bull  Amazon Glacier Developer Guidehttpdocsamazonwebservicescomamazonglacierlatestdevintroductionhtml

bull  Amazon Glacier FAQhttpawsamazoncomjpglacierfaqs

bull  Amazon Glaceir価格httpawsamazoncomjpglacierpricing

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

76

QampA

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 44: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

44

セキュリティ証明書

仮想サーバ(Amazon EC2)Windows( スタンダード)

コマンドライン SDK利利用

SSH公開鍵認証

仮想デスクトップ

ターミナル

REST SOAPAPI

Webコンソール

①EC2インスタンスへのアクセスrarr鍵認証

②Webコンソールへのアクセス

rarrパスワード認証 多要素認証 IAM

③APIへのアクセスrarrアクセスキー X509証明書 IAM

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

45

Key Pair(キーペア)を用いた鍵認証   鍵認証はユーザ名パスワードの認証よりも安全な認証方式

ダウンロードされた秘密鍵

①キーペア作成

②インスタンス起動時にemsp emsp emsp 公開鍵をコピー

公開鍵

③公開鍵秘密鍵のペアが合致するとログイン可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

46

EC2のSLA13

sect  EC2の可用性が9995 sect 上記に満たない場合はServiceクレジットを返還する

sect 詳細は sect  httpawsamazoncomec2-sla

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

47

AWSセキュリティセンター 13

 日本語のホワイトペーパー bull  セキュリティ概要 bull  リスクとコンプライアンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

48

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

49

最近追加された機能

  VM Import for Linux   IAM EC2 Resource Permissions   リザーブドインスタンスの変更更可能に   SR-‐‑‒IOVネットワークDriverネットワーク性能向上

bull  C3 I2 R3インスタンスで対応

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

50

インスタンスのさらなる追加

  一般的な目的なら M3   Compute Optimizedなら C3   Memory Optimizedなら R3(もうすぐ)   GPUが必要なら G2   IOPS重視なら I2   Disk Based Storage ならHS1

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

51

Intel Processor Features

  m3 c3 cc2 g2 cr1 i2 r3の全てが対応

  AES New Instructions (AES-‐‑‒NI)bull  c1 cg1 m2でも対応

  Advanced Vector Extensions (Intel AVX)bull  HVMでのみ対応

  Turbo Boost Technology

  詳細は httpawsamazoncomec2instance-‐‑‒types

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

52

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

53

故障のための設計 Design for Failure   故障に備えた設計をしておく

  すべてが故障しうると考えシステム全体での保守的設計   SPOF(単一障害点)の排除   障害からの復復旧(対応品質)を重視する

  EC2における故障のための設計   AMIを常にとっておく   EBSスナップショットでバックアップ   複数アベイラビリティゾーンへの分散   ELBでサーバを冗長化Auto Scalingで自動復復帰   Reserved Instanceでキャパシティ保障

  他の冗長性高いサービスとの組み合わせ   S3 SimpleDB RDS他

httpwwwslidesharenetkentamagawaaws-‐‑‒7991623

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

54

定期的なバックアップ

  EC2のAMIを定期的に作成する   (参考) 無停止でAMI取得

Cloudpackさんブログhttpblogcloudpackjp201103aws-‐‑‒news-‐‑‒ec2-‐‑‒instance-‐‑‒no-‐‑‒reboot-‐‑‒amihtml

  データボリュームとしてのEBSの場合EBSのスナップショットを定期的に作成

  スクリプトを書いて定期的なバックアップを行行うことも可能 Coderockさんブログ

httpblogdateofrockcom201003auto-‐‑‒backup-‐‑‒amazon-‐‑‒ebs-‐‑‒with-‐‑‒rubyhtml   サーバーワークスさんブログ

httpblogserverworkscojptech20110721awssdk-‐‑‒for-‐‑‒ruby-‐‑‒create-‐‑‒snapshot

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

55

Instance StorageにSSDを積んだインスタンスが増えてきた

  EC2のタイプによって選択できるInstance Storeは以下の通り

Instance Type Instance Store Volumesm1small 1 x 160 GBdaggerm1medium 1 x 410 GBm1large 2 x 420 GB (840 GB)m1xlarge 4 x 420 GB (1680 GB)m2xlarge 1 x 420 GBm22xlarge 1 x 850 GBm24xlarge 2 x 840 GB (1680 GB)m3medium 1 x 4 GB SSDm3large 1 x 32 GB SSDm3xlarge 2 x 40 GB SSD (80 GB)m32xlarge 2 x 80 GB SSD (160 GB)

t1micro None (use Amazon EBS volumes)

c1medium 1 x 350 GBdaggerc1xlarge 4 x 420 GB (1680 GB)

Instance Type Instance Store Volumes

c3large 2 x 16 GB SSD (32 GB)c3xlarge 2 x 40 GB SSD (80 GB)c32xlarge 2 x 80 GB SSD (160 GB)c34xlarge 2 x 160 GB SSD (320 GB)c38xlarge 2 x 320 GB SSD (640 GB)cc28xlarge 4 x 840 GB (3360 GB)cg14xlarge 2 x 840 GB (1680 GB)cr18xlarge 2 x 120 GB SSD (240 GB)hi14xlarge 2 x 1024 GB SSD (2048 GB)hs18xlarge 24 x 2048 GB (49 TB)i2xlarge 1 x 800 GB SSDi22xlarge 2 x 800 GB SSD (1600 GB)i24xlarge 4 x 800 GB SSD (3200 GB)i28xlarge 8 x 800 GB SSD (6400 GB)

2014年年1月29日時点

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

56

Instance Storageを使うべきなのは

 高IOPS高帯域なストレージが必要な場合

 消えても良良い一次データの置き場として使う場合

 ストレージ冗長化を準備できる場合

S3活かしたいメリット

考慮すべき制約

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

57

EC2へのファイル転送は

  SCPを使う scp pk-‐‑‒XXXpem rootec2-‐‑‒XXXamazonawscomxxx

  Windowsの場合はWinSCPなど   S3経由で共有する

  S3にアップロードしEC2からwgetでアクセスする   FTPを立立ち上げる

  EC2側でFTPサーバーを立立ち上げておく

  高速に送信したい   Tsunami UDP Aspera等のソリューション

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

58

VM Import Export

  複数プラットフォームのVMイメージをAmazon EC2に移行行(インポートエクスポート)可能

httpawstypepadcomaws_japan201012vm-‐‑‒import-‐‑‒bring-‐‑‒your-‐‑‒vmware-‐‑‒images-‐‑‒to-‐‑‒the-‐‑‒cloudhtml

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

59

稼働EC2インスタンスからメタデータ取得

  ami-‐‑‒id   ami-‐‑‒launch-‐‑‒index   ami-‐‑‒manifest-‐‑‒path   block-‐‑‒device-‐‑‒mapping   hostname   instance-‐‑‒action   instance-‐‑‒id   Instance-‐‑‒type   kernel-‐‑‒id

  local-‐‑‒hostname   local-‐‑‒ipv4   mac   network   placement   profile   public-‐‑‒hostname   public-‐‑‒ipv4   public-‐‑‒keys   reservation-‐‑‒id

curl http169254169254latestmeta-‐‑‒data

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

60

起動時にパラメーターを渡す   起動時に16KB以内で任意のものを渡せる

  ChefやPuppetなどを利利用して自己構成できるAMIに   参照emsp AWSマイスターemsp CloudFormation資料料httpwwwslidesharenetkentamagawacloudformation-‐‑‒aws5

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

61

EC2コマンドラインツール amp AWS SDKs

  コマンドラインからEC2のAPIにアクセスできるツール   ツールをインストールしセキュリティ証明書を配置

  AWS SDKs httpawsamazoncomcode

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

62

マネージメントコンソールだけでなくAPIからプログラマブルにアクセス

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1a --instance-type m1small

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1b --instance-type m1small

Tokyo リージョン

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

63

EC2のスケジュールイベント表示機能

  EC2インスタンスが稼働しているハードかソフトにメンテナンスが必要な場合に情報を提供する仕組み

  インスタンスリブートシステムリブートリタイヤ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

64

EC2のステータスチェック機能

  下記の2種類のチェックを自動テストで実行行し情報を提示   システムステータスチェック

  EC2インスタンスにネットワークパケットが通るかチェック   インスタンスステータスチェック

  EC2インスタンスのOSがネットワークパケットを受け取るかチェック

  もし状況に乖離離がある場合はレポートできます

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

65

AWS制限増加申請

  EC2を誤って大量量に作成しないよう最大インスタンス数の上限を20に制限しています

  制限増加申請フォームで各種制限の増加を行行えますbull  httpawsamazoncomjpcontact-‐‑‒usemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

66

既存EBSボリュームのサイズ変更更

  例例 10GB -‐‑‒gt 100GB変更更への流流れ   EBSをデタッチする   EBSからS3にスナップショットを作成する

  新たなボリュームサイズを指定してEBSを作成する

  EBSをアタッチする   マウントしてリサイズする

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

スナップショット

EBS (10GB)

EBS (100GB)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

67

EBSとS3

EBSは複数EC2にアタッチ不不可   単独のEC2インスタンスへのブロックデバイスとしての使い方

  NFSのような使い方をする際はEC2にミドルウェアを導入(GlusterFS等)

S3は複数のEC2からアクセス可   ただしWrite Once Read A Lotな使い方に向いている

  アップロード並列列化も使える   耐久性の設計は99999999999で非常に高い

Copyright copy 2011 Amazon Web Services

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

バケット

EBS

EC2インスタンス

HTTPHTTPS

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

68

EIP使用時の注意点

  グローバルIP(EIP)を用いた場合インターネット経由のアクセスとなり課金発生するケースがある

  名前解決したいサーバに固定IPを付与する13   各サーバは固定グローバルIPを元に

AWSのDNSに名前を問い合わせ13   問い合わせた結果返ってくる外部DNS名でサーバにアクセスを行う13   EC2内部で外部DNS名を使ってアクセスすると プライベートIPアドレスに変換されるため 目的のサーバにプライベートIPでアクセスできる13

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

69

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

70

AWSの課金金の仕組みインターネット

ELB

EC2

EBS

S3

データ転送量量

ELB利利用料料データ処理理量量

インスタンスタイプ別利利用料料

EBSの利利用料料

S3の利利用料料

大半を占める

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

71

Simple Monthly Calculator

  Web上にある計算機を使って概算費用を計算できますsect  httpcalculators3amazonawscomcalc5htmllng=ja_JP

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

72

複数の価格モデル

 課金金モデルが選べるsect 通常の時間課金金のオンデマンドインスタンス

sect ある程度度継続してEC2を使う(1年年3年年)EC2リザーブドインスタンス

sect 入札を利利用してより安く使うEC2スポットインスタンス

rarrマイスターシリーズ RIampスポットインスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

73

AWS無料料試用枠

  AWSでは無料料試用枠を用意していますbull  httpawsamazoncomjpfreeemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

74

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

75

Appendix

  参考資料料bull  Amazon Glacier Developer Guidehttpdocsamazonwebservicescomamazonglacierlatestdevintroductionhtml

bull  Amazon Glacier FAQhttpawsamazoncomjpglacierfaqs

bull  Amazon Glaceir価格httpawsamazoncomjpglacierpricing

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

76

QampA

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 45: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

45

Key Pair(キーペア)を用いた鍵認証   鍵認証はユーザ名パスワードの認証よりも安全な認証方式

ダウンロードされた秘密鍵

①キーペア作成

②インスタンス起動時にemsp emsp emsp 公開鍵をコピー

公開鍵

③公開鍵秘密鍵のペアが合致するとログイン可能

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

46

EC2のSLA13

sect  EC2の可用性が9995 sect 上記に満たない場合はServiceクレジットを返還する

sect 詳細は sect  httpawsamazoncomec2-sla

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

47

AWSセキュリティセンター 13

 日本語のホワイトペーパー bull  セキュリティ概要 bull  リスクとコンプライアンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

48

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

49

最近追加された機能

  VM Import for Linux   IAM EC2 Resource Permissions   リザーブドインスタンスの変更更可能に   SR-‐‑‒IOVネットワークDriverネットワーク性能向上

bull  C3 I2 R3インスタンスで対応

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

50

インスタンスのさらなる追加

  一般的な目的なら M3   Compute Optimizedなら C3   Memory Optimizedなら R3(もうすぐ)   GPUが必要なら G2   IOPS重視なら I2   Disk Based Storage ならHS1

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

51

Intel Processor Features

  m3 c3 cc2 g2 cr1 i2 r3の全てが対応

  AES New Instructions (AES-‐‑‒NI)bull  c1 cg1 m2でも対応

  Advanced Vector Extensions (Intel AVX)bull  HVMでのみ対応

  Turbo Boost Technology

  詳細は httpawsamazoncomec2instance-‐‑‒types

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

52

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

53

故障のための設計 Design for Failure   故障に備えた設計をしておく

  すべてが故障しうると考えシステム全体での保守的設計   SPOF(単一障害点)の排除   障害からの復復旧(対応品質)を重視する

  EC2における故障のための設計   AMIを常にとっておく   EBSスナップショットでバックアップ   複数アベイラビリティゾーンへの分散   ELBでサーバを冗長化Auto Scalingで自動復復帰   Reserved Instanceでキャパシティ保障

  他の冗長性高いサービスとの組み合わせ   S3 SimpleDB RDS他

httpwwwslidesharenetkentamagawaaws-‐‑‒7991623

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

54

定期的なバックアップ

  EC2のAMIを定期的に作成する   (参考) 無停止でAMI取得

Cloudpackさんブログhttpblogcloudpackjp201103aws-‐‑‒news-‐‑‒ec2-‐‑‒instance-‐‑‒no-‐‑‒reboot-‐‑‒amihtml

  データボリュームとしてのEBSの場合EBSのスナップショットを定期的に作成

  スクリプトを書いて定期的なバックアップを行行うことも可能 Coderockさんブログ

httpblogdateofrockcom201003auto-‐‑‒backup-‐‑‒amazon-‐‑‒ebs-‐‑‒with-‐‑‒rubyhtml   サーバーワークスさんブログ

httpblogserverworkscojptech20110721awssdk-‐‑‒for-‐‑‒ruby-‐‑‒create-‐‑‒snapshot

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

55

Instance StorageにSSDを積んだインスタンスが増えてきた

  EC2のタイプによって選択できるInstance Storeは以下の通り

Instance Type Instance Store Volumesm1small 1 x 160 GBdaggerm1medium 1 x 410 GBm1large 2 x 420 GB (840 GB)m1xlarge 4 x 420 GB (1680 GB)m2xlarge 1 x 420 GBm22xlarge 1 x 850 GBm24xlarge 2 x 840 GB (1680 GB)m3medium 1 x 4 GB SSDm3large 1 x 32 GB SSDm3xlarge 2 x 40 GB SSD (80 GB)m32xlarge 2 x 80 GB SSD (160 GB)

t1micro None (use Amazon EBS volumes)

c1medium 1 x 350 GBdaggerc1xlarge 4 x 420 GB (1680 GB)

Instance Type Instance Store Volumes

c3large 2 x 16 GB SSD (32 GB)c3xlarge 2 x 40 GB SSD (80 GB)c32xlarge 2 x 80 GB SSD (160 GB)c34xlarge 2 x 160 GB SSD (320 GB)c38xlarge 2 x 320 GB SSD (640 GB)cc28xlarge 4 x 840 GB (3360 GB)cg14xlarge 2 x 840 GB (1680 GB)cr18xlarge 2 x 120 GB SSD (240 GB)hi14xlarge 2 x 1024 GB SSD (2048 GB)hs18xlarge 24 x 2048 GB (49 TB)i2xlarge 1 x 800 GB SSDi22xlarge 2 x 800 GB SSD (1600 GB)i24xlarge 4 x 800 GB SSD (3200 GB)i28xlarge 8 x 800 GB SSD (6400 GB)

2014年年1月29日時点

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

56

Instance Storageを使うべきなのは

 高IOPS高帯域なストレージが必要な場合

 消えても良良い一次データの置き場として使う場合

 ストレージ冗長化を準備できる場合

S3活かしたいメリット

考慮すべき制約

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

57

EC2へのファイル転送は

  SCPを使う scp pk-‐‑‒XXXpem rootec2-‐‑‒XXXamazonawscomxxx

  Windowsの場合はWinSCPなど   S3経由で共有する

  S3にアップロードしEC2からwgetでアクセスする   FTPを立立ち上げる

  EC2側でFTPサーバーを立立ち上げておく

  高速に送信したい   Tsunami UDP Aspera等のソリューション

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

58

VM Import Export

  複数プラットフォームのVMイメージをAmazon EC2に移行行(インポートエクスポート)可能

httpawstypepadcomaws_japan201012vm-‐‑‒import-‐‑‒bring-‐‑‒your-‐‑‒vmware-‐‑‒images-‐‑‒to-‐‑‒the-‐‑‒cloudhtml

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

59

稼働EC2インスタンスからメタデータ取得

  ami-‐‑‒id   ami-‐‑‒launch-‐‑‒index   ami-‐‑‒manifest-‐‑‒path   block-‐‑‒device-‐‑‒mapping   hostname   instance-‐‑‒action   instance-‐‑‒id   Instance-‐‑‒type   kernel-‐‑‒id

  local-‐‑‒hostname   local-‐‑‒ipv4   mac   network   placement   profile   public-‐‑‒hostname   public-‐‑‒ipv4   public-‐‑‒keys   reservation-‐‑‒id

curl http169254169254latestmeta-‐‑‒data

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

60

起動時にパラメーターを渡す   起動時に16KB以内で任意のものを渡せる

  ChefやPuppetなどを利利用して自己構成できるAMIに   参照emsp AWSマイスターemsp CloudFormation資料料httpwwwslidesharenetkentamagawacloudformation-‐‑‒aws5

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

61

EC2コマンドラインツール amp AWS SDKs

  コマンドラインからEC2のAPIにアクセスできるツール   ツールをインストールしセキュリティ証明書を配置

  AWS SDKs httpawsamazoncomcode

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

62

マネージメントコンソールだけでなくAPIからプログラマブルにアクセス

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1a --instance-type m1small

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1b --instance-type m1small

Tokyo リージョン

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

63

EC2のスケジュールイベント表示機能

  EC2インスタンスが稼働しているハードかソフトにメンテナンスが必要な場合に情報を提供する仕組み

  インスタンスリブートシステムリブートリタイヤ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

64

EC2のステータスチェック機能

  下記の2種類のチェックを自動テストで実行行し情報を提示   システムステータスチェック

  EC2インスタンスにネットワークパケットが通るかチェック   インスタンスステータスチェック

  EC2インスタンスのOSがネットワークパケットを受け取るかチェック

  もし状況に乖離離がある場合はレポートできます

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

65

AWS制限増加申請

  EC2を誤って大量量に作成しないよう最大インスタンス数の上限を20に制限しています

  制限増加申請フォームで各種制限の増加を行行えますbull  httpawsamazoncomjpcontact-‐‑‒usemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

66

既存EBSボリュームのサイズ変更更

  例例 10GB -‐‑‒gt 100GB変更更への流流れ   EBSをデタッチする   EBSからS3にスナップショットを作成する

  新たなボリュームサイズを指定してEBSを作成する

  EBSをアタッチする   マウントしてリサイズする

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

スナップショット

EBS (10GB)

EBS (100GB)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

67

EBSとS3

EBSは複数EC2にアタッチ不不可   単独のEC2インスタンスへのブロックデバイスとしての使い方

  NFSのような使い方をする際はEC2にミドルウェアを導入(GlusterFS等)

S3は複数のEC2からアクセス可   ただしWrite Once Read A Lotな使い方に向いている

  アップロード並列列化も使える   耐久性の設計は99999999999で非常に高い

Copyright copy 2011 Amazon Web Services

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

バケット

EBS

EC2インスタンス

HTTPHTTPS

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

68

EIP使用時の注意点

  グローバルIP(EIP)を用いた場合インターネット経由のアクセスとなり課金発生するケースがある

  名前解決したいサーバに固定IPを付与する13   各サーバは固定グローバルIPを元に

AWSのDNSに名前を問い合わせ13   問い合わせた結果返ってくる外部DNS名でサーバにアクセスを行う13   EC2内部で外部DNS名を使ってアクセスすると プライベートIPアドレスに変換されるため 目的のサーバにプライベートIPでアクセスできる13

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

69

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

70

AWSの課金金の仕組みインターネット

ELB

EC2

EBS

S3

データ転送量量

ELB利利用料料データ処理理量量

インスタンスタイプ別利利用料料

EBSの利利用料料

S3の利利用料料

大半を占める

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

71

Simple Monthly Calculator

  Web上にある計算機を使って概算費用を計算できますsect  httpcalculators3amazonawscomcalc5htmllng=ja_JP

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

72

複数の価格モデル

 課金金モデルが選べるsect 通常の時間課金金のオンデマンドインスタンス

sect ある程度度継続してEC2を使う(1年年3年年)EC2リザーブドインスタンス

sect 入札を利利用してより安く使うEC2スポットインスタンス

rarrマイスターシリーズ RIampスポットインスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

73

AWS無料料試用枠

  AWSでは無料料試用枠を用意していますbull  httpawsamazoncomjpfreeemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

74

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

75

Appendix

  参考資料料bull  Amazon Glacier Developer Guidehttpdocsamazonwebservicescomamazonglacierlatestdevintroductionhtml

bull  Amazon Glacier FAQhttpawsamazoncomjpglacierfaqs

bull  Amazon Glaceir価格httpawsamazoncomjpglacierpricing

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

76

QampA

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 46: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

46

EC2のSLA13

sect  EC2の可用性が9995 sect 上記に満たない場合はServiceクレジットを返還する

sect 詳細は sect  httpawsamazoncomec2-sla

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

47

AWSセキュリティセンター 13

 日本語のホワイトペーパー bull  セキュリティ概要 bull  リスクとコンプライアンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

48

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

49

最近追加された機能

  VM Import for Linux   IAM EC2 Resource Permissions   リザーブドインスタンスの変更更可能に   SR-‐‑‒IOVネットワークDriverネットワーク性能向上

bull  C3 I2 R3インスタンスで対応

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

50

インスタンスのさらなる追加

  一般的な目的なら M3   Compute Optimizedなら C3   Memory Optimizedなら R3(もうすぐ)   GPUが必要なら G2   IOPS重視なら I2   Disk Based Storage ならHS1

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

51

Intel Processor Features

  m3 c3 cc2 g2 cr1 i2 r3の全てが対応

  AES New Instructions (AES-‐‑‒NI)bull  c1 cg1 m2でも対応

  Advanced Vector Extensions (Intel AVX)bull  HVMでのみ対応

  Turbo Boost Technology

  詳細は httpawsamazoncomec2instance-‐‑‒types

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

52

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

53

故障のための設計 Design for Failure   故障に備えた設計をしておく

  すべてが故障しうると考えシステム全体での保守的設計   SPOF(単一障害点)の排除   障害からの復復旧(対応品質)を重視する

  EC2における故障のための設計   AMIを常にとっておく   EBSスナップショットでバックアップ   複数アベイラビリティゾーンへの分散   ELBでサーバを冗長化Auto Scalingで自動復復帰   Reserved Instanceでキャパシティ保障

  他の冗長性高いサービスとの組み合わせ   S3 SimpleDB RDS他

httpwwwslidesharenetkentamagawaaws-‐‑‒7991623

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

54

定期的なバックアップ

  EC2のAMIを定期的に作成する   (参考) 無停止でAMI取得

Cloudpackさんブログhttpblogcloudpackjp201103aws-‐‑‒news-‐‑‒ec2-‐‑‒instance-‐‑‒no-‐‑‒reboot-‐‑‒amihtml

  データボリュームとしてのEBSの場合EBSのスナップショットを定期的に作成

  スクリプトを書いて定期的なバックアップを行行うことも可能 Coderockさんブログ

httpblogdateofrockcom201003auto-‐‑‒backup-‐‑‒amazon-‐‑‒ebs-‐‑‒with-‐‑‒rubyhtml   サーバーワークスさんブログ

httpblogserverworkscojptech20110721awssdk-‐‑‒for-‐‑‒ruby-‐‑‒create-‐‑‒snapshot

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

55

Instance StorageにSSDを積んだインスタンスが増えてきた

  EC2のタイプによって選択できるInstance Storeは以下の通り

Instance Type Instance Store Volumesm1small 1 x 160 GBdaggerm1medium 1 x 410 GBm1large 2 x 420 GB (840 GB)m1xlarge 4 x 420 GB (1680 GB)m2xlarge 1 x 420 GBm22xlarge 1 x 850 GBm24xlarge 2 x 840 GB (1680 GB)m3medium 1 x 4 GB SSDm3large 1 x 32 GB SSDm3xlarge 2 x 40 GB SSD (80 GB)m32xlarge 2 x 80 GB SSD (160 GB)

t1micro None (use Amazon EBS volumes)

c1medium 1 x 350 GBdaggerc1xlarge 4 x 420 GB (1680 GB)

Instance Type Instance Store Volumes

c3large 2 x 16 GB SSD (32 GB)c3xlarge 2 x 40 GB SSD (80 GB)c32xlarge 2 x 80 GB SSD (160 GB)c34xlarge 2 x 160 GB SSD (320 GB)c38xlarge 2 x 320 GB SSD (640 GB)cc28xlarge 4 x 840 GB (3360 GB)cg14xlarge 2 x 840 GB (1680 GB)cr18xlarge 2 x 120 GB SSD (240 GB)hi14xlarge 2 x 1024 GB SSD (2048 GB)hs18xlarge 24 x 2048 GB (49 TB)i2xlarge 1 x 800 GB SSDi22xlarge 2 x 800 GB SSD (1600 GB)i24xlarge 4 x 800 GB SSD (3200 GB)i28xlarge 8 x 800 GB SSD (6400 GB)

2014年年1月29日時点

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

56

Instance Storageを使うべきなのは

 高IOPS高帯域なストレージが必要な場合

 消えても良良い一次データの置き場として使う場合

 ストレージ冗長化を準備できる場合

S3活かしたいメリット

考慮すべき制約

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

57

EC2へのファイル転送は

  SCPを使う scp pk-‐‑‒XXXpem rootec2-‐‑‒XXXamazonawscomxxx

  Windowsの場合はWinSCPなど   S3経由で共有する

  S3にアップロードしEC2からwgetでアクセスする   FTPを立立ち上げる

  EC2側でFTPサーバーを立立ち上げておく

  高速に送信したい   Tsunami UDP Aspera等のソリューション

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

58

VM Import Export

  複数プラットフォームのVMイメージをAmazon EC2に移行行(インポートエクスポート)可能

httpawstypepadcomaws_japan201012vm-‐‑‒import-‐‑‒bring-‐‑‒your-‐‑‒vmware-‐‑‒images-‐‑‒to-‐‑‒the-‐‑‒cloudhtml

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

59

稼働EC2インスタンスからメタデータ取得

  ami-‐‑‒id   ami-‐‑‒launch-‐‑‒index   ami-‐‑‒manifest-‐‑‒path   block-‐‑‒device-‐‑‒mapping   hostname   instance-‐‑‒action   instance-‐‑‒id   Instance-‐‑‒type   kernel-‐‑‒id

  local-‐‑‒hostname   local-‐‑‒ipv4   mac   network   placement   profile   public-‐‑‒hostname   public-‐‑‒ipv4   public-‐‑‒keys   reservation-‐‑‒id

curl http169254169254latestmeta-‐‑‒data

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

60

起動時にパラメーターを渡す   起動時に16KB以内で任意のものを渡せる

  ChefやPuppetなどを利利用して自己構成できるAMIに   参照emsp AWSマイスターemsp CloudFormation資料料httpwwwslidesharenetkentamagawacloudformation-‐‑‒aws5

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

61

EC2コマンドラインツール amp AWS SDKs

  コマンドラインからEC2のAPIにアクセスできるツール   ツールをインストールしセキュリティ証明書を配置

  AWS SDKs httpawsamazoncomcode

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

62

マネージメントコンソールだけでなくAPIからプログラマブルにアクセス

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1a --instance-type m1small

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1b --instance-type m1small

Tokyo リージョン

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

63

EC2のスケジュールイベント表示機能

  EC2インスタンスが稼働しているハードかソフトにメンテナンスが必要な場合に情報を提供する仕組み

  インスタンスリブートシステムリブートリタイヤ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

64

EC2のステータスチェック機能

  下記の2種類のチェックを自動テストで実行行し情報を提示   システムステータスチェック

  EC2インスタンスにネットワークパケットが通るかチェック   インスタンスステータスチェック

  EC2インスタンスのOSがネットワークパケットを受け取るかチェック

  もし状況に乖離離がある場合はレポートできます

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

65

AWS制限増加申請

  EC2を誤って大量量に作成しないよう最大インスタンス数の上限を20に制限しています

  制限増加申請フォームで各種制限の増加を行行えますbull  httpawsamazoncomjpcontact-‐‑‒usemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

66

既存EBSボリュームのサイズ変更更

  例例 10GB -‐‑‒gt 100GB変更更への流流れ   EBSをデタッチする   EBSからS3にスナップショットを作成する

  新たなボリュームサイズを指定してEBSを作成する

  EBSをアタッチする   マウントしてリサイズする

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

スナップショット

EBS (10GB)

EBS (100GB)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

67

EBSとS3

EBSは複数EC2にアタッチ不不可   単独のEC2インスタンスへのブロックデバイスとしての使い方

  NFSのような使い方をする際はEC2にミドルウェアを導入(GlusterFS等)

S3は複数のEC2からアクセス可   ただしWrite Once Read A Lotな使い方に向いている

  アップロード並列列化も使える   耐久性の設計は99999999999で非常に高い

Copyright copy 2011 Amazon Web Services

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

バケット

EBS

EC2インスタンス

HTTPHTTPS

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

68

EIP使用時の注意点

  グローバルIP(EIP)を用いた場合インターネット経由のアクセスとなり課金発生するケースがある

  名前解決したいサーバに固定IPを付与する13   各サーバは固定グローバルIPを元に

AWSのDNSに名前を問い合わせ13   問い合わせた結果返ってくる外部DNS名でサーバにアクセスを行う13   EC2内部で外部DNS名を使ってアクセスすると プライベートIPアドレスに変換されるため 目的のサーバにプライベートIPでアクセスできる13

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

69

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

70

AWSの課金金の仕組みインターネット

ELB

EC2

EBS

S3

データ転送量量

ELB利利用料料データ処理理量量

インスタンスタイプ別利利用料料

EBSの利利用料料

S3の利利用料料

大半を占める

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

71

Simple Monthly Calculator

  Web上にある計算機を使って概算費用を計算できますsect  httpcalculators3amazonawscomcalc5htmllng=ja_JP

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

72

複数の価格モデル

 課金金モデルが選べるsect 通常の時間課金金のオンデマンドインスタンス

sect ある程度度継続してEC2を使う(1年年3年年)EC2リザーブドインスタンス

sect 入札を利利用してより安く使うEC2スポットインスタンス

rarrマイスターシリーズ RIampスポットインスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

73

AWS無料料試用枠

  AWSでは無料料試用枠を用意していますbull  httpawsamazoncomjpfreeemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

74

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

75

Appendix

  参考資料料bull  Amazon Glacier Developer Guidehttpdocsamazonwebservicescomamazonglacierlatestdevintroductionhtml

bull  Amazon Glacier FAQhttpawsamazoncomjpglacierfaqs

bull  Amazon Glaceir価格httpawsamazoncomjpglacierpricing

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

76

QampA

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 47: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

47

AWSセキュリティセンター 13

 日本語のホワイトペーパー bull  セキュリティ概要 bull  リスクとコンプライアンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

48

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

49

最近追加された機能

  VM Import for Linux   IAM EC2 Resource Permissions   リザーブドインスタンスの変更更可能に   SR-‐‑‒IOVネットワークDriverネットワーク性能向上

bull  C3 I2 R3インスタンスで対応

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

50

インスタンスのさらなる追加

  一般的な目的なら M3   Compute Optimizedなら C3   Memory Optimizedなら R3(もうすぐ)   GPUが必要なら G2   IOPS重視なら I2   Disk Based Storage ならHS1

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

51

Intel Processor Features

  m3 c3 cc2 g2 cr1 i2 r3の全てが対応

  AES New Instructions (AES-‐‑‒NI)bull  c1 cg1 m2でも対応

  Advanced Vector Extensions (Intel AVX)bull  HVMでのみ対応

  Turbo Boost Technology

  詳細は httpawsamazoncomec2instance-‐‑‒types

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

52

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

53

故障のための設計 Design for Failure   故障に備えた設計をしておく

  すべてが故障しうると考えシステム全体での保守的設計   SPOF(単一障害点)の排除   障害からの復復旧(対応品質)を重視する

  EC2における故障のための設計   AMIを常にとっておく   EBSスナップショットでバックアップ   複数アベイラビリティゾーンへの分散   ELBでサーバを冗長化Auto Scalingで自動復復帰   Reserved Instanceでキャパシティ保障

  他の冗長性高いサービスとの組み合わせ   S3 SimpleDB RDS他

httpwwwslidesharenetkentamagawaaws-‐‑‒7991623

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

54

定期的なバックアップ

  EC2のAMIを定期的に作成する   (参考) 無停止でAMI取得

Cloudpackさんブログhttpblogcloudpackjp201103aws-‐‑‒news-‐‑‒ec2-‐‑‒instance-‐‑‒no-‐‑‒reboot-‐‑‒amihtml

  データボリュームとしてのEBSの場合EBSのスナップショットを定期的に作成

  スクリプトを書いて定期的なバックアップを行行うことも可能 Coderockさんブログ

httpblogdateofrockcom201003auto-‐‑‒backup-‐‑‒amazon-‐‑‒ebs-‐‑‒with-‐‑‒rubyhtml   サーバーワークスさんブログ

httpblogserverworkscojptech20110721awssdk-‐‑‒for-‐‑‒ruby-‐‑‒create-‐‑‒snapshot

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

55

Instance StorageにSSDを積んだインスタンスが増えてきた

  EC2のタイプによって選択できるInstance Storeは以下の通り

Instance Type Instance Store Volumesm1small 1 x 160 GBdaggerm1medium 1 x 410 GBm1large 2 x 420 GB (840 GB)m1xlarge 4 x 420 GB (1680 GB)m2xlarge 1 x 420 GBm22xlarge 1 x 850 GBm24xlarge 2 x 840 GB (1680 GB)m3medium 1 x 4 GB SSDm3large 1 x 32 GB SSDm3xlarge 2 x 40 GB SSD (80 GB)m32xlarge 2 x 80 GB SSD (160 GB)

t1micro None (use Amazon EBS volumes)

c1medium 1 x 350 GBdaggerc1xlarge 4 x 420 GB (1680 GB)

Instance Type Instance Store Volumes

c3large 2 x 16 GB SSD (32 GB)c3xlarge 2 x 40 GB SSD (80 GB)c32xlarge 2 x 80 GB SSD (160 GB)c34xlarge 2 x 160 GB SSD (320 GB)c38xlarge 2 x 320 GB SSD (640 GB)cc28xlarge 4 x 840 GB (3360 GB)cg14xlarge 2 x 840 GB (1680 GB)cr18xlarge 2 x 120 GB SSD (240 GB)hi14xlarge 2 x 1024 GB SSD (2048 GB)hs18xlarge 24 x 2048 GB (49 TB)i2xlarge 1 x 800 GB SSDi22xlarge 2 x 800 GB SSD (1600 GB)i24xlarge 4 x 800 GB SSD (3200 GB)i28xlarge 8 x 800 GB SSD (6400 GB)

2014年年1月29日時点

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

56

Instance Storageを使うべきなのは

 高IOPS高帯域なストレージが必要な場合

 消えても良良い一次データの置き場として使う場合

 ストレージ冗長化を準備できる場合

S3活かしたいメリット

考慮すべき制約

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

57

EC2へのファイル転送は

  SCPを使う scp pk-‐‑‒XXXpem rootec2-‐‑‒XXXamazonawscomxxx

  Windowsの場合はWinSCPなど   S3経由で共有する

  S3にアップロードしEC2からwgetでアクセスする   FTPを立立ち上げる

  EC2側でFTPサーバーを立立ち上げておく

  高速に送信したい   Tsunami UDP Aspera等のソリューション

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

58

VM Import Export

  複数プラットフォームのVMイメージをAmazon EC2に移行行(インポートエクスポート)可能

httpawstypepadcomaws_japan201012vm-‐‑‒import-‐‑‒bring-‐‑‒your-‐‑‒vmware-‐‑‒images-‐‑‒to-‐‑‒the-‐‑‒cloudhtml

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

59

稼働EC2インスタンスからメタデータ取得

  ami-‐‑‒id   ami-‐‑‒launch-‐‑‒index   ami-‐‑‒manifest-‐‑‒path   block-‐‑‒device-‐‑‒mapping   hostname   instance-‐‑‒action   instance-‐‑‒id   Instance-‐‑‒type   kernel-‐‑‒id

  local-‐‑‒hostname   local-‐‑‒ipv4   mac   network   placement   profile   public-‐‑‒hostname   public-‐‑‒ipv4   public-‐‑‒keys   reservation-‐‑‒id

curl http169254169254latestmeta-‐‑‒data

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

60

起動時にパラメーターを渡す   起動時に16KB以内で任意のものを渡せる

  ChefやPuppetなどを利利用して自己構成できるAMIに   参照emsp AWSマイスターemsp CloudFormation資料料httpwwwslidesharenetkentamagawacloudformation-‐‑‒aws5

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

61

EC2コマンドラインツール amp AWS SDKs

  コマンドラインからEC2のAPIにアクセスできるツール   ツールをインストールしセキュリティ証明書を配置

  AWS SDKs httpawsamazoncomcode

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

62

マネージメントコンソールだけでなくAPIからプログラマブルにアクセス

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1a --instance-type m1small

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1b --instance-type m1small

Tokyo リージョン

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

63

EC2のスケジュールイベント表示機能

  EC2インスタンスが稼働しているハードかソフトにメンテナンスが必要な場合に情報を提供する仕組み

  インスタンスリブートシステムリブートリタイヤ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

64

EC2のステータスチェック機能

  下記の2種類のチェックを自動テストで実行行し情報を提示   システムステータスチェック

  EC2インスタンスにネットワークパケットが通るかチェック   インスタンスステータスチェック

  EC2インスタンスのOSがネットワークパケットを受け取るかチェック

  もし状況に乖離離がある場合はレポートできます

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

65

AWS制限増加申請

  EC2を誤って大量量に作成しないよう最大インスタンス数の上限を20に制限しています

  制限増加申請フォームで各種制限の増加を行行えますbull  httpawsamazoncomjpcontact-‐‑‒usemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

66

既存EBSボリュームのサイズ変更更

  例例 10GB -‐‑‒gt 100GB変更更への流流れ   EBSをデタッチする   EBSからS3にスナップショットを作成する

  新たなボリュームサイズを指定してEBSを作成する

  EBSをアタッチする   マウントしてリサイズする

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

スナップショット

EBS (10GB)

EBS (100GB)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

67

EBSとS3

EBSは複数EC2にアタッチ不不可   単独のEC2インスタンスへのブロックデバイスとしての使い方

  NFSのような使い方をする際はEC2にミドルウェアを導入(GlusterFS等)

S3は複数のEC2からアクセス可   ただしWrite Once Read A Lotな使い方に向いている

  アップロード並列列化も使える   耐久性の設計は99999999999で非常に高い

Copyright copy 2011 Amazon Web Services

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

バケット

EBS

EC2インスタンス

HTTPHTTPS

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

68

EIP使用時の注意点

  グローバルIP(EIP)を用いた場合インターネット経由のアクセスとなり課金発生するケースがある

  名前解決したいサーバに固定IPを付与する13   各サーバは固定グローバルIPを元に

AWSのDNSに名前を問い合わせ13   問い合わせた結果返ってくる外部DNS名でサーバにアクセスを行う13   EC2内部で外部DNS名を使ってアクセスすると プライベートIPアドレスに変換されるため 目的のサーバにプライベートIPでアクセスできる13

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

69

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

70

AWSの課金金の仕組みインターネット

ELB

EC2

EBS

S3

データ転送量量

ELB利利用料料データ処理理量量

インスタンスタイプ別利利用料料

EBSの利利用料料

S3の利利用料料

大半を占める

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

71

Simple Monthly Calculator

  Web上にある計算機を使って概算費用を計算できますsect  httpcalculators3amazonawscomcalc5htmllng=ja_JP

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

72

複数の価格モデル

 課金金モデルが選べるsect 通常の時間課金金のオンデマンドインスタンス

sect ある程度度継続してEC2を使う(1年年3年年)EC2リザーブドインスタンス

sect 入札を利利用してより安く使うEC2スポットインスタンス

rarrマイスターシリーズ RIampスポットインスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

73

AWS無料料試用枠

  AWSでは無料料試用枠を用意していますbull  httpawsamazoncomjpfreeemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

74

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

75

Appendix

  参考資料料bull  Amazon Glacier Developer Guidehttpdocsamazonwebservicescomamazonglacierlatestdevintroductionhtml

bull  Amazon Glacier FAQhttpawsamazoncomjpglacierfaqs

bull  Amazon Glaceir価格httpawsamazoncomjpglacierpricing

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

76

QampA

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 48: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

48

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

49

最近追加された機能

  VM Import for Linux   IAM EC2 Resource Permissions   リザーブドインスタンスの変更更可能に   SR-‐‑‒IOVネットワークDriverネットワーク性能向上

bull  C3 I2 R3インスタンスで対応

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

50

インスタンスのさらなる追加

  一般的な目的なら M3   Compute Optimizedなら C3   Memory Optimizedなら R3(もうすぐ)   GPUが必要なら G2   IOPS重視なら I2   Disk Based Storage ならHS1

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

51

Intel Processor Features

  m3 c3 cc2 g2 cr1 i2 r3の全てが対応

  AES New Instructions (AES-‐‑‒NI)bull  c1 cg1 m2でも対応

  Advanced Vector Extensions (Intel AVX)bull  HVMでのみ対応

  Turbo Boost Technology

  詳細は httpawsamazoncomec2instance-‐‑‒types

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

52

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

53

故障のための設計 Design for Failure   故障に備えた設計をしておく

  すべてが故障しうると考えシステム全体での保守的設計   SPOF(単一障害点)の排除   障害からの復復旧(対応品質)を重視する

  EC2における故障のための設計   AMIを常にとっておく   EBSスナップショットでバックアップ   複数アベイラビリティゾーンへの分散   ELBでサーバを冗長化Auto Scalingで自動復復帰   Reserved Instanceでキャパシティ保障

  他の冗長性高いサービスとの組み合わせ   S3 SimpleDB RDS他

httpwwwslidesharenetkentamagawaaws-‐‑‒7991623

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

54

定期的なバックアップ

  EC2のAMIを定期的に作成する   (参考) 無停止でAMI取得

Cloudpackさんブログhttpblogcloudpackjp201103aws-‐‑‒news-‐‑‒ec2-‐‑‒instance-‐‑‒no-‐‑‒reboot-‐‑‒amihtml

  データボリュームとしてのEBSの場合EBSのスナップショットを定期的に作成

  スクリプトを書いて定期的なバックアップを行行うことも可能 Coderockさんブログ

httpblogdateofrockcom201003auto-‐‑‒backup-‐‑‒amazon-‐‑‒ebs-‐‑‒with-‐‑‒rubyhtml   サーバーワークスさんブログ

httpblogserverworkscojptech20110721awssdk-‐‑‒for-‐‑‒ruby-‐‑‒create-‐‑‒snapshot

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

55

Instance StorageにSSDを積んだインスタンスが増えてきた

  EC2のタイプによって選択できるInstance Storeは以下の通り

Instance Type Instance Store Volumesm1small 1 x 160 GBdaggerm1medium 1 x 410 GBm1large 2 x 420 GB (840 GB)m1xlarge 4 x 420 GB (1680 GB)m2xlarge 1 x 420 GBm22xlarge 1 x 850 GBm24xlarge 2 x 840 GB (1680 GB)m3medium 1 x 4 GB SSDm3large 1 x 32 GB SSDm3xlarge 2 x 40 GB SSD (80 GB)m32xlarge 2 x 80 GB SSD (160 GB)

t1micro None (use Amazon EBS volumes)

c1medium 1 x 350 GBdaggerc1xlarge 4 x 420 GB (1680 GB)

Instance Type Instance Store Volumes

c3large 2 x 16 GB SSD (32 GB)c3xlarge 2 x 40 GB SSD (80 GB)c32xlarge 2 x 80 GB SSD (160 GB)c34xlarge 2 x 160 GB SSD (320 GB)c38xlarge 2 x 320 GB SSD (640 GB)cc28xlarge 4 x 840 GB (3360 GB)cg14xlarge 2 x 840 GB (1680 GB)cr18xlarge 2 x 120 GB SSD (240 GB)hi14xlarge 2 x 1024 GB SSD (2048 GB)hs18xlarge 24 x 2048 GB (49 TB)i2xlarge 1 x 800 GB SSDi22xlarge 2 x 800 GB SSD (1600 GB)i24xlarge 4 x 800 GB SSD (3200 GB)i28xlarge 8 x 800 GB SSD (6400 GB)

2014年年1月29日時点

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

56

Instance Storageを使うべきなのは

 高IOPS高帯域なストレージが必要な場合

 消えても良良い一次データの置き場として使う場合

 ストレージ冗長化を準備できる場合

S3活かしたいメリット

考慮すべき制約

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

57

EC2へのファイル転送は

  SCPを使う scp pk-‐‑‒XXXpem rootec2-‐‑‒XXXamazonawscomxxx

  Windowsの場合はWinSCPなど   S3経由で共有する

  S3にアップロードしEC2からwgetでアクセスする   FTPを立立ち上げる

  EC2側でFTPサーバーを立立ち上げておく

  高速に送信したい   Tsunami UDP Aspera等のソリューション

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

58

VM Import Export

  複数プラットフォームのVMイメージをAmazon EC2に移行行(インポートエクスポート)可能

httpawstypepadcomaws_japan201012vm-‐‑‒import-‐‑‒bring-‐‑‒your-‐‑‒vmware-‐‑‒images-‐‑‒to-‐‑‒the-‐‑‒cloudhtml

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

59

稼働EC2インスタンスからメタデータ取得

  ami-‐‑‒id   ami-‐‑‒launch-‐‑‒index   ami-‐‑‒manifest-‐‑‒path   block-‐‑‒device-‐‑‒mapping   hostname   instance-‐‑‒action   instance-‐‑‒id   Instance-‐‑‒type   kernel-‐‑‒id

  local-‐‑‒hostname   local-‐‑‒ipv4   mac   network   placement   profile   public-‐‑‒hostname   public-‐‑‒ipv4   public-‐‑‒keys   reservation-‐‑‒id

curl http169254169254latestmeta-‐‑‒data

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

60

起動時にパラメーターを渡す   起動時に16KB以内で任意のものを渡せる

  ChefやPuppetなどを利利用して自己構成できるAMIに   参照emsp AWSマイスターemsp CloudFormation資料料httpwwwslidesharenetkentamagawacloudformation-‐‑‒aws5

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

61

EC2コマンドラインツール amp AWS SDKs

  コマンドラインからEC2のAPIにアクセスできるツール   ツールをインストールしセキュリティ証明書を配置

  AWS SDKs httpawsamazoncomcode

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

62

マネージメントコンソールだけでなくAPIからプログラマブルにアクセス

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1a --instance-type m1small

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1b --instance-type m1small

Tokyo リージョン

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

63

EC2のスケジュールイベント表示機能

  EC2インスタンスが稼働しているハードかソフトにメンテナンスが必要な場合に情報を提供する仕組み

  インスタンスリブートシステムリブートリタイヤ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

64

EC2のステータスチェック機能

  下記の2種類のチェックを自動テストで実行行し情報を提示   システムステータスチェック

  EC2インスタンスにネットワークパケットが通るかチェック   インスタンスステータスチェック

  EC2インスタンスのOSがネットワークパケットを受け取るかチェック

  もし状況に乖離離がある場合はレポートできます

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

65

AWS制限増加申請

  EC2を誤って大量量に作成しないよう最大インスタンス数の上限を20に制限しています

  制限増加申請フォームで各種制限の増加を行行えますbull  httpawsamazoncomjpcontact-‐‑‒usemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

66

既存EBSボリュームのサイズ変更更

  例例 10GB -‐‑‒gt 100GB変更更への流流れ   EBSをデタッチする   EBSからS3にスナップショットを作成する

  新たなボリュームサイズを指定してEBSを作成する

  EBSをアタッチする   マウントしてリサイズする

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

スナップショット

EBS (10GB)

EBS (100GB)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

67

EBSとS3

EBSは複数EC2にアタッチ不不可   単独のEC2インスタンスへのブロックデバイスとしての使い方

  NFSのような使い方をする際はEC2にミドルウェアを導入(GlusterFS等)

S3は複数のEC2からアクセス可   ただしWrite Once Read A Lotな使い方に向いている

  アップロード並列列化も使える   耐久性の設計は99999999999で非常に高い

Copyright copy 2011 Amazon Web Services

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

バケット

EBS

EC2インスタンス

HTTPHTTPS

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

68

EIP使用時の注意点

  グローバルIP(EIP)を用いた場合インターネット経由のアクセスとなり課金発生するケースがある

  名前解決したいサーバに固定IPを付与する13   各サーバは固定グローバルIPを元に

AWSのDNSに名前を問い合わせ13   問い合わせた結果返ってくる外部DNS名でサーバにアクセスを行う13   EC2内部で外部DNS名を使ってアクセスすると プライベートIPアドレスに変換されるため 目的のサーバにプライベートIPでアクセスできる13

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

69

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

70

AWSの課金金の仕組みインターネット

ELB

EC2

EBS

S3

データ転送量量

ELB利利用料料データ処理理量量

インスタンスタイプ別利利用料料

EBSの利利用料料

S3の利利用料料

大半を占める

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

71

Simple Monthly Calculator

  Web上にある計算機を使って概算費用を計算できますsect  httpcalculators3amazonawscomcalc5htmllng=ja_JP

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

72

複数の価格モデル

 課金金モデルが選べるsect 通常の時間課金金のオンデマンドインスタンス

sect ある程度度継続してEC2を使う(1年年3年年)EC2リザーブドインスタンス

sect 入札を利利用してより安く使うEC2スポットインスタンス

rarrマイスターシリーズ RIampスポットインスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

73

AWS無料料試用枠

  AWSでは無料料試用枠を用意していますbull  httpawsamazoncomjpfreeemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

74

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

75

Appendix

  参考資料料bull  Amazon Glacier Developer Guidehttpdocsamazonwebservicescomamazonglacierlatestdevintroductionhtml

bull  Amazon Glacier FAQhttpawsamazoncomjpglacierfaqs

bull  Amazon Glaceir価格httpawsamazoncomjpglacierpricing

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

76

QampA

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 49: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

49

最近追加された機能

  VM Import for Linux   IAM EC2 Resource Permissions   リザーブドインスタンスの変更更可能に   SR-‐‑‒IOVネットワークDriverネットワーク性能向上

bull  C3 I2 R3インスタンスで対応

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

50

インスタンスのさらなる追加

  一般的な目的なら M3   Compute Optimizedなら C3   Memory Optimizedなら R3(もうすぐ)   GPUが必要なら G2   IOPS重視なら I2   Disk Based Storage ならHS1

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

51

Intel Processor Features

  m3 c3 cc2 g2 cr1 i2 r3の全てが対応

  AES New Instructions (AES-‐‑‒NI)bull  c1 cg1 m2でも対応

  Advanced Vector Extensions (Intel AVX)bull  HVMでのみ対応

  Turbo Boost Technology

  詳細は httpawsamazoncomec2instance-‐‑‒types

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

52

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

53

故障のための設計 Design for Failure   故障に備えた設計をしておく

  すべてが故障しうると考えシステム全体での保守的設計   SPOF(単一障害点)の排除   障害からの復復旧(対応品質)を重視する

  EC2における故障のための設計   AMIを常にとっておく   EBSスナップショットでバックアップ   複数アベイラビリティゾーンへの分散   ELBでサーバを冗長化Auto Scalingで自動復復帰   Reserved Instanceでキャパシティ保障

  他の冗長性高いサービスとの組み合わせ   S3 SimpleDB RDS他

httpwwwslidesharenetkentamagawaaws-‐‑‒7991623

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

54

定期的なバックアップ

  EC2のAMIを定期的に作成する   (参考) 無停止でAMI取得

Cloudpackさんブログhttpblogcloudpackjp201103aws-‐‑‒news-‐‑‒ec2-‐‑‒instance-‐‑‒no-‐‑‒reboot-‐‑‒amihtml

  データボリュームとしてのEBSの場合EBSのスナップショットを定期的に作成

  スクリプトを書いて定期的なバックアップを行行うことも可能 Coderockさんブログ

httpblogdateofrockcom201003auto-‐‑‒backup-‐‑‒amazon-‐‑‒ebs-‐‑‒with-‐‑‒rubyhtml   サーバーワークスさんブログ

httpblogserverworkscojptech20110721awssdk-‐‑‒for-‐‑‒ruby-‐‑‒create-‐‑‒snapshot

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

55

Instance StorageにSSDを積んだインスタンスが増えてきた

  EC2のタイプによって選択できるInstance Storeは以下の通り

Instance Type Instance Store Volumesm1small 1 x 160 GBdaggerm1medium 1 x 410 GBm1large 2 x 420 GB (840 GB)m1xlarge 4 x 420 GB (1680 GB)m2xlarge 1 x 420 GBm22xlarge 1 x 850 GBm24xlarge 2 x 840 GB (1680 GB)m3medium 1 x 4 GB SSDm3large 1 x 32 GB SSDm3xlarge 2 x 40 GB SSD (80 GB)m32xlarge 2 x 80 GB SSD (160 GB)

t1micro None (use Amazon EBS volumes)

c1medium 1 x 350 GBdaggerc1xlarge 4 x 420 GB (1680 GB)

Instance Type Instance Store Volumes

c3large 2 x 16 GB SSD (32 GB)c3xlarge 2 x 40 GB SSD (80 GB)c32xlarge 2 x 80 GB SSD (160 GB)c34xlarge 2 x 160 GB SSD (320 GB)c38xlarge 2 x 320 GB SSD (640 GB)cc28xlarge 4 x 840 GB (3360 GB)cg14xlarge 2 x 840 GB (1680 GB)cr18xlarge 2 x 120 GB SSD (240 GB)hi14xlarge 2 x 1024 GB SSD (2048 GB)hs18xlarge 24 x 2048 GB (49 TB)i2xlarge 1 x 800 GB SSDi22xlarge 2 x 800 GB SSD (1600 GB)i24xlarge 4 x 800 GB SSD (3200 GB)i28xlarge 8 x 800 GB SSD (6400 GB)

2014年年1月29日時点

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

56

Instance Storageを使うべきなのは

 高IOPS高帯域なストレージが必要な場合

 消えても良良い一次データの置き場として使う場合

 ストレージ冗長化を準備できる場合

S3活かしたいメリット

考慮すべき制約

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

57

EC2へのファイル転送は

  SCPを使う scp pk-‐‑‒XXXpem rootec2-‐‑‒XXXamazonawscomxxx

  Windowsの場合はWinSCPなど   S3経由で共有する

  S3にアップロードしEC2からwgetでアクセスする   FTPを立立ち上げる

  EC2側でFTPサーバーを立立ち上げておく

  高速に送信したい   Tsunami UDP Aspera等のソリューション

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

58

VM Import Export

  複数プラットフォームのVMイメージをAmazon EC2に移行行(インポートエクスポート)可能

httpawstypepadcomaws_japan201012vm-‐‑‒import-‐‑‒bring-‐‑‒your-‐‑‒vmware-‐‑‒images-‐‑‒to-‐‑‒the-‐‑‒cloudhtml

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

59

稼働EC2インスタンスからメタデータ取得

  ami-‐‑‒id   ami-‐‑‒launch-‐‑‒index   ami-‐‑‒manifest-‐‑‒path   block-‐‑‒device-‐‑‒mapping   hostname   instance-‐‑‒action   instance-‐‑‒id   Instance-‐‑‒type   kernel-‐‑‒id

  local-‐‑‒hostname   local-‐‑‒ipv4   mac   network   placement   profile   public-‐‑‒hostname   public-‐‑‒ipv4   public-‐‑‒keys   reservation-‐‑‒id

curl http169254169254latestmeta-‐‑‒data

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

60

起動時にパラメーターを渡す   起動時に16KB以内で任意のものを渡せる

  ChefやPuppetなどを利利用して自己構成できるAMIに   参照emsp AWSマイスターemsp CloudFormation資料料httpwwwslidesharenetkentamagawacloudformation-‐‑‒aws5

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

61

EC2コマンドラインツール amp AWS SDKs

  コマンドラインからEC2のAPIにアクセスできるツール   ツールをインストールしセキュリティ証明書を配置

  AWS SDKs httpawsamazoncomcode

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

62

マネージメントコンソールだけでなくAPIからプログラマブルにアクセス

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1a --instance-type m1small

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1b --instance-type m1small

Tokyo リージョン

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

63

EC2のスケジュールイベント表示機能

  EC2インスタンスが稼働しているハードかソフトにメンテナンスが必要な場合に情報を提供する仕組み

  インスタンスリブートシステムリブートリタイヤ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

64

EC2のステータスチェック機能

  下記の2種類のチェックを自動テストで実行行し情報を提示   システムステータスチェック

  EC2インスタンスにネットワークパケットが通るかチェック   インスタンスステータスチェック

  EC2インスタンスのOSがネットワークパケットを受け取るかチェック

  もし状況に乖離離がある場合はレポートできます

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

65

AWS制限増加申請

  EC2を誤って大量量に作成しないよう最大インスタンス数の上限を20に制限しています

  制限増加申請フォームで各種制限の増加を行行えますbull  httpawsamazoncomjpcontact-‐‑‒usemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

66

既存EBSボリュームのサイズ変更更

  例例 10GB -‐‑‒gt 100GB変更更への流流れ   EBSをデタッチする   EBSからS3にスナップショットを作成する

  新たなボリュームサイズを指定してEBSを作成する

  EBSをアタッチする   マウントしてリサイズする

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

スナップショット

EBS (10GB)

EBS (100GB)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

67

EBSとS3

EBSは複数EC2にアタッチ不不可   単独のEC2インスタンスへのブロックデバイスとしての使い方

  NFSのような使い方をする際はEC2にミドルウェアを導入(GlusterFS等)

S3は複数のEC2からアクセス可   ただしWrite Once Read A Lotな使い方に向いている

  アップロード並列列化も使える   耐久性の設計は99999999999で非常に高い

Copyright copy 2011 Amazon Web Services

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

バケット

EBS

EC2インスタンス

HTTPHTTPS

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

68

EIP使用時の注意点

  グローバルIP(EIP)を用いた場合インターネット経由のアクセスとなり課金発生するケースがある

  名前解決したいサーバに固定IPを付与する13   各サーバは固定グローバルIPを元に

AWSのDNSに名前を問い合わせ13   問い合わせた結果返ってくる外部DNS名でサーバにアクセスを行う13   EC2内部で外部DNS名を使ってアクセスすると プライベートIPアドレスに変換されるため 目的のサーバにプライベートIPでアクセスできる13

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

69

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

70

AWSの課金金の仕組みインターネット

ELB

EC2

EBS

S3

データ転送量量

ELB利利用料料データ処理理量量

インスタンスタイプ別利利用料料

EBSの利利用料料

S3の利利用料料

大半を占める

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

71

Simple Monthly Calculator

  Web上にある計算機を使って概算費用を計算できますsect  httpcalculators3amazonawscomcalc5htmllng=ja_JP

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

72

複数の価格モデル

 課金金モデルが選べるsect 通常の時間課金金のオンデマンドインスタンス

sect ある程度度継続してEC2を使う(1年年3年年)EC2リザーブドインスタンス

sect 入札を利利用してより安く使うEC2スポットインスタンス

rarrマイスターシリーズ RIampスポットインスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

73

AWS無料料試用枠

  AWSでは無料料試用枠を用意していますbull  httpawsamazoncomjpfreeemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

74

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

75

Appendix

  参考資料料bull  Amazon Glacier Developer Guidehttpdocsamazonwebservicescomamazonglacierlatestdevintroductionhtml

bull  Amazon Glacier FAQhttpawsamazoncomjpglacierfaqs

bull  Amazon Glaceir価格httpawsamazoncomjpglacierpricing

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

76

QampA

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 50: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

50

インスタンスのさらなる追加

  一般的な目的なら M3   Compute Optimizedなら C3   Memory Optimizedなら R3(もうすぐ)   GPUが必要なら G2   IOPS重視なら I2   Disk Based Storage ならHS1

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

51

Intel Processor Features

  m3 c3 cc2 g2 cr1 i2 r3の全てが対応

  AES New Instructions (AES-‐‑‒NI)bull  c1 cg1 m2でも対応

  Advanced Vector Extensions (Intel AVX)bull  HVMでのみ対応

  Turbo Boost Technology

  詳細は httpawsamazoncomec2instance-‐‑‒types

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

52

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

53

故障のための設計 Design for Failure   故障に備えた設計をしておく

  すべてが故障しうると考えシステム全体での保守的設計   SPOF(単一障害点)の排除   障害からの復復旧(対応品質)を重視する

  EC2における故障のための設計   AMIを常にとっておく   EBSスナップショットでバックアップ   複数アベイラビリティゾーンへの分散   ELBでサーバを冗長化Auto Scalingで自動復復帰   Reserved Instanceでキャパシティ保障

  他の冗長性高いサービスとの組み合わせ   S3 SimpleDB RDS他

httpwwwslidesharenetkentamagawaaws-‐‑‒7991623

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

54

定期的なバックアップ

  EC2のAMIを定期的に作成する   (参考) 無停止でAMI取得

Cloudpackさんブログhttpblogcloudpackjp201103aws-‐‑‒news-‐‑‒ec2-‐‑‒instance-‐‑‒no-‐‑‒reboot-‐‑‒amihtml

  データボリュームとしてのEBSの場合EBSのスナップショットを定期的に作成

  スクリプトを書いて定期的なバックアップを行行うことも可能 Coderockさんブログ

httpblogdateofrockcom201003auto-‐‑‒backup-‐‑‒amazon-‐‑‒ebs-‐‑‒with-‐‑‒rubyhtml   サーバーワークスさんブログ

httpblogserverworkscojptech20110721awssdk-‐‑‒for-‐‑‒ruby-‐‑‒create-‐‑‒snapshot

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

55

Instance StorageにSSDを積んだインスタンスが増えてきた

  EC2のタイプによって選択できるInstance Storeは以下の通り

Instance Type Instance Store Volumesm1small 1 x 160 GBdaggerm1medium 1 x 410 GBm1large 2 x 420 GB (840 GB)m1xlarge 4 x 420 GB (1680 GB)m2xlarge 1 x 420 GBm22xlarge 1 x 850 GBm24xlarge 2 x 840 GB (1680 GB)m3medium 1 x 4 GB SSDm3large 1 x 32 GB SSDm3xlarge 2 x 40 GB SSD (80 GB)m32xlarge 2 x 80 GB SSD (160 GB)

t1micro None (use Amazon EBS volumes)

c1medium 1 x 350 GBdaggerc1xlarge 4 x 420 GB (1680 GB)

Instance Type Instance Store Volumes

c3large 2 x 16 GB SSD (32 GB)c3xlarge 2 x 40 GB SSD (80 GB)c32xlarge 2 x 80 GB SSD (160 GB)c34xlarge 2 x 160 GB SSD (320 GB)c38xlarge 2 x 320 GB SSD (640 GB)cc28xlarge 4 x 840 GB (3360 GB)cg14xlarge 2 x 840 GB (1680 GB)cr18xlarge 2 x 120 GB SSD (240 GB)hi14xlarge 2 x 1024 GB SSD (2048 GB)hs18xlarge 24 x 2048 GB (49 TB)i2xlarge 1 x 800 GB SSDi22xlarge 2 x 800 GB SSD (1600 GB)i24xlarge 4 x 800 GB SSD (3200 GB)i28xlarge 8 x 800 GB SSD (6400 GB)

2014年年1月29日時点

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

56

Instance Storageを使うべきなのは

 高IOPS高帯域なストレージが必要な場合

 消えても良良い一次データの置き場として使う場合

 ストレージ冗長化を準備できる場合

S3活かしたいメリット

考慮すべき制約

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

57

EC2へのファイル転送は

  SCPを使う scp pk-‐‑‒XXXpem rootec2-‐‑‒XXXamazonawscomxxx

  Windowsの場合はWinSCPなど   S3経由で共有する

  S3にアップロードしEC2からwgetでアクセスする   FTPを立立ち上げる

  EC2側でFTPサーバーを立立ち上げておく

  高速に送信したい   Tsunami UDP Aspera等のソリューション

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

58

VM Import Export

  複数プラットフォームのVMイメージをAmazon EC2に移行行(インポートエクスポート)可能

httpawstypepadcomaws_japan201012vm-‐‑‒import-‐‑‒bring-‐‑‒your-‐‑‒vmware-‐‑‒images-‐‑‒to-‐‑‒the-‐‑‒cloudhtml

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

59

稼働EC2インスタンスからメタデータ取得

  ami-‐‑‒id   ami-‐‑‒launch-‐‑‒index   ami-‐‑‒manifest-‐‑‒path   block-‐‑‒device-‐‑‒mapping   hostname   instance-‐‑‒action   instance-‐‑‒id   Instance-‐‑‒type   kernel-‐‑‒id

  local-‐‑‒hostname   local-‐‑‒ipv4   mac   network   placement   profile   public-‐‑‒hostname   public-‐‑‒ipv4   public-‐‑‒keys   reservation-‐‑‒id

curl http169254169254latestmeta-‐‑‒data

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

60

起動時にパラメーターを渡す   起動時に16KB以内で任意のものを渡せる

  ChefやPuppetなどを利利用して自己構成できるAMIに   参照emsp AWSマイスターemsp CloudFormation資料料httpwwwslidesharenetkentamagawacloudformation-‐‑‒aws5

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

61

EC2コマンドラインツール amp AWS SDKs

  コマンドラインからEC2のAPIにアクセスできるツール   ツールをインストールしセキュリティ証明書を配置

  AWS SDKs httpawsamazoncomcode

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

62

マネージメントコンソールだけでなくAPIからプログラマブルにアクセス

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1a --instance-type m1small

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1b --instance-type m1small

Tokyo リージョン

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

63

EC2のスケジュールイベント表示機能

  EC2インスタンスが稼働しているハードかソフトにメンテナンスが必要な場合に情報を提供する仕組み

  インスタンスリブートシステムリブートリタイヤ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

64

EC2のステータスチェック機能

  下記の2種類のチェックを自動テストで実行行し情報を提示   システムステータスチェック

  EC2インスタンスにネットワークパケットが通るかチェック   インスタンスステータスチェック

  EC2インスタンスのOSがネットワークパケットを受け取るかチェック

  もし状況に乖離離がある場合はレポートできます

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

65

AWS制限増加申請

  EC2を誤って大量量に作成しないよう最大インスタンス数の上限を20に制限しています

  制限増加申請フォームで各種制限の増加を行行えますbull  httpawsamazoncomjpcontact-‐‑‒usemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

66

既存EBSボリュームのサイズ変更更

  例例 10GB -‐‑‒gt 100GB変更更への流流れ   EBSをデタッチする   EBSからS3にスナップショットを作成する

  新たなボリュームサイズを指定してEBSを作成する

  EBSをアタッチする   マウントしてリサイズする

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

スナップショット

EBS (10GB)

EBS (100GB)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

67

EBSとS3

EBSは複数EC2にアタッチ不不可   単独のEC2インスタンスへのブロックデバイスとしての使い方

  NFSのような使い方をする際はEC2にミドルウェアを導入(GlusterFS等)

S3は複数のEC2からアクセス可   ただしWrite Once Read A Lotな使い方に向いている

  アップロード並列列化も使える   耐久性の設計は99999999999で非常に高い

Copyright copy 2011 Amazon Web Services

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

バケット

EBS

EC2インスタンス

HTTPHTTPS

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

68

EIP使用時の注意点

  グローバルIP(EIP)を用いた場合インターネット経由のアクセスとなり課金発生するケースがある

  名前解決したいサーバに固定IPを付与する13   各サーバは固定グローバルIPを元に

AWSのDNSに名前を問い合わせ13   問い合わせた結果返ってくる外部DNS名でサーバにアクセスを行う13   EC2内部で外部DNS名を使ってアクセスすると プライベートIPアドレスに変換されるため 目的のサーバにプライベートIPでアクセスできる13

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

69

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

70

AWSの課金金の仕組みインターネット

ELB

EC2

EBS

S3

データ転送量量

ELB利利用料料データ処理理量量

インスタンスタイプ別利利用料料

EBSの利利用料料

S3の利利用料料

大半を占める

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

71

Simple Monthly Calculator

  Web上にある計算機を使って概算費用を計算できますsect  httpcalculators3amazonawscomcalc5htmllng=ja_JP

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

72

複数の価格モデル

 課金金モデルが選べるsect 通常の時間課金金のオンデマンドインスタンス

sect ある程度度継続してEC2を使う(1年年3年年)EC2リザーブドインスタンス

sect 入札を利利用してより安く使うEC2スポットインスタンス

rarrマイスターシリーズ RIampスポットインスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

73

AWS無料料試用枠

  AWSでは無料料試用枠を用意していますbull  httpawsamazoncomjpfreeemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

74

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

75

Appendix

  参考資料料bull  Amazon Glacier Developer Guidehttpdocsamazonwebservicescomamazonglacierlatestdevintroductionhtml

bull  Amazon Glacier FAQhttpawsamazoncomjpglacierfaqs

bull  Amazon Glaceir価格httpawsamazoncomjpglacierpricing

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

76

QampA

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 51: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

51

Intel Processor Features

  m3 c3 cc2 g2 cr1 i2 r3の全てが対応

  AES New Instructions (AES-‐‑‒NI)bull  c1 cg1 m2でも対応

  Advanced Vector Extensions (Intel AVX)bull  HVMでのみ対応

  Turbo Boost Technology

  詳細は httpawsamazoncomec2instance-‐‑‒types

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

52

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

53

故障のための設計 Design for Failure   故障に備えた設計をしておく

  すべてが故障しうると考えシステム全体での保守的設計   SPOF(単一障害点)の排除   障害からの復復旧(対応品質)を重視する

  EC2における故障のための設計   AMIを常にとっておく   EBSスナップショットでバックアップ   複数アベイラビリティゾーンへの分散   ELBでサーバを冗長化Auto Scalingで自動復復帰   Reserved Instanceでキャパシティ保障

  他の冗長性高いサービスとの組み合わせ   S3 SimpleDB RDS他

httpwwwslidesharenetkentamagawaaws-‐‑‒7991623

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

54

定期的なバックアップ

  EC2のAMIを定期的に作成する   (参考) 無停止でAMI取得

Cloudpackさんブログhttpblogcloudpackjp201103aws-‐‑‒news-‐‑‒ec2-‐‑‒instance-‐‑‒no-‐‑‒reboot-‐‑‒amihtml

  データボリュームとしてのEBSの場合EBSのスナップショットを定期的に作成

  スクリプトを書いて定期的なバックアップを行行うことも可能 Coderockさんブログ

httpblogdateofrockcom201003auto-‐‑‒backup-‐‑‒amazon-‐‑‒ebs-‐‑‒with-‐‑‒rubyhtml   サーバーワークスさんブログ

httpblogserverworkscojptech20110721awssdk-‐‑‒for-‐‑‒ruby-‐‑‒create-‐‑‒snapshot

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

55

Instance StorageにSSDを積んだインスタンスが増えてきた

  EC2のタイプによって選択できるInstance Storeは以下の通り

Instance Type Instance Store Volumesm1small 1 x 160 GBdaggerm1medium 1 x 410 GBm1large 2 x 420 GB (840 GB)m1xlarge 4 x 420 GB (1680 GB)m2xlarge 1 x 420 GBm22xlarge 1 x 850 GBm24xlarge 2 x 840 GB (1680 GB)m3medium 1 x 4 GB SSDm3large 1 x 32 GB SSDm3xlarge 2 x 40 GB SSD (80 GB)m32xlarge 2 x 80 GB SSD (160 GB)

t1micro None (use Amazon EBS volumes)

c1medium 1 x 350 GBdaggerc1xlarge 4 x 420 GB (1680 GB)

Instance Type Instance Store Volumes

c3large 2 x 16 GB SSD (32 GB)c3xlarge 2 x 40 GB SSD (80 GB)c32xlarge 2 x 80 GB SSD (160 GB)c34xlarge 2 x 160 GB SSD (320 GB)c38xlarge 2 x 320 GB SSD (640 GB)cc28xlarge 4 x 840 GB (3360 GB)cg14xlarge 2 x 840 GB (1680 GB)cr18xlarge 2 x 120 GB SSD (240 GB)hi14xlarge 2 x 1024 GB SSD (2048 GB)hs18xlarge 24 x 2048 GB (49 TB)i2xlarge 1 x 800 GB SSDi22xlarge 2 x 800 GB SSD (1600 GB)i24xlarge 4 x 800 GB SSD (3200 GB)i28xlarge 8 x 800 GB SSD (6400 GB)

2014年年1月29日時点

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

56

Instance Storageを使うべきなのは

 高IOPS高帯域なストレージが必要な場合

 消えても良良い一次データの置き場として使う場合

 ストレージ冗長化を準備できる場合

S3活かしたいメリット

考慮すべき制約

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

57

EC2へのファイル転送は

  SCPを使う scp pk-‐‑‒XXXpem rootec2-‐‑‒XXXamazonawscomxxx

  Windowsの場合はWinSCPなど   S3経由で共有する

  S3にアップロードしEC2からwgetでアクセスする   FTPを立立ち上げる

  EC2側でFTPサーバーを立立ち上げておく

  高速に送信したい   Tsunami UDP Aspera等のソリューション

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

58

VM Import Export

  複数プラットフォームのVMイメージをAmazon EC2に移行行(インポートエクスポート)可能

httpawstypepadcomaws_japan201012vm-‐‑‒import-‐‑‒bring-‐‑‒your-‐‑‒vmware-‐‑‒images-‐‑‒to-‐‑‒the-‐‑‒cloudhtml

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

59

稼働EC2インスタンスからメタデータ取得

  ami-‐‑‒id   ami-‐‑‒launch-‐‑‒index   ami-‐‑‒manifest-‐‑‒path   block-‐‑‒device-‐‑‒mapping   hostname   instance-‐‑‒action   instance-‐‑‒id   Instance-‐‑‒type   kernel-‐‑‒id

  local-‐‑‒hostname   local-‐‑‒ipv4   mac   network   placement   profile   public-‐‑‒hostname   public-‐‑‒ipv4   public-‐‑‒keys   reservation-‐‑‒id

curl http169254169254latestmeta-‐‑‒data

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

60

起動時にパラメーターを渡す   起動時に16KB以内で任意のものを渡せる

  ChefやPuppetなどを利利用して自己構成できるAMIに   参照emsp AWSマイスターemsp CloudFormation資料料httpwwwslidesharenetkentamagawacloudformation-‐‑‒aws5

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

61

EC2コマンドラインツール amp AWS SDKs

  コマンドラインからEC2のAPIにアクセスできるツール   ツールをインストールしセキュリティ証明書を配置

  AWS SDKs httpawsamazoncomcode

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

62

マネージメントコンソールだけでなくAPIからプログラマブルにアクセス

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1a --instance-type m1small

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1b --instance-type m1small

Tokyo リージョン

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

63

EC2のスケジュールイベント表示機能

  EC2インスタンスが稼働しているハードかソフトにメンテナンスが必要な場合に情報を提供する仕組み

  インスタンスリブートシステムリブートリタイヤ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

64

EC2のステータスチェック機能

  下記の2種類のチェックを自動テストで実行行し情報を提示   システムステータスチェック

  EC2インスタンスにネットワークパケットが通るかチェック   インスタンスステータスチェック

  EC2インスタンスのOSがネットワークパケットを受け取るかチェック

  もし状況に乖離離がある場合はレポートできます

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

65

AWS制限増加申請

  EC2を誤って大量量に作成しないよう最大インスタンス数の上限を20に制限しています

  制限増加申請フォームで各種制限の増加を行行えますbull  httpawsamazoncomjpcontact-‐‑‒usemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

66

既存EBSボリュームのサイズ変更更

  例例 10GB -‐‑‒gt 100GB変更更への流流れ   EBSをデタッチする   EBSからS3にスナップショットを作成する

  新たなボリュームサイズを指定してEBSを作成する

  EBSをアタッチする   マウントしてリサイズする

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

スナップショット

EBS (10GB)

EBS (100GB)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

67

EBSとS3

EBSは複数EC2にアタッチ不不可   単独のEC2インスタンスへのブロックデバイスとしての使い方

  NFSのような使い方をする際はEC2にミドルウェアを導入(GlusterFS等)

S3は複数のEC2からアクセス可   ただしWrite Once Read A Lotな使い方に向いている

  アップロード並列列化も使える   耐久性の設計は99999999999で非常に高い

Copyright copy 2011 Amazon Web Services

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

バケット

EBS

EC2インスタンス

HTTPHTTPS

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

68

EIP使用時の注意点

  グローバルIP(EIP)を用いた場合インターネット経由のアクセスとなり課金発生するケースがある

  名前解決したいサーバに固定IPを付与する13   各サーバは固定グローバルIPを元に

AWSのDNSに名前を問い合わせ13   問い合わせた結果返ってくる外部DNS名でサーバにアクセスを行う13   EC2内部で外部DNS名を使ってアクセスすると プライベートIPアドレスに変換されるため 目的のサーバにプライベートIPでアクセスできる13

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

69

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

70

AWSの課金金の仕組みインターネット

ELB

EC2

EBS

S3

データ転送量量

ELB利利用料料データ処理理量量

インスタンスタイプ別利利用料料

EBSの利利用料料

S3の利利用料料

大半を占める

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

71

Simple Monthly Calculator

  Web上にある計算機を使って概算費用を計算できますsect  httpcalculators3amazonawscomcalc5htmllng=ja_JP

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

72

複数の価格モデル

 課金金モデルが選べるsect 通常の時間課金金のオンデマンドインスタンス

sect ある程度度継続してEC2を使う(1年年3年年)EC2リザーブドインスタンス

sect 入札を利利用してより安く使うEC2スポットインスタンス

rarrマイスターシリーズ RIampスポットインスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

73

AWS無料料試用枠

  AWSでは無料料試用枠を用意していますbull  httpawsamazoncomjpfreeemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

74

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

75

Appendix

  参考資料料bull  Amazon Glacier Developer Guidehttpdocsamazonwebservicescomamazonglacierlatestdevintroductionhtml

bull  Amazon Glacier FAQhttpawsamazoncomjpglacierfaqs

bull  Amazon Glaceir価格httpawsamazoncomjpglacierpricing

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

76

QampA

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 52: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

52

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

53

故障のための設計 Design for Failure   故障に備えた設計をしておく

  すべてが故障しうると考えシステム全体での保守的設計   SPOF(単一障害点)の排除   障害からの復復旧(対応品質)を重視する

  EC2における故障のための設計   AMIを常にとっておく   EBSスナップショットでバックアップ   複数アベイラビリティゾーンへの分散   ELBでサーバを冗長化Auto Scalingで自動復復帰   Reserved Instanceでキャパシティ保障

  他の冗長性高いサービスとの組み合わせ   S3 SimpleDB RDS他

httpwwwslidesharenetkentamagawaaws-‐‑‒7991623

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

54

定期的なバックアップ

  EC2のAMIを定期的に作成する   (参考) 無停止でAMI取得

Cloudpackさんブログhttpblogcloudpackjp201103aws-‐‑‒news-‐‑‒ec2-‐‑‒instance-‐‑‒no-‐‑‒reboot-‐‑‒amihtml

  データボリュームとしてのEBSの場合EBSのスナップショットを定期的に作成

  スクリプトを書いて定期的なバックアップを行行うことも可能 Coderockさんブログ

httpblogdateofrockcom201003auto-‐‑‒backup-‐‑‒amazon-‐‑‒ebs-‐‑‒with-‐‑‒rubyhtml   サーバーワークスさんブログ

httpblogserverworkscojptech20110721awssdk-‐‑‒for-‐‑‒ruby-‐‑‒create-‐‑‒snapshot

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

55

Instance StorageにSSDを積んだインスタンスが増えてきた

  EC2のタイプによって選択できるInstance Storeは以下の通り

Instance Type Instance Store Volumesm1small 1 x 160 GBdaggerm1medium 1 x 410 GBm1large 2 x 420 GB (840 GB)m1xlarge 4 x 420 GB (1680 GB)m2xlarge 1 x 420 GBm22xlarge 1 x 850 GBm24xlarge 2 x 840 GB (1680 GB)m3medium 1 x 4 GB SSDm3large 1 x 32 GB SSDm3xlarge 2 x 40 GB SSD (80 GB)m32xlarge 2 x 80 GB SSD (160 GB)

t1micro None (use Amazon EBS volumes)

c1medium 1 x 350 GBdaggerc1xlarge 4 x 420 GB (1680 GB)

Instance Type Instance Store Volumes

c3large 2 x 16 GB SSD (32 GB)c3xlarge 2 x 40 GB SSD (80 GB)c32xlarge 2 x 80 GB SSD (160 GB)c34xlarge 2 x 160 GB SSD (320 GB)c38xlarge 2 x 320 GB SSD (640 GB)cc28xlarge 4 x 840 GB (3360 GB)cg14xlarge 2 x 840 GB (1680 GB)cr18xlarge 2 x 120 GB SSD (240 GB)hi14xlarge 2 x 1024 GB SSD (2048 GB)hs18xlarge 24 x 2048 GB (49 TB)i2xlarge 1 x 800 GB SSDi22xlarge 2 x 800 GB SSD (1600 GB)i24xlarge 4 x 800 GB SSD (3200 GB)i28xlarge 8 x 800 GB SSD (6400 GB)

2014年年1月29日時点

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

56

Instance Storageを使うべきなのは

 高IOPS高帯域なストレージが必要な場合

 消えても良良い一次データの置き場として使う場合

 ストレージ冗長化を準備できる場合

S3活かしたいメリット

考慮すべき制約

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

57

EC2へのファイル転送は

  SCPを使う scp pk-‐‑‒XXXpem rootec2-‐‑‒XXXamazonawscomxxx

  Windowsの場合はWinSCPなど   S3経由で共有する

  S3にアップロードしEC2からwgetでアクセスする   FTPを立立ち上げる

  EC2側でFTPサーバーを立立ち上げておく

  高速に送信したい   Tsunami UDP Aspera等のソリューション

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

58

VM Import Export

  複数プラットフォームのVMイメージをAmazon EC2に移行行(インポートエクスポート)可能

httpawstypepadcomaws_japan201012vm-‐‑‒import-‐‑‒bring-‐‑‒your-‐‑‒vmware-‐‑‒images-‐‑‒to-‐‑‒the-‐‑‒cloudhtml

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

59

稼働EC2インスタンスからメタデータ取得

  ami-‐‑‒id   ami-‐‑‒launch-‐‑‒index   ami-‐‑‒manifest-‐‑‒path   block-‐‑‒device-‐‑‒mapping   hostname   instance-‐‑‒action   instance-‐‑‒id   Instance-‐‑‒type   kernel-‐‑‒id

  local-‐‑‒hostname   local-‐‑‒ipv4   mac   network   placement   profile   public-‐‑‒hostname   public-‐‑‒ipv4   public-‐‑‒keys   reservation-‐‑‒id

curl http169254169254latestmeta-‐‑‒data

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

60

起動時にパラメーターを渡す   起動時に16KB以内で任意のものを渡せる

  ChefやPuppetなどを利利用して自己構成できるAMIに   参照emsp AWSマイスターemsp CloudFormation資料料httpwwwslidesharenetkentamagawacloudformation-‐‑‒aws5

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

61

EC2コマンドラインツール amp AWS SDKs

  コマンドラインからEC2のAPIにアクセスできるツール   ツールをインストールしセキュリティ証明書を配置

  AWS SDKs httpawsamazoncomcode

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

62

マネージメントコンソールだけでなくAPIからプログラマブルにアクセス

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1a --instance-type m1small

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1b --instance-type m1small

Tokyo リージョン

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

63

EC2のスケジュールイベント表示機能

  EC2インスタンスが稼働しているハードかソフトにメンテナンスが必要な場合に情報を提供する仕組み

  インスタンスリブートシステムリブートリタイヤ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

64

EC2のステータスチェック機能

  下記の2種類のチェックを自動テストで実行行し情報を提示   システムステータスチェック

  EC2インスタンスにネットワークパケットが通るかチェック   インスタンスステータスチェック

  EC2インスタンスのOSがネットワークパケットを受け取るかチェック

  もし状況に乖離離がある場合はレポートできます

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

65

AWS制限増加申請

  EC2を誤って大量量に作成しないよう最大インスタンス数の上限を20に制限しています

  制限増加申請フォームで各種制限の増加を行行えますbull  httpawsamazoncomjpcontact-‐‑‒usemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

66

既存EBSボリュームのサイズ変更更

  例例 10GB -‐‑‒gt 100GB変更更への流流れ   EBSをデタッチする   EBSからS3にスナップショットを作成する

  新たなボリュームサイズを指定してEBSを作成する

  EBSをアタッチする   マウントしてリサイズする

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

スナップショット

EBS (10GB)

EBS (100GB)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

67

EBSとS3

EBSは複数EC2にアタッチ不不可   単独のEC2インスタンスへのブロックデバイスとしての使い方

  NFSのような使い方をする際はEC2にミドルウェアを導入(GlusterFS等)

S3は複数のEC2からアクセス可   ただしWrite Once Read A Lotな使い方に向いている

  アップロード並列列化も使える   耐久性の設計は99999999999で非常に高い

Copyright copy 2011 Amazon Web Services

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

バケット

EBS

EC2インスタンス

HTTPHTTPS

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

68

EIP使用時の注意点

  グローバルIP(EIP)を用いた場合インターネット経由のアクセスとなり課金発生するケースがある

  名前解決したいサーバに固定IPを付与する13   各サーバは固定グローバルIPを元に

AWSのDNSに名前を問い合わせ13   問い合わせた結果返ってくる外部DNS名でサーバにアクセスを行う13   EC2内部で外部DNS名を使ってアクセスすると プライベートIPアドレスに変換されるため 目的のサーバにプライベートIPでアクセスできる13

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

69

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

70

AWSの課金金の仕組みインターネット

ELB

EC2

EBS

S3

データ転送量量

ELB利利用料料データ処理理量量

インスタンスタイプ別利利用料料

EBSの利利用料料

S3の利利用料料

大半を占める

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

71

Simple Monthly Calculator

  Web上にある計算機を使って概算費用を計算できますsect  httpcalculators3amazonawscomcalc5htmllng=ja_JP

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

72

複数の価格モデル

 課金金モデルが選べるsect 通常の時間課金金のオンデマンドインスタンス

sect ある程度度継続してEC2を使う(1年年3年年)EC2リザーブドインスタンス

sect 入札を利利用してより安く使うEC2スポットインスタンス

rarrマイスターシリーズ RIampスポットインスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

73

AWS無料料試用枠

  AWSでは無料料試用枠を用意していますbull  httpawsamazoncomjpfreeemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

74

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

75

Appendix

  参考資料料bull  Amazon Glacier Developer Guidehttpdocsamazonwebservicescomamazonglacierlatestdevintroductionhtml

bull  Amazon Glacier FAQhttpawsamazoncomjpglacierfaqs

bull  Amazon Glaceir価格httpawsamazoncomjpglacierpricing

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

76

QampA

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 53: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

53

故障のための設計 Design for Failure   故障に備えた設計をしておく

  すべてが故障しうると考えシステム全体での保守的設計   SPOF(単一障害点)の排除   障害からの復復旧(対応品質)を重視する

  EC2における故障のための設計   AMIを常にとっておく   EBSスナップショットでバックアップ   複数アベイラビリティゾーンへの分散   ELBでサーバを冗長化Auto Scalingで自動復復帰   Reserved Instanceでキャパシティ保障

  他の冗長性高いサービスとの組み合わせ   S3 SimpleDB RDS他

httpwwwslidesharenetkentamagawaaws-‐‑‒7991623

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

54

定期的なバックアップ

  EC2のAMIを定期的に作成する   (参考) 無停止でAMI取得

Cloudpackさんブログhttpblogcloudpackjp201103aws-‐‑‒news-‐‑‒ec2-‐‑‒instance-‐‑‒no-‐‑‒reboot-‐‑‒amihtml

  データボリュームとしてのEBSの場合EBSのスナップショットを定期的に作成

  スクリプトを書いて定期的なバックアップを行行うことも可能 Coderockさんブログ

httpblogdateofrockcom201003auto-‐‑‒backup-‐‑‒amazon-‐‑‒ebs-‐‑‒with-‐‑‒rubyhtml   サーバーワークスさんブログ

httpblogserverworkscojptech20110721awssdk-‐‑‒for-‐‑‒ruby-‐‑‒create-‐‑‒snapshot

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

55

Instance StorageにSSDを積んだインスタンスが増えてきた

  EC2のタイプによって選択できるInstance Storeは以下の通り

Instance Type Instance Store Volumesm1small 1 x 160 GBdaggerm1medium 1 x 410 GBm1large 2 x 420 GB (840 GB)m1xlarge 4 x 420 GB (1680 GB)m2xlarge 1 x 420 GBm22xlarge 1 x 850 GBm24xlarge 2 x 840 GB (1680 GB)m3medium 1 x 4 GB SSDm3large 1 x 32 GB SSDm3xlarge 2 x 40 GB SSD (80 GB)m32xlarge 2 x 80 GB SSD (160 GB)

t1micro None (use Amazon EBS volumes)

c1medium 1 x 350 GBdaggerc1xlarge 4 x 420 GB (1680 GB)

Instance Type Instance Store Volumes

c3large 2 x 16 GB SSD (32 GB)c3xlarge 2 x 40 GB SSD (80 GB)c32xlarge 2 x 80 GB SSD (160 GB)c34xlarge 2 x 160 GB SSD (320 GB)c38xlarge 2 x 320 GB SSD (640 GB)cc28xlarge 4 x 840 GB (3360 GB)cg14xlarge 2 x 840 GB (1680 GB)cr18xlarge 2 x 120 GB SSD (240 GB)hi14xlarge 2 x 1024 GB SSD (2048 GB)hs18xlarge 24 x 2048 GB (49 TB)i2xlarge 1 x 800 GB SSDi22xlarge 2 x 800 GB SSD (1600 GB)i24xlarge 4 x 800 GB SSD (3200 GB)i28xlarge 8 x 800 GB SSD (6400 GB)

2014年年1月29日時点

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

56

Instance Storageを使うべきなのは

 高IOPS高帯域なストレージが必要な場合

 消えても良良い一次データの置き場として使う場合

 ストレージ冗長化を準備できる場合

S3活かしたいメリット

考慮すべき制約

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

57

EC2へのファイル転送は

  SCPを使う scp pk-‐‑‒XXXpem rootec2-‐‑‒XXXamazonawscomxxx

  Windowsの場合はWinSCPなど   S3経由で共有する

  S3にアップロードしEC2からwgetでアクセスする   FTPを立立ち上げる

  EC2側でFTPサーバーを立立ち上げておく

  高速に送信したい   Tsunami UDP Aspera等のソリューション

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

58

VM Import Export

  複数プラットフォームのVMイメージをAmazon EC2に移行行(インポートエクスポート)可能

httpawstypepadcomaws_japan201012vm-‐‑‒import-‐‑‒bring-‐‑‒your-‐‑‒vmware-‐‑‒images-‐‑‒to-‐‑‒the-‐‑‒cloudhtml

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

59

稼働EC2インスタンスからメタデータ取得

  ami-‐‑‒id   ami-‐‑‒launch-‐‑‒index   ami-‐‑‒manifest-‐‑‒path   block-‐‑‒device-‐‑‒mapping   hostname   instance-‐‑‒action   instance-‐‑‒id   Instance-‐‑‒type   kernel-‐‑‒id

  local-‐‑‒hostname   local-‐‑‒ipv4   mac   network   placement   profile   public-‐‑‒hostname   public-‐‑‒ipv4   public-‐‑‒keys   reservation-‐‑‒id

curl http169254169254latestmeta-‐‑‒data

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

60

起動時にパラメーターを渡す   起動時に16KB以内で任意のものを渡せる

  ChefやPuppetなどを利利用して自己構成できるAMIに   参照emsp AWSマイスターemsp CloudFormation資料料httpwwwslidesharenetkentamagawacloudformation-‐‑‒aws5

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

61

EC2コマンドラインツール amp AWS SDKs

  コマンドラインからEC2のAPIにアクセスできるツール   ツールをインストールしセキュリティ証明書を配置

  AWS SDKs httpawsamazoncomcode

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

62

マネージメントコンソールだけでなくAPIからプログラマブルにアクセス

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1a --instance-type m1small

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1b --instance-type m1small

Tokyo リージョン

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

63

EC2のスケジュールイベント表示機能

  EC2インスタンスが稼働しているハードかソフトにメンテナンスが必要な場合に情報を提供する仕組み

  インスタンスリブートシステムリブートリタイヤ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

64

EC2のステータスチェック機能

  下記の2種類のチェックを自動テストで実行行し情報を提示   システムステータスチェック

  EC2インスタンスにネットワークパケットが通るかチェック   インスタンスステータスチェック

  EC2インスタンスのOSがネットワークパケットを受け取るかチェック

  もし状況に乖離離がある場合はレポートできます

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

65

AWS制限増加申請

  EC2を誤って大量量に作成しないよう最大インスタンス数の上限を20に制限しています

  制限増加申請フォームで各種制限の増加を行行えますbull  httpawsamazoncomjpcontact-‐‑‒usemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

66

既存EBSボリュームのサイズ変更更

  例例 10GB -‐‑‒gt 100GB変更更への流流れ   EBSをデタッチする   EBSからS3にスナップショットを作成する

  新たなボリュームサイズを指定してEBSを作成する

  EBSをアタッチする   マウントしてリサイズする

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

スナップショット

EBS (10GB)

EBS (100GB)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

67

EBSとS3

EBSは複数EC2にアタッチ不不可   単独のEC2インスタンスへのブロックデバイスとしての使い方

  NFSのような使い方をする際はEC2にミドルウェアを導入(GlusterFS等)

S3は複数のEC2からアクセス可   ただしWrite Once Read A Lotな使い方に向いている

  アップロード並列列化も使える   耐久性の設計は99999999999で非常に高い

Copyright copy 2011 Amazon Web Services

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

バケット

EBS

EC2インスタンス

HTTPHTTPS

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

68

EIP使用時の注意点

  グローバルIP(EIP)を用いた場合インターネット経由のアクセスとなり課金発生するケースがある

  名前解決したいサーバに固定IPを付与する13   各サーバは固定グローバルIPを元に

AWSのDNSに名前を問い合わせ13   問い合わせた結果返ってくる外部DNS名でサーバにアクセスを行う13   EC2内部で外部DNS名を使ってアクセスすると プライベートIPアドレスに変換されるため 目的のサーバにプライベートIPでアクセスできる13

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

69

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

70

AWSの課金金の仕組みインターネット

ELB

EC2

EBS

S3

データ転送量量

ELB利利用料料データ処理理量量

インスタンスタイプ別利利用料料

EBSの利利用料料

S3の利利用料料

大半を占める

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

71

Simple Monthly Calculator

  Web上にある計算機を使って概算費用を計算できますsect  httpcalculators3amazonawscomcalc5htmllng=ja_JP

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

72

複数の価格モデル

 課金金モデルが選べるsect 通常の時間課金金のオンデマンドインスタンス

sect ある程度度継続してEC2を使う(1年年3年年)EC2リザーブドインスタンス

sect 入札を利利用してより安く使うEC2スポットインスタンス

rarrマイスターシリーズ RIampスポットインスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

73

AWS無料料試用枠

  AWSでは無料料試用枠を用意していますbull  httpawsamazoncomjpfreeemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

74

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

75

Appendix

  参考資料料bull  Amazon Glacier Developer Guidehttpdocsamazonwebservicescomamazonglacierlatestdevintroductionhtml

bull  Amazon Glacier FAQhttpawsamazoncomjpglacierfaqs

bull  Amazon Glaceir価格httpawsamazoncomjpglacierpricing

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

76

QampA

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 54: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

54

定期的なバックアップ

  EC2のAMIを定期的に作成する   (参考) 無停止でAMI取得

Cloudpackさんブログhttpblogcloudpackjp201103aws-‐‑‒news-‐‑‒ec2-‐‑‒instance-‐‑‒no-‐‑‒reboot-‐‑‒amihtml

  データボリュームとしてのEBSの場合EBSのスナップショットを定期的に作成

  スクリプトを書いて定期的なバックアップを行行うことも可能 Coderockさんブログ

httpblogdateofrockcom201003auto-‐‑‒backup-‐‑‒amazon-‐‑‒ebs-‐‑‒with-‐‑‒rubyhtml   サーバーワークスさんブログ

httpblogserverworkscojptech20110721awssdk-‐‑‒for-‐‑‒ruby-‐‑‒create-‐‑‒snapshot

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

55

Instance StorageにSSDを積んだインスタンスが増えてきた

  EC2のタイプによって選択できるInstance Storeは以下の通り

Instance Type Instance Store Volumesm1small 1 x 160 GBdaggerm1medium 1 x 410 GBm1large 2 x 420 GB (840 GB)m1xlarge 4 x 420 GB (1680 GB)m2xlarge 1 x 420 GBm22xlarge 1 x 850 GBm24xlarge 2 x 840 GB (1680 GB)m3medium 1 x 4 GB SSDm3large 1 x 32 GB SSDm3xlarge 2 x 40 GB SSD (80 GB)m32xlarge 2 x 80 GB SSD (160 GB)

t1micro None (use Amazon EBS volumes)

c1medium 1 x 350 GBdaggerc1xlarge 4 x 420 GB (1680 GB)

Instance Type Instance Store Volumes

c3large 2 x 16 GB SSD (32 GB)c3xlarge 2 x 40 GB SSD (80 GB)c32xlarge 2 x 80 GB SSD (160 GB)c34xlarge 2 x 160 GB SSD (320 GB)c38xlarge 2 x 320 GB SSD (640 GB)cc28xlarge 4 x 840 GB (3360 GB)cg14xlarge 2 x 840 GB (1680 GB)cr18xlarge 2 x 120 GB SSD (240 GB)hi14xlarge 2 x 1024 GB SSD (2048 GB)hs18xlarge 24 x 2048 GB (49 TB)i2xlarge 1 x 800 GB SSDi22xlarge 2 x 800 GB SSD (1600 GB)i24xlarge 4 x 800 GB SSD (3200 GB)i28xlarge 8 x 800 GB SSD (6400 GB)

2014年年1月29日時点

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

56

Instance Storageを使うべきなのは

 高IOPS高帯域なストレージが必要な場合

 消えても良良い一次データの置き場として使う場合

 ストレージ冗長化を準備できる場合

S3活かしたいメリット

考慮すべき制約

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

57

EC2へのファイル転送は

  SCPを使う scp pk-‐‑‒XXXpem rootec2-‐‑‒XXXamazonawscomxxx

  Windowsの場合はWinSCPなど   S3経由で共有する

  S3にアップロードしEC2からwgetでアクセスする   FTPを立立ち上げる

  EC2側でFTPサーバーを立立ち上げておく

  高速に送信したい   Tsunami UDP Aspera等のソリューション

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

58

VM Import Export

  複数プラットフォームのVMイメージをAmazon EC2に移行行(インポートエクスポート)可能

httpawstypepadcomaws_japan201012vm-‐‑‒import-‐‑‒bring-‐‑‒your-‐‑‒vmware-‐‑‒images-‐‑‒to-‐‑‒the-‐‑‒cloudhtml

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

59

稼働EC2インスタンスからメタデータ取得

  ami-‐‑‒id   ami-‐‑‒launch-‐‑‒index   ami-‐‑‒manifest-‐‑‒path   block-‐‑‒device-‐‑‒mapping   hostname   instance-‐‑‒action   instance-‐‑‒id   Instance-‐‑‒type   kernel-‐‑‒id

  local-‐‑‒hostname   local-‐‑‒ipv4   mac   network   placement   profile   public-‐‑‒hostname   public-‐‑‒ipv4   public-‐‑‒keys   reservation-‐‑‒id

curl http169254169254latestmeta-‐‑‒data

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

60

起動時にパラメーターを渡す   起動時に16KB以内で任意のものを渡せる

  ChefやPuppetなどを利利用して自己構成できるAMIに   参照emsp AWSマイスターemsp CloudFormation資料料httpwwwslidesharenetkentamagawacloudformation-‐‑‒aws5

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

61

EC2コマンドラインツール amp AWS SDKs

  コマンドラインからEC2のAPIにアクセスできるツール   ツールをインストールしセキュリティ証明書を配置

  AWS SDKs httpawsamazoncomcode

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

62

マネージメントコンソールだけでなくAPIからプログラマブルにアクセス

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1a --instance-type m1small

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1b --instance-type m1small

Tokyo リージョン

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

63

EC2のスケジュールイベント表示機能

  EC2インスタンスが稼働しているハードかソフトにメンテナンスが必要な場合に情報を提供する仕組み

  インスタンスリブートシステムリブートリタイヤ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

64

EC2のステータスチェック機能

  下記の2種類のチェックを自動テストで実行行し情報を提示   システムステータスチェック

  EC2インスタンスにネットワークパケットが通るかチェック   インスタンスステータスチェック

  EC2インスタンスのOSがネットワークパケットを受け取るかチェック

  もし状況に乖離離がある場合はレポートできます

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

65

AWS制限増加申請

  EC2を誤って大量量に作成しないよう最大インスタンス数の上限を20に制限しています

  制限増加申請フォームで各種制限の増加を行行えますbull  httpawsamazoncomjpcontact-‐‑‒usemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

66

既存EBSボリュームのサイズ変更更

  例例 10GB -‐‑‒gt 100GB変更更への流流れ   EBSをデタッチする   EBSからS3にスナップショットを作成する

  新たなボリュームサイズを指定してEBSを作成する

  EBSをアタッチする   マウントしてリサイズする

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

スナップショット

EBS (10GB)

EBS (100GB)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

67

EBSとS3

EBSは複数EC2にアタッチ不不可   単独のEC2インスタンスへのブロックデバイスとしての使い方

  NFSのような使い方をする際はEC2にミドルウェアを導入(GlusterFS等)

S3は複数のEC2からアクセス可   ただしWrite Once Read A Lotな使い方に向いている

  アップロード並列列化も使える   耐久性の設計は99999999999で非常に高い

Copyright copy 2011 Amazon Web Services

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

バケット

EBS

EC2インスタンス

HTTPHTTPS

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

68

EIP使用時の注意点

  グローバルIP(EIP)を用いた場合インターネット経由のアクセスとなり課金発生するケースがある

  名前解決したいサーバに固定IPを付与する13   各サーバは固定グローバルIPを元に

AWSのDNSに名前を問い合わせ13   問い合わせた結果返ってくる外部DNS名でサーバにアクセスを行う13   EC2内部で外部DNS名を使ってアクセスすると プライベートIPアドレスに変換されるため 目的のサーバにプライベートIPでアクセスできる13

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

69

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

70

AWSの課金金の仕組みインターネット

ELB

EC2

EBS

S3

データ転送量量

ELB利利用料料データ処理理量量

インスタンスタイプ別利利用料料

EBSの利利用料料

S3の利利用料料

大半を占める

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

71

Simple Monthly Calculator

  Web上にある計算機を使って概算費用を計算できますsect  httpcalculators3amazonawscomcalc5htmllng=ja_JP

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

72

複数の価格モデル

 課金金モデルが選べるsect 通常の時間課金金のオンデマンドインスタンス

sect ある程度度継続してEC2を使う(1年年3年年)EC2リザーブドインスタンス

sect 入札を利利用してより安く使うEC2スポットインスタンス

rarrマイスターシリーズ RIampスポットインスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

73

AWS無料料試用枠

  AWSでは無料料試用枠を用意していますbull  httpawsamazoncomjpfreeemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

74

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

75

Appendix

  参考資料料bull  Amazon Glacier Developer Guidehttpdocsamazonwebservicescomamazonglacierlatestdevintroductionhtml

bull  Amazon Glacier FAQhttpawsamazoncomjpglacierfaqs

bull  Amazon Glaceir価格httpawsamazoncomjpglacierpricing

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

76

QampA

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 55: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

55

Instance StorageにSSDを積んだインスタンスが増えてきた

  EC2のタイプによって選択できるInstance Storeは以下の通り

Instance Type Instance Store Volumesm1small 1 x 160 GBdaggerm1medium 1 x 410 GBm1large 2 x 420 GB (840 GB)m1xlarge 4 x 420 GB (1680 GB)m2xlarge 1 x 420 GBm22xlarge 1 x 850 GBm24xlarge 2 x 840 GB (1680 GB)m3medium 1 x 4 GB SSDm3large 1 x 32 GB SSDm3xlarge 2 x 40 GB SSD (80 GB)m32xlarge 2 x 80 GB SSD (160 GB)

t1micro None (use Amazon EBS volumes)

c1medium 1 x 350 GBdaggerc1xlarge 4 x 420 GB (1680 GB)

Instance Type Instance Store Volumes

c3large 2 x 16 GB SSD (32 GB)c3xlarge 2 x 40 GB SSD (80 GB)c32xlarge 2 x 80 GB SSD (160 GB)c34xlarge 2 x 160 GB SSD (320 GB)c38xlarge 2 x 320 GB SSD (640 GB)cc28xlarge 4 x 840 GB (3360 GB)cg14xlarge 2 x 840 GB (1680 GB)cr18xlarge 2 x 120 GB SSD (240 GB)hi14xlarge 2 x 1024 GB SSD (2048 GB)hs18xlarge 24 x 2048 GB (49 TB)i2xlarge 1 x 800 GB SSDi22xlarge 2 x 800 GB SSD (1600 GB)i24xlarge 4 x 800 GB SSD (3200 GB)i28xlarge 8 x 800 GB SSD (6400 GB)

2014年年1月29日時点

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

56

Instance Storageを使うべきなのは

 高IOPS高帯域なストレージが必要な場合

 消えても良良い一次データの置き場として使う場合

 ストレージ冗長化を準備できる場合

S3活かしたいメリット

考慮すべき制約

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

57

EC2へのファイル転送は

  SCPを使う scp pk-‐‑‒XXXpem rootec2-‐‑‒XXXamazonawscomxxx

  Windowsの場合はWinSCPなど   S3経由で共有する

  S3にアップロードしEC2からwgetでアクセスする   FTPを立立ち上げる

  EC2側でFTPサーバーを立立ち上げておく

  高速に送信したい   Tsunami UDP Aspera等のソリューション

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

58

VM Import Export

  複数プラットフォームのVMイメージをAmazon EC2に移行行(インポートエクスポート)可能

httpawstypepadcomaws_japan201012vm-‐‑‒import-‐‑‒bring-‐‑‒your-‐‑‒vmware-‐‑‒images-‐‑‒to-‐‑‒the-‐‑‒cloudhtml

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

59

稼働EC2インスタンスからメタデータ取得

  ami-‐‑‒id   ami-‐‑‒launch-‐‑‒index   ami-‐‑‒manifest-‐‑‒path   block-‐‑‒device-‐‑‒mapping   hostname   instance-‐‑‒action   instance-‐‑‒id   Instance-‐‑‒type   kernel-‐‑‒id

  local-‐‑‒hostname   local-‐‑‒ipv4   mac   network   placement   profile   public-‐‑‒hostname   public-‐‑‒ipv4   public-‐‑‒keys   reservation-‐‑‒id

curl http169254169254latestmeta-‐‑‒data

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

60

起動時にパラメーターを渡す   起動時に16KB以内で任意のものを渡せる

  ChefやPuppetなどを利利用して自己構成できるAMIに   参照emsp AWSマイスターemsp CloudFormation資料料httpwwwslidesharenetkentamagawacloudformation-‐‑‒aws5

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

61

EC2コマンドラインツール amp AWS SDKs

  コマンドラインからEC2のAPIにアクセスできるツール   ツールをインストールしセキュリティ証明書を配置

  AWS SDKs httpawsamazoncomcode

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

62

マネージメントコンソールだけでなくAPIからプログラマブルにアクセス

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1a --instance-type m1small

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1b --instance-type m1small

Tokyo リージョン

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

63

EC2のスケジュールイベント表示機能

  EC2インスタンスが稼働しているハードかソフトにメンテナンスが必要な場合に情報を提供する仕組み

  インスタンスリブートシステムリブートリタイヤ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

64

EC2のステータスチェック機能

  下記の2種類のチェックを自動テストで実行行し情報を提示   システムステータスチェック

  EC2インスタンスにネットワークパケットが通るかチェック   インスタンスステータスチェック

  EC2インスタンスのOSがネットワークパケットを受け取るかチェック

  もし状況に乖離離がある場合はレポートできます

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

65

AWS制限増加申請

  EC2を誤って大量量に作成しないよう最大インスタンス数の上限を20に制限しています

  制限増加申請フォームで各種制限の増加を行行えますbull  httpawsamazoncomjpcontact-‐‑‒usemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

66

既存EBSボリュームのサイズ変更更

  例例 10GB -‐‑‒gt 100GB変更更への流流れ   EBSをデタッチする   EBSからS3にスナップショットを作成する

  新たなボリュームサイズを指定してEBSを作成する

  EBSをアタッチする   マウントしてリサイズする

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

スナップショット

EBS (10GB)

EBS (100GB)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

67

EBSとS3

EBSは複数EC2にアタッチ不不可   単独のEC2インスタンスへのブロックデバイスとしての使い方

  NFSのような使い方をする際はEC2にミドルウェアを導入(GlusterFS等)

S3は複数のEC2からアクセス可   ただしWrite Once Read A Lotな使い方に向いている

  アップロード並列列化も使える   耐久性の設計は99999999999で非常に高い

Copyright copy 2011 Amazon Web Services

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

バケット

EBS

EC2インスタンス

HTTPHTTPS

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

68

EIP使用時の注意点

  グローバルIP(EIP)を用いた場合インターネット経由のアクセスとなり課金発生するケースがある

  名前解決したいサーバに固定IPを付与する13   各サーバは固定グローバルIPを元に

AWSのDNSに名前を問い合わせ13   問い合わせた結果返ってくる外部DNS名でサーバにアクセスを行う13   EC2内部で外部DNS名を使ってアクセスすると プライベートIPアドレスに変換されるため 目的のサーバにプライベートIPでアクセスできる13

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

69

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

70

AWSの課金金の仕組みインターネット

ELB

EC2

EBS

S3

データ転送量量

ELB利利用料料データ処理理量量

インスタンスタイプ別利利用料料

EBSの利利用料料

S3の利利用料料

大半を占める

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

71

Simple Monthly Calculator

  Web上にある計算機を使って概算費用を計算できますsect  httpcalculators3amazonawscomcalc5htmllng=ja_JP

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

72

複数の価格モデル

 課金金モデルが選べるsect 通常の時間課金金のオンデマンドインスタンス

sect ある程度度継続してEC2を使う(1年年3年年)EC2リザーブドインスタンス

sect 入札を利利用してより安く使うEC2スポットインスタンス

rarrマイスターシリーズ RIampスポットインスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

73

AWS無料料試用枠

  AWSでは無料料試用枠を用意していますbull  httpawsamazoncomjpfreeemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

74

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

75

Appendix

  参考資料料bull  Amazon Glacier Developer Guidehttpdocsamazonwebservicescomamazonglacierlatestdevintroductionhtml

bull  Amazon Glacier FAQhttpawsamazoncomjpglacierfaqs

bull  Amazon Glaceir価格httpawsamazoncomjpglacierpricing

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

76

QampA

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 56: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

56

Instance Storageを使うべきなのは

 高IOPS高帯域なストレージが必要な場合

 消えても良良い一次データの置き場として使う場合

 ストレージ冗長化を準備できる場合

S3活かしたいメリット

考慮すべき制約

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

57

EC2へのファイル転送は

  SCPを使う scp pk-‐‑‒XXXpem rootec2-‐‑‒XXXamazonawscomxxx

  Windowsの場合はWinSCPなど   S3経由で共有する

  S3にアップロードしEC2からwgetでアクセスする   FTPを立立ち上げる

  EC2側でFTPサーバーを立立ち上げておく

  高速に送信したい   Tsunami UDP Aspera等のソリューション

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

58

VM Import Export

  複数プラットフォームのVMイメージをAmazon EC2に移行行(インポートエクスポート)可能

httpawstypepadcomaws_japan201012vm-‐‑‒import-‐‑‒bring-‐‑‒your-‐‑‒vmware-‐‑‒images-‐‑‒to-‐‑‒the-‐‑‒cloudhtml

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

59

稼働EC2インスタンスからメタデータ取得

  ami-‐‑‒id   ami-‐‑‒launch-‐‑‒index   ami-‐‑‒manifest-‐‑‒path   block-‐‑‒device-‐‑‒mapping   hostname   instance-‐‑‒action   instance-‐‑‒id   Instance-‐‑‒type   kernel-‐‑‒id

  local-‐‑‒hostname   local-‐‑‒ipv4   mac   network   placement   profile   public-‐‑‒hostname   public-‐‑‒ipv4   public-‐‑‒keys   reservation-‐‑‒id

curl http169254169254latestmeta-‐‑‒data

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

60

起動時にパラメーターを渡す   起動時に16KB以内で任意のものを渡せる

  ChefやPuppetなどを利利用して自己構成できるAMIに   参照emsp AWSマイスターemsp CloudFormation資料料httpwwwslidesharenetkentamagawacloudformation-‐‑‒aws5

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

61

EC2コマンドラインツール amp AWS SDKs

  コマンドラインからEC2のAPIにアクセスできるツール   ツールをインストールしセキュリティ証明書を配置

  AWS SDKs httpawsamazoncomcode

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

62

マネージメントコンソールだけでなくAPIからプログラマブルにアクセス

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1a --instance-type m1small

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1b --instance-type m1small

Tokyo リージョン

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

63

EC2のスケジュールイベント表示機能

  EC2インスタンスが稼働しているハードかソフトにメンテナンスが必要な場合に情報を提供する仕組み

  インスタンスリブートシステムリブートリタイヤ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

64

EC2のステータスチェック機能

  下記の2種類のチェックを自動テストで実行行し情報を提示   システムステータスチェック

  EC2インスタンスにネットワークパケットが通るかチェック   インスタンスステータスチェック

  EC2インスタンスのOSがネットワークパケットを受け取るかチェック

  もし状況に乖離離がある場合はレポートできます

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

65

AWS制限増加申請

  EC2を誤って大量量に作成しないよう最大インスタンス数の上限を20に制限しています

  制限増加申請フォームで各種制限の増加を行行えますbull  httpawsamazoncomjpcontact-‐‑‒usemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

66

既存EBSボリュームのサイズ変更更

  例例 10GB -‐‑‒gt 100GB変更更への流流れ   EBSをデタッチする   EBSからS3にスナップショットを作成する

  新たなボリュームサイズを指定してEBSを作成する

  EBSをアタッチする   マウントしてリサイズする

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

スナップショット

EBS (10GB)

EBS (100GB)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

67

EBSとS3

EBSは複数EC2にアタッチ不不可   単独のEC2インスタンスへのブロックデバイスとしての使い方

  NFSのような使い方をする際はEC2にミドルウェアを導入(GlusterFS等)

S3は複数のEC2からアクセス可   ただしWrite Once Read A Lotな使い方に向いている

  アップロード並列列化も使える   耐久性の設計は99999999999で非常に高い

Copyright copy 2011 Amazon Web Services

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

バケット

EBS

EC2インスタンス

HTTPHTTPS

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

68

EIP使用時の注意点

  グローバルIP(EIP)を用いた場合インターネット経由のアクセスとなり課金発生するケースがある

  名前解決したいサーバに固定IPを付与する13   各サーバは固定グローバルIPを元に

AWSのDNSに名前を問い合わせ13   問い合わせた結果返ってくる外部DNS名でサーバにアクセスを行う13   EC2内部で外部DNS名を使ってアクセスすると プライベートIPアドレスに変換されるため 目的のサーバにプライベートIPでアクセスできる13

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

69

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

70

AWSの課金金の仕組みインターネット

ELB

EC2

EBS

S3

データ転送量量

ELB利利用料料データ処理理量量

インスタンスタイプ別利利用料料

EBSの利利用料料

S3の利利用料料

大半を占める

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

71

Simple Monthly Calculator

  Web上にある計算機を使って概算費用を計算できますsect  httpcalculators3amazonawscomcalc5htmllng=ja_JP

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

72

複数の価格モデル

 課金金モデルが選べるsect 通常の時間課金金のオンデマンドインスタンス

sect ある程度度継続してEC2を使う(1年年3年年)EC2リザーブドインスタンス

sect 入札を利利用してより安く使うEC2スポットインスタンス

rarrマイスターシリーズ RIampスポットインスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

73

AWS無料料試用枠

  AWSでは無料料試用枠を用意していますbull  httpawsamazoncomjpfreeemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

74

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

75

Appendix

  参考資料料bull  Amazon Glacier Developer Guidehttpdocsamazonwebservicescomamazonglacierlatestdevintroductionhtml

bull  Amazon Glacier FAQhttpawsamazoncomjpglacierfaqs

bull  Amazon Glaceir価格httpawsamazoncomjpglacierpricing

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

76

QampA

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 57: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

57

EC2へのファイル転送は

  SCPを使う scp pk-‐‑‒XXXpem rootec2-‐‑‒XXXamazonawscomxxx

  Windowsの場合はWinSCPなど   S3経由で共有する

  S3にアップロードしEC2からwgetでアクセスする   FTPを立立ち上げる

  EC2側でFTPサーバーを立立ち上げておく

  高速に送信したい   Tsunami UDP Aspera等のソリューション

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

58

VM Import Export

  複数プラットフォームのVMイメージをAmazon EC2に移行行(インポートエクスポート)可能

httpawstypepadcomaws_japan201012vm-‐‑‒import-‐‑‒bring-‐‑‒your-‐‑‒vmware-‐‑‒images-‐‑‒to-‐‑‒the-‐‑‒cloudhtml

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

59

稼働EC2インスタンスからメタデータ取得

  ami-‐‑‒id   ami-‐‑‒launch-‐‑‒index   ami-‐‑‒manifest-‐‑‒path   block-‐‑‒device-‐‑‒mapping   hostname   instance-‐‑‒action   instance-‐‑‒id   Instance-‐‑‒type   kernel-‐‑‒id

  local-‐‑‒hostname   local-‐‑‒ipv4   mac   network   placement   profile   public-‐‑‒hostname   public-‐‑‒ipv4   public-‐‑‒keys   reservation-‐‑‒id

curl http169254169254latestmeta-‐‑‒data

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

60

起動時にパラメーターを渡す   起動時に16KB以内で任意のものを渡せる

  ChefやPuppetなどを利利用して自己構成できるAMIに   参照emsp AWSマイスターemsp CloudFormation資料料httpwwwslidesharenetkentamagawacloudformation-‐‑‒aws5

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

61

EC2コマンドラインツール amp AWS SDKs

  コマンドラインからEC2のAPIにアクセスできるツール   ツールをインストールしセキュリティ証明書を配置

  AWS SDKs httpawsamazoncomcode

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

62

マネージメントコンソールだけでなくAPIからプログラマブルにアクセス

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1a --instance-type m1small

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1b --instance-type m1small

Tokyo リージョン

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

63

EC2のスケジュールイベント表示機能

  EC2インスタンスが稼働しているハードかソフトにメンテナンスが必要な場合に情報を提供する仕組み

  インスタンスリブートシステムリブートリタイヤ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

64

EC2のステータスチェック機能

  下記の2種類のチェックを自動テストで実行行し情報を提示   システムステータスチェック

  EC2インスタンスにネットワークパケットが通るかチェック   インスタンスステータスチェック

  EC2インスタンスのOSがネットワークパケットを受け取るかチェック

  もし状況に乖離離がある場合はレポートできます

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

65

AWS制限増加申請

  EC2を誤って大量量に作成しないよう最大インスタンス数の上限を20に制限しています

  制限増加申請フォームで各種制限の増加を行行えますbull  httpawsamazoncomjpcontact-‐‑‒usemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

66

既存EBSボリュームのサイズ変更更

  例例 10GB -‐‑‒gt 100GB変更更への流流れ   EBSをデタッチする   EBSからS3にスナップショットを作成する

  新たなボリュームサイズを指定してEBSを作成する

  EBSをアタッチする   マウントしてリサイズする

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

スナップショット

EBS (10GB)

EBS (100GB)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

67

EBSとS3

EBSは複数EC2にアタッチ不不可   単独のEC2インスタンスへのブロックデバイスとしての使い方

  NFSのような使い方をする際はEC2にミドルウェアを導入(GlusterFS等)

S3は複数のEC2からアクセス可   ただしWrite Once Read A Lotな使い方に向いている

  アップロード並列列化も使える   耐久性の設計は99999999999で非常に高い

Copyright copy 2011 Amazon Web Services

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

バケット

EBS

EC2インスタンス

HTTPHTTPS

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

68

EIP使用時の注意点

  グローバルIP(EIP)を用いた場合インターネット経由のアクセスとなり課金発生するケースがある

  名前解決したいサーバに固定IPを付与する13   各サーバは固定グローバルIPを元に

AWSのDNSに名前を問い合わせ13   問い合わせた結果返ってくる外部DNS名でサーバにアクセスを行う13   EC2内部で外部DNS名を使ってアクセスすると プライベートIPアドレスに変換されるため 目的のサーバにプライベートIPでアクセスできる13

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

69

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

70

AWSの課金金の仕組みインターネット

ELB

EC2

EBS

S3

データ転送量量

ELB利利用料料データ処理理量量

インスタンスタイプ別利利用料料

EBSの利利用料料

S3の利利用料料

大半を占める

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

71

Simple Monthly Calculator

  Web上にある計算機を使って概算費用を計算できますsect  httpcalculators3amazonawscomcalc5htmllng=ja_JP

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

72

複数の価格モデル

 課金金モデルが選べるsect 通常の時間課金金のオンデマンドインスタンス

sect ある程度度継続してEC2を使う(1年年3年年)EC2リザーブドインスタンス

sect 入札を利利用してより安く使うEC2スポットインスタンス

rarrマイスターシリーズ RIampスポットインスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

73

AWS無料料試用枠

  AWSでは無料料試用枠を用意していますbull  httpawsamazoncomjpfreeemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

74

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

75

Appendix

  参考資料料bull  Amazon Glacier Developer Guidehttpdocsamazonwebservicescomamazonglacierlatestdevintroductionhtml

bull  Amazon Glacier FAQhttpawsamazoncomjpglacierfaqs

bull  Amazon Glaceir価格httpawsamazoncomjpglacierpricing

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

76

QampA

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 58: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

58

VM Import Export

  複数プラットフォームのVMイメージをAmazon EC2に移行行(インポートエクスポート)可能

httpawstypepadcomaws_japan201012vm-‐‑‒import-‐‑‒bring-‐‑‒your-‐‑‒vmware-‐‑‒images-‐‑‒to-‐‑‒the-‐‑‒cloudhtml

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

59

稼働EC2インスタンスからメタデータ取得

  ami-‐‑‒id   ami-‐‑‒launch-‐‑‒index   ami-‐‑‒manifest-‐‑‒path   block-‐‑‒device-‐‑‒mapping   hostname   instance-‐‑‒action   instance-‐‑‒id   Instance-‐‑‒type   kernel-‐‑‒id

  local-‐‑‒hostname   local-‐‑‒ipv4   mac   network   placement   profile   public-‐‑‒hostname   public-‐‑‒ipv4   public-‐‑‒keys   reservation-‐‑‒id

curl http169254169254latestmeta-‐‑‒data

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

60

起動時にパラメーターを渡す   起動時に16KB以内で任意のものを渡せる

  ChefやPuppetなどを利利用して自己構成できるAMIに   参照emsp AWSマイスターemsp CloudFormation資料料httpwwwslidesharenetkentamagawacloudformation-‐‑‒aws5

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

61

EC2コマンドラインツール amp AWS SDKs

  コマンドラインからEC2のAPIにアクセスできるツール   ツールをインストールしセキュリティ証明書を配置

  AWS SDKs httpawsamazoncomcode

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

62

マネージメントコンソールだけでなくAPIからプログラマブルにアクセス

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1a --instance-type m1small

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1b --instance-type m1small

Tokyo リージョン

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

63

EC2のスケジュールイベント表示機能

  EC2インスタンスが稼働しているハードかソフトにメンテナンスが必要な場合に情報を提供する仕組み

  インスタンスリブートシステムリブートリタイヤ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

64

EC2のステータスチェック機能

  下記の2種類のチェックを自動テストで実行行し情報を提示   システムステータスチェック

  EC2インスタンスにネットワークパケットが通るかチェック   インスタンスステータスチェック

  EC2インスタンスのOSがネットワークパケットを受け取るかチェック

  もし状況に乖離離がある場合はレポートできます

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

65

AWS制限増加申請

  EC2を誤って大量量に作成しないよう最大インスタンス数の上限を20に制限しています

  制限増加申請フォームで各種制限の増加を行行えますbull  httpawsamazoncomjpcontact-‐‑‒usemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

66

既存EBSボリュームのサイズ変更更

  例例 10GB -‐‑‒gt 100GB変更更への流流れ   EBSをデタッチする   EBSからS3にスナップショットを作成する

  新たなボリュームサイズを指定してEBSを作成する

  EBSをアタッチする   マウントしてリサイズする

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

スナップショット

EBS (10GB)

EBS (100GB)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

67

EBSとS3

EBSは複数EC2にアタッチ不不可   単独のEC2インスタンスへのブロックデバイスとしての使い方

  NFSのような使い方をする際はEC2にミドルウェアを導入(GlusterFS等)

S3は複数のEC2からアクセス可   ただしWrite Once Read A Lotな使い方に向いている

  アップロード並列列化も使える   耐久性の設計は99999999999で非常に高い

Copyright copy 2011 Amazon Web Services

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

バケット

EBS

EC2インスタンス

HTTPHTTPS

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

68

EIP使用時の注意点

  グローバルIP(EIP)を用いた場合インターネット経由のアクセスとなり課金発生するケースがある

  名前解決したいサーバに固定IPを付与する13   各サーバは固定グローバルIPを元に

AWSのDNSに名前を問い合わせ13   問い合わせた結果返ってくる外部DNS名でサーバにアクセスを行う13   EC2内部で外部DNS名を使ってアクセスすると プライベートIPアドレスに変換されるため 目的のサーバにプライベートIPでアクセスできる13

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

69

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

70

AWSの課金金の仕組みインターネット

ELB

EC2

EBS

S3

データ転送量量

ELB利利用料料データ処理理量量

インスタンスタイプ別利利用料料

EBSの利利用料料

S3の利利用料料

大半を占める

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

71

Simple Monthly Calculator

  Web上にある計算機を使って概算費用を計算できますsect  httpcalculators3amazonawscomcalc5htmllng=ja_JP

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

72

複数の価格モデル

 課金金モデルが選べるsect 通常の時間課金金のオンデマンドインスタンス

sect ある程度度継続してEC2を使う(1年年3年年)EC2リザーブドインスタンス

sect 入札を利利用してより安く使うEC2スポットインスタンス

rarrマイスターシリーズ RIampスポットインスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

73

AWS無料料試用枠

  AWSでは無料料試用枠を用意していますbull  httpawsamazoncomjpfreeemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

74

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

75

Appendix

  参考資料料bull  Amazon Glacier Developer Guidehttpdocsamazonwebservicescomamazonglacierlatestdevintroductionhtml

bull  Amazon Glacier FAQhttpawsamazoncomjpglacierfaqs

bull  Amazon Glaceir価格httpawsamazoncomjpglacierpricing

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

76

QampA

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 59: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

59

稼働EC2インスタンスからメタデータ取得

  ami-‐‑‒id   ami-‐‑‒launch-‐‑‒index   ami-‐‑‒manifest-‐‑‒path   block-‐‑‒device-‐‑‒mapping   hostname   instance-‐‑‒action   instance-‐‑‒id   Instance-‐‑‒type   kernel-‐‑‒id

  local-‐‑‒hostname   local-‐‑‒ipv4   mac   network   placement   profile   public-‐‑‒hostname   public-‐‑‒ipv4   public-‐‑‒keys   reservation-‐‑‒id

curl http169254169254latestmeta-‐‑‒data

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

60

起動時にパラメーターを渡す   起動時に16KB以内で任意のものを渡せる

  ChefやPuppetなどを利利用して自己構成できるAMIに   参照emsp AWSマイスターemsp CloudFormation資料料httpwwwslidesharenetkentamagawacloudformation-‐‑‒aws5

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

61

EC2コマンドラインツール amp AWS SDKs

  コマンドラインからEC2のAPIにアクセスできるツール   ツールをインストールしセキュリティ証明書を配置

  AWS SDKs httpawsamazoncomcode

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

62

マネージメントコンソールだけでなくAPIからプログラマブルにアクセス

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1a --instance-type m1small

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1b --instance-type m1small

Tokyo リージョン

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

63

EC2のスケジュールイベント表示機能

  EC2インスタンスが稼働しているハードかソフトにメンテナンスが必要な場合に情報を提供する仕組み

  インスタンスリブートシステムリブートリタイヤ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

64

EC2のステータスチェック機能

  下記の2種類のチェックを自動テストで実行行し情報を提示   システムステータスチェック

  EC2インスタンスにネットワークパケットが通るかチェック   インスタンスステータスチェック

  EC2インスタンスのOSがネットワークパケットを受け取るかチェック

  もし状況に乖離離がある場合はレポートできます

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

65

AWS制限増加申請

  EC2を誤って大量量に作成しないよう最大インスタンス数の上限を20に制限しています

  制限増加申請フォームで各種制限の増加を行行えますbull  httpawsamazoncomjpcontact-‐‑‒usemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

66

既存EBSボリュームのサイズ変更更

  例例 10GB -‐‑‒gt 100GB変更更への流流れ   EBSをデタッチする   EBSからS3にスナップショットを作成する

  新たなボリュームサイズを指定してEBSを作成する

  EBSをアタッチする   マウントしてリサイズする

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

スナップショット

EBS (10GB)

EBS (100GB)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

67

EBSとS3

EBSは複数EC2にアタッチ不不可   単独のEC2インスタンスへのブロックデバイスとしての使い方

  NFSのような使い方をする際はEC2にミドルウェアを導入(GlusterFS等)

S3は複数のEC2からアクセス可   ただしWrite Once Read A Lotな使い方に向いている

  アップロード並列列化も使える   耐久性の設計は99999999999で非常に高い

Copyright copy 2011 Amazon Web Services

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

バケット

EBS

EC2インスタンス

HTTPHTTPS

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

68

EIP使用時の注意点

  グローバルIP(EIP)を用いた場合インターネット経由のアクセスとなり課金発生するケースがある

  名前解決したいサーバに固定IPを付与する13   各サーバは固定グローバルIPを元に

AWSのDNSに名前を問い合わせ13   問い合わせた結果返ってくる外部DNS名でサーバにアクセスを行う13   EC2内部で外部DNS名を使ってアクセスすると プライベートIPアドレスに変換されるため 目的のサーバにプライベートIPでアクセスできる13

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

69

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

70

AWSの課金金の仕組みインターネット

ELB

EC2

EBS

S3

データ転送量量

ELB利利用料料データ処理理量量

インスタンスタイプ別利利用料料

EBSの利利用料料

S3の利利用料料

大半を占める

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

71

Simple Monthly Calculator

  Web上にある計算機を使って概算費用を計算できますsect  httpcalculators3amazonawscomcalc5htmllng=ja_JP

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

72

複数の価格モデル

 課金金モデルが選べるsect 通常の時間課金金のオンデマンドインスタンス

sect ある程度度継続してEC2を使う(1年年3年年)EC2リザーブドインスタンス

sect 入札を利利用してより安く使うEC2スポットインスタンス

rarrマイスターシリーズ RIampスポットインスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

73

AWS無料料試用枠

  AWSでは無料料試用枠を用意していますbull  httpawsamazoncomjpfreeemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

74

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

75

Appendix

  参考資料料bull  Amazon Glacier Developer Guidehttpdocsamazonwebservicescomamazonglacierlatestdevintroductionhtml

bull  Amazon Glacier FAQhttpawsamazoncomjpglacierfaqs

bull  Amazon Glaceir価格httpawsamazoncomjpglacierpricing

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

76

QampA

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 60: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

60

起動時にパラメーターを渡す   起動時に16KB以内で任意のものを渡せる

  ChefやPuppetなどを利利用して自己構成できるAMIに   参照emsp AWSマイスターemsp CloudFormation資料料httpwwwslidesharenetkentamagawacloudformation-‐‑‒aws5

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

61

EC2コマンドラインツール amp AWS SDKs

  コマンドラインからEC2のAPIにアクセスできるツール   ツールをインストールしセキュリティ証明書を配置

  AWS SDKs httpawsamazoncomcode

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

62

マネージメントコンソールだけでなくAPIからプログラマブルにアクセス

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1a --instance-type m1small

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1b --instance-type m1small

Tokyo リージョン

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

63

EC2のスケジュールイベント表示機能

  EC2インスタンスが稼働しているハードかソフトにメンテナンスが必要な場合に情報を提供する仕組み

  インスタンスリブートシステムリブートリタイヤ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

64

EC2のステータスチェック機能

  下記の2種類のチェックを自動テストで実行行し情報を提示   システムステータスチェック

  EC2インスタンスにネットワークパケットが通るかチェック   インスタンスステータスチェック

  EC2インスタンスのOSがネットワークパケットを受け取るかチェック

  もし状況に乖離離がある場合はレポートできます

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

65

AWS制限増加申請

  EC2を誤って大量量に作成しないよう最大インスタンス数の上限を20に制限しています

  制限増加申請フォームで各種制限の増加を行行えますbull  httpawsamazoncomjpcontact-‐‑‒usemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

66

既存EBSボリュームのサイズ変更更

  例例 10GB -‐‑‒gt 100GB変更更への流流れ   EBSをデタッチする   EBSからS3にスナップショットを作成する

  新たなボリュームサイズを指定してEBSを作成する

  EBSをアタッチする   マウントしてリサイズする

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

スナップショット

EBS (10GB)

EBS (100GB)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

67

EBSとS3

EBSは複数EC2にアタッチ不不可   単独のEC2インスタンスへのブロックデバイスとしての使い方

  NFSのような使い方をする際はEC2にミドルウェアを導入(GlusterFS等)

S3は複数のEC2からアクセス可   ただしWrite Once Read A Lotな使い方に向いている

  アップロード並列列化も使える   耐久性の設計は99999999999で非常に高い

Copyright copy 2011 Amazon Web Services

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

バケット

EBS

EC2インスタンス

HTTPHTTPS

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

68

EIP使用時の注意点

  グローバルIP(EIP)を用いた場合インターネット経由のアクセスとなり課金発生するケースがある

  名前解決したいサーバに固定IPを付与する13   各サーバは固定グローバルIPを元に

AWSのDNSに名前を問い合わせ13   問い合わせた結果返ってくる外部DNS名でサーバにアクセスを行う13   EC2内部で外部DNS名を使ってアクセスすると プライベートIPアドレスに変換されるため 目的のサーバにプライベートIPでアクセスできる13

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

69

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

70

AWSの課金金の仕組みインターネット

ELB

EC2

EBS

S3

データ転送量量

ELB利利用料料データ処理理量量

インスタンスタイプ別利利用料料

EBSの利利用料料

S3の利利用料料

大半を占める

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

71

Simple Monthly Calculator

  Web上にある計算機を使って概算費用を計算できますsect  httpcalculators3amazonawscomcalc5htmllng=ja_JP

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

72

複数の価格モデル

 課金金モデルが選べるsect 通常の時間課金金のオンデマンドインスタンス

sect ある程度度継続してEC2を使う(1年年3年年)EC2リザーブドインスタンス

sect 入札を利利用してより安く使うEC2スポットインスタンス

rarrマイスターシリーズ RIampスポットインスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

73

AWS無料料試用枠

  AWSでは無料料試用枠を用意していますbull  httpawsamazoncomjpfreeemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

74

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

75

Appendix

  参考資料料bull  Amazon Glacier Developer Guidehttpdocsamazonwebservicescomamazonglacierlatestdevintroductionhtml

bull  Amazon Glacier FAQhttpawsamazoncomjpglacierfaqs

bull  Amazon Glaceir価格httpawsamazoncomjpglacierpricing

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

76

QampA

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 61: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

61

EC2コマンドラインツール amp AWS SDKs

  コマンドラインからEC2のAPIにアクセスできるツール   ツールをインストールしセキュリティ証明書を配置

  AWS SDKs httpawsamazoncomcode

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

62

マネージメントコンソールだけでなくAPIからプログラマブルにアクセス

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1a --instance-type m1small

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1b --instance-type m1small

Tokyo リージョン

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

63

EC2のスケジュールイベント表示機能

  EC2インスタンスが稼働しているハードかソフトにメンテナンスが必要な場合に情報を提供する仕組み

  インスタンスリブートシステムリブートリタイヤ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

64

EC2のステータスチェック機能

  下記の2種類のチェックを自動テストで実行行し情報を提示   システムステータスチェック

  EC2インスタンスにネットワークパケットが通るかチェック   インスタンスステータスチェック

  EC2インスタンスのOSがネットワークパケットを受け取るかチェック

  もし状況に乖離離がある場合はレポートできます

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

65

AWS制限増加申請

  EC2を誤って大量量に作成しないよう最大インスタンス数の上限を20に制限しています

  制限増加申請フォームで各種制限の増加を行行えますbull  httpawsamazoncomjpcontact-‐‑‒usemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

66

既存EBSボリュームのサイズ変更更

  例例 10GB -‐‑‒gt 100GB変更更への流流れ   EBSをデタッチする   EBSからS3にスナップショットを作成する

  新たなボリュームサイズを指定してEBSを作成する

  EBSをアタッチする   マウントしてリサイズする

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

スナップショット

EBS (10GB)

EBS (100GB)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

67

EBSとS3

EBSは複数EC2にアタッチ不不可   単独のEC2インスタンスへのブロックデバイスとしての使い方

  NFSのような使い方をする際はEC2にミドルウェアを導入(GlusterFS等)

S3は複数のEC2からアクセス可   ただしWrite Once Read A Lotな使い方に向いている

  アップロード並列列化も使える   耐久性の設計は99999999999で非常に高い

Copyright copy 2011 Amazon Web Services

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

バケット

EBS

EC2インスタンス

HTTPHTTPS

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

68

EIP使用時の注意点

  グローバルIP(EIP)を用いた場合インターネット経由のアクセスとなり課金発生するケースがある

  名前解決したいサーバに固定IPを付与する13   各サーバは固定グローバルIPを元に

AWSのDNSに名前を問い合わせ13   問い合わせた結果返ってくる外部DNS名でサーバにアクセスを行う13   EC2内部で外部DNS名を使ってアクセスすると プライベートIPアドレスに変換されるため 目的のサーバにプライベートIPでアクセスできる13

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

69

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

70

AWSの課金金の仕組みインターネット

ELB

EC2

EBS

S3

データ転送量量

ELB利利用料料データ処理理量量

インスタンスタイプ別利利用料料

EBSの利利用料料

S3の利利用料料

大半を占める

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

71

Simple Monthly Calculator

  Web上にある計算機を使って概算費用を計算できますsect  httpcalculators3amazonawscomcalc5htmllng=ja_JP

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

72

複数の価格モデル

 課金金モデルが選べるsect 通常の時間課金金のオンデマンドインスタンス

sect ある程度度継続してEC2を使う(1年年3年年)EC2リザーブドインスタンス

sect 入札を利利用してより安く使うEC2スポットインスタンス

rarrマイスターシリーズ RIampスポットインスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

73

AWS無料料試用枠

  AWSでは無料料試用枠を用意していますbull  httpawsamazoncomjpfreeemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

74

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

75

Appendix

  参考資料料bull  Amazon Glacier Developer Guidehttpdocsamazonwebservicescomamazonglacierlatestdevintroductionhtml

bull  Amazon Glacier FAQhttpawsamazoncomjpglacierfaqs

bull  Amazon Glaceir価格httpawsamazoncomjpglacierpricing

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

76

QampA

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 62: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

62

マネージメントコンソールだけでなくAPIからプログラマブルにアクセス

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1a --instance-type m1small

ec2-run-instances ami-b232d0db --instance-count 3 --availability-zone

      ap-northeast-1b --instance-type m1small

Tokyo リージョン

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

63

EC2のスケジュールイベント表示機能

  EC2インスタンスが稼働しているハードかソフトにメンテナンスが必要な場合に情報を提供する仕組み

  インスタンスリブートシステムリブートリタイヤ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

64

EC2のステータスチェック機能

  下記の2種類のチェックを自動テストで実行行し情報を提示   システムステータスチェック

  EC2インスタンスにネットワークパケットが通るかチェック   インスタンスステータスチェック

  EC2インスタンスのOSがネットワークパケットを受け取るかチェック

  もし状況に乖離離がある場合はレポートできます

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

65

AWS制限増加申請

  EC2を誤って大量量に作成しないよう最大インスタンス数の上限を20に制限しています

  制限増加申請フォームで各種制限の増加を行行えますbull  httpawsamazoncomjpcontact-‐‑‒usemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

66

既存EBSボリュームのサイズ変更更

  例例 10GB -‐‑‒gt 100GB変更更への流流れ   EBSをデタッチする   EBSからS3にスナップショットを作成する

  新たなボリュームサイズを指定してEBSを作成する

  EBSをアタッチする   マウントしてリサイズする

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

スナップショット

EBS (10GB)

EBS (100GB)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

67

EBSとS3

EBSは複数EC2にアタッチ不不可   単独のEC2インスタンスへのブロックデバイスとしての使い方

  NFSのような使い方をする際はEC2にミドルウェアを導入(GlusterFS等)

S3は複数のEC2からアクセス可   ただしWrite Once Read A Lotな使い方に向いている

  アップロード並列列化も使える   耐久性の設計は99999999999で非常に高い

Copyright copy 2011 Amazon Web Services

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

バケット

EBS

EC2インスタンス

HTTPHTTPS

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

68

EIP使用時の注意点

  グローバルIP(EIP)を用いた場合インターネット経由のアクセスとなり課金発生するケースがある

  名前解決したいサーバに固定IPを付与する13   各サーバは固定グローバルIPを元に

AWSのDNSに名前を問い合わせ13   問い合わせた結果返ってくる外部DNS名でサーバにアクセスを行う13   EC2内部で外部DNS名を使ってアクセスすると プライベートIPアドレスに変換されるため 目的のサーバにプライベートIPでアクセスできる13

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

69

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

70

AWSの課金金の仕組みインターネット

ELB

EC2

EBS

S3

データ転送量量

ELB利利用料料データ処理理量量

インスタンスタイプ別利利用料料

EBSの利利用料料

S3の利利用料料

大半を占める

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

71

Simple Monthly Calculator

  Web上にある計算機を使って概算費用を計算できますsect  httpcalculators3amazonawscomcalc5htmllng=ja_JP

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

72

複数の価格モデル

 課金金モデルが選べるsect 通常の時間課金金のオンデマンドインスタンス

sect ある程度度継続してEC2を使う(1年年3年年)EC2リザーブドインスタンス

sect 入札を利利用してより安く使うEC2スポットインスタンス

rarrマイスターシリーズ RIampスポットインスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

73

AWS無料料試用枠

  AWSでは無料料試用枠を用意していますbull  httpawsamazoncomjpfreeemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

74

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

75

Appendix

  参考資料料bull  Amazon Glacier Developer Guidehttpdocsamazonwebservicescomamazonglacierlatestdevintroductionhtml

bull  Amazon Glacier FAQhttpawsamazoncomjpglacierfaqs

bull  Amazon Glaceir価格httpawsamazoncomjpglacierpricing

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

76

QampA

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 63: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

63

EC2のスケジュールイベント表示機能

  EC2インスタンスが稼働しているハードかソフトにメンテナンスが必要な場合に情報を提供する仕組み

  インスタンスリブートシステムリブートリタイヤ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

64

EC2のステータスチェック機能

  下記の2種類のチェックを自動テストで実行行し情報を提示   システムステータスチェック

  EC2インスタンスにネットワークパケットが通るかチェック   インスタンスステータスチェック

  EC2インスタンスのOSがネットワークパケットを受け取るかチェック

  もし状況に乖離離がある場合はレポートできます

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

65

AWS制限増加申請

  EC2を誤って大量量に作成しないよう最大インスタンス数の上限を20に制限しています

  制限増加申請フォームで各種制限の増加を行行えますbull  httpawsamazoncomjpcontact-‐‑‒usemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

66

既存EBSボリュームのサイズ変更更

  例例 10GB -‐‑‒gt 100GB変更更への流流れ   EBSをデタッチする   EBSからS3にスナップショットを作成する

  新たなボリュームサイズを指定してEBSを作成する

  EBSをアタッチする   マウントしてリサイズする

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

スナップショット

EBS (10GB)

EBS (100GB)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

67

EBSとS3

EBSは複数EC2にアタッチ不不可   単独のEC2インスタンスへのブロックデバイスとしての使い方

  NFSのような使い方をする際はEC2にミドルウェアを導入(GlusterFS等)

S3は複数のEC2からアクセス可   ただしWrite Once Read A Lotな使い方に向いている

  アップロード並列列化も使える   耐久性の設計は99999999999で非常に高い

Copyright copy 2011 Amazon Web Services

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

バケット

EBS

EC2インスタンス

HTTPHTTPS

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

68

EIP使用時の注意点

  グローバルIP(EIP)を用いた場合インターネット経由のアクセスとなり課金発生するケースがある

  名前解決したいサーバに固定IPを付与する13   各サーバは固定グローバルIPを元に

AWSのDNSに名前を問い合わせ13   問い合わせた結果返ってくる外部DNS名でサーバにアクセスを行う13   EC2内部で外部DNS名を使ってアクセスすると プライベートIPアドレスに変換されるため 目的のサーバにプライベートIPでアクセスできる13

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

69

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

70

AWSの課金金の仕組みインターネット

ELB

EC2

EBS

S3

データ転送量量

ELB利利用料料データ処理理量量

インスタンスタイプ別利利用料料

EBSの利利用料料

S3の利利用料料

大半を占める

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

71

Simple Monthly Calculator

  Web上にある計算機を使って概算費用を計算できますsect  httpcalculators3amazonawscomcalc5htmllng=ja_JP

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

72

複数の価格モデル

 課金金モデルが選べるsect 通常の時間課金金のオンデマンドインスタンス

sect ある程度度継続してEC2を使う(1年年3年年)EC2リザーブドインスタンス

sect 入札を利利用してより安く使うEC2スポットインスタンス

rarrマイスターシリーズ RIampスポットインスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

73

AWS無料料試用枠

  AWSでは無料料試用枠を用意していますbull  httpawsamazoncomjpfreeemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

74

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

75

Appendix

  参考資料料bull  Amazon Glacier Developer Guidehttpdocsamazonwebservicescomamazonglacierlatestdevintroductionhtml

bull  Amazon Glacier FAQhttpawsamazoncomjpglacierfaqs

bull  Amazon Glaceir価格httpawsamazoncomjpglacierpricing

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

76

QampA

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 64: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

64

EC2のステータスチェック機能

  下記の2種類のチェックを自動テストで実行行し情報を提示   システムステータスチェック

  EC2インスタンスにネットワークパケットが通るかチェック   インスタンスステータスチェック

  EC2インスタンスのOSがネットワークパケットを受け取るかチェック

  もし状況に乖離離がある場合はレポートできます

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

65

AWS制限増加申請

  EC2を誤って大量量に作成しないよう最大インスタンス数の上限を20に制限しています

  制限増加申請フォームで各種制限の増加を行行えますbull  httpawsamazoncomjpcontact-‐‑‒usemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

66

既存EBSボリュームのサイズ変更更

  例例 10GB -‐‑‒gt 100GB変更更への流流れ   EBSをデタッチする   EBSからS3にスナップショットを作成する

  新たなボリュームサイズを指定してEBSを作成する

  EBSをアタッチする   マウントしてリサイズする

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

スナップショット

EBS (10GB)

EBS (100GB)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

67

EBSとS3

EBSは複数EC2にアタッチ不不可   単独のEC2インスタンスへのブロックデバイスとしての使い方

  NFSのような使い方をする際はEC2にミドルウェアを導入(GlusterFS等)

S3は複数のEC2からアクセス可   ただしWrite Once Read A Lotな使い方に向いている

  アップロード並列列化も使える   耐久性の設計は99999999999で非常に高い

Copyright copy 2011 Amazon Web Services

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

バケット

EBS

EC2インスタンス

HTTPHTTPS

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

68

EIP使用時の注意点

  グローバルIP(EIP)を用いた場合インターネット経由のアクセスとなり課金発生するケースがある

  名前解決したいサーバに固定IPを付与する13   各サーバは固定グローバルIPを元に

AWSのDNSに名前を問い合わせ13   問い合わせた結果返ってくる外部DNS名でサーバにアクセスを行う13   EC2内部で外部DNS名を使ってアクセスすると プライベートIPアドレスに変換されるため 目的のサーバにプライベートIPでアクセスできる13

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

69

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

70

AWSの課金金の仕組みインターネット

ELB

EC2

EBS

S3

データ転送量量

ELB利利用料料データ処理理量量

インスタンスタイプ別利利用料料

EBSの利利用料料

S3の利利用料料

大半を占める

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

71

Simple Monthly Calculator

  Web上にある計算機を使って概算費用を計算できますsect  httpcalculators3amazonawscomcalc5htmllng=ja_JP

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

72

複数の価格モデル

 課金金モデルが選べるsect 通常の時間課金金のオンデマンドインスタンス

sect ある程度度継続してEC2を使う(1年年3年年)EC2リザーブドインスタンス

sect 入札を利利用してより安く使うEC2スポットインスタンス

rarrマイスターシリーズ RIampスポットインスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

73

AWS無料料試用枠

  AWSでは無料料試用枠を用意していますbull  httpawsamazoncomjpfreeemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

74

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

75

Appendix

  参考資料料bull  Amazon Glacier Developer Guidehttpdocsamazonwebservicescomamazonglacierlatestdevintroductionhtml

bull  Amazon Glacier FAQhttpawsamazoncomjpglacierfaqs

bull  Amazon Glaceir価格httpawsamazoncomjpglacierpricing

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

76

QampA

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 65: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

65

AWS制限増加申請

  EC2を誤って大量量に作成しないよう最大インスタンス数の上限を20に制限しています

  制限増加申請フォームで各種制限の増加を行行えますbull  httpawsamazoncomjpcontact-‐‑‒usemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

66

既存EBSボリュームのサイズ変更更

  例例 10GB -‐‑‒gt 100GB変更更への流流れ   EBSをデタッチする   EBSからS3にスナップショットを作成する

  新たなボリュームサイズを指定してEBSを作成する

  EBSをアタッチする   マウントしてリサイズする

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

スナップショット

EBS (10GB)

EBS (100GB)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

67

EBSとS3

EBSは複数EC2にアタッチ不不可   単独のEC2インスタンスへのブロックデバイスとしての使い方

  NFSのような使い方をする際はEC2にミドルウェアを導入(GlusterFS等)

S3は複数のEC2からアクセス可   ただしWrite Once Read A Lotな使い方に向いている

  アップロード並列列化も使える   耐久性の設計は99999999999で非常に高い

Copyright copy 2011 Amazon Web Services

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

バケット

EBS

EC2インスタンス

HTTPHTTPS

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

68

EIP使用時の注意点

  グローバルIP(EIP)を用いた場合インターネット経由のアクセスとなり課金発生するケースがある

  名前解決したいサーバに固定IPを付与する13   各サーバは固定グローバルIPを元に

AWSのDNSに名前を問い合わせ13   問い合わせた結果返ってくる外部DNS名でサーバにアクセスを行う13   EC2内部で外部DNS名を使ってアクセスすると プライベートIPアドレスに変換されるため 目的のサーバにプライベートIPでアクセスできる13

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

69

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

70

AWSの課金金の仕組みインターネット

ELB

EC2

EBS

S3

データ転送量量

ELB利利用料料データ処理理量量

インスタンスタイプ別利利用料料

EBSの利利用料料

S3の利利用料料

大半を占める

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

71

Simple Monthly Calculator

  Web上にある計算機を使って概算費用を計算できますsect  httpcalculators3amazonawscomcalc5htmllng=ja_JP

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

72

複数の価格モデル

 課金金モデルが選べるsect 通常の時間課金金のオンデマンドインスタンス

sect ある程度度継続してEC2を使う(1年年3年年)EC2リザーブドインスタンス

sect 入札を利利用してより安く使うEC2スポットインスタンス

rarrマイスターシリーズ RIampスポットインスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

73

AWS無料料試用枠

  AWSでは無料料試用枠を用意していますbull  httpawsamazoncomjpfreeemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

74

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

75

Appendix

  参考資料料bull  Amazon Glacier Developer Guidehttpdocsamazonwebservicescomamazonglacierlatestdevintroductionhtml

bull  Amazon Glacier FAQhttpawsamazoncomjpglacierfaqs

bull  Amazon Glaceir価格httpawsamazoncomjpglacierpricing

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

76

QampA

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 66: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

66

既存EBSボリュームのサイズ変更更

  例例 10GB -‐‑‒gt 100GB変更更への流流れ   EBSをデタッチする   EBSからS3にスナップショットを作成する

  新たなボリュームサイズを指定してEBSを作成する

  EBSをアタッチする   マウントしてリサイズする

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

スナップショット

EBS (10GB)

EBS (100GB)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

67

EBSとS3

EBSは複数EC2にアタッチ不不可   単独のEC2インスタンスへのブロックデバイスとしての使い方

  NFSのような使い方をする際はEC2にミドルウェアを導入(GlusterFS等)

S3は複数のEC2からアクセス可   ただしWrite Once Read A Lotな使い方に向いている

  アップロード並列列化も使える   耐久性の設計は99999999999で非常に高い

Copyright copy 2011 Amazon Web Services

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

バケット

EBS

EC2インスタンス

HTTPHTTPS

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

68

EIP使用時の注意点

  グローバルIP(EIP)を用いた場合インターネット経由のアクセスとなり課金発生するケースがある

  名前解決したいサーバに固定IPを付与する13   各サーバは固定グローバルIPを元に

AWSのDNSに名前を問い合わせ13   問い合わせた結果返ってくる外部DNS名でサーバにアクセスを行う13   EC2内部で外部DNS名を使ってアクセスすると プライベートIPアドレスに変換されるため 目的のサーバにプライベートIPでアクセスできる13

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

69

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

70

AWSの課金金の仕組みインターネット

ELB

EC2

EBS

S3

データ転送量量

ELB利利用料料データ処理理量量

インスタンスタイプ別利利用料料

EBSの利利用料料

S3の利利用料料

大半を占める

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

71

Simple Monthly Calculator

  Web上にある計算機を使って概算費用を計算できますsect  httpcalculators3amazonawscomcalc5htmllng=ja_JP

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

72

複数の価格モデル

 課金金モデルが選べるsect 通常の時間課金金のオンデマンドインスタンス

sect ある程度度継続してEC2を使う(1年年3年年)EC2リザーブドインスタンス

sect 入札を利利用してより安く使うEC2スポットインスタンス

rarrマイスターシリーズ RIampスポットインスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

73

AWS無料料試用枠

  AWSでは無料料試用枠を用意していますbull  httpawsamazoncomjpfreeemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

74

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

75

Appendix

  参考資料料bull  Amazon Glacier Developer Guidehttpdocsamazonwebservicescomamazonglacierlatestdevintroductionhtml

bull  Amazon Glacier FAQhttpawsamazoncomjpglacierfaqs

bull  Amazon Glaceir価格httpawsamazoncomjpglacierpricing

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

76

QampA

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 67: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

67

EBSとS3

EBSは複数EC2にアタッチ不不可   単独のEC2インスタンスへのブロックデバイスとしての使い方

  NFSのような使い方をする際はEC2にミドルウェアを導入(GlusterFS等)

S3は複数のEC2からアクセス可   ただしWrite Once Read A Lotな使い方に向いている

  アップロード並列列化も使える   耐久性の設計は99999999999で非常に高い

Copyright copy 2011 Amazon Web Services

リージョン

アベイラビリティゾーン

EC2インスタンス

Amazon S3

バケット

EBS

EC2インスタンス

HTTPHTTPS

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

68

EIP使用時の注意点

  グローバルIP(EIP)を用いた場合インターネット経由のアクセスとなり課金発生するケースがある

  名前解決したいサーバに固定IPを付与する13   各サーバは固定グローバルIPを元に

AWSのDNSに名前を問い合わせ13   問い合わせた結果返ってくる外部DNS名でサーバにアクセスを行う13   EC2内部で外部DNS名を使ってアクセスすると プライベートIPアドレスに変換されるため 目的のサーバにプライベートIPでアクセスできる13

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

69

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

70

AWSの課金金の仕組みインターネット

ELB

EC2

EBS

S3

データ転送量量

ELB利利用料料データ処理理量量

インスタンスタイプ別利利用料料

EBSの利利用料料

S3の利利用料料

大半を占める

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

71

Simple Monthly Calculator

  Web上にある計算機を使って概算費用を計算できますsect  httpcalculators3amazonawscomcalc5htmllng=ja_JP

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

72

複数の価格モデル

 課金金モデルが選べるsect 通常の時間課金金のオンデマンドインスタンス

sect ある程度度継続してEC2を使う(1年年3年年)EC2リザーブドインスタンス

sect 入札を利利用してより安く使うEC2スポットインスタンス

rarrマイスターシリーズ RIampスポットインスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

73

AWS無料料試用枠

  AWSでは無料料試用枠を用意していますbull  httpawsamazoncomjpfreeemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

74

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

75

Appendix

  参考資料料bull  Amazon Glacier Developer Guidehttpdocsamazonwebservicescomamazonglacierlatestdevintroductionhtml

bull  Amazon Glacier FAQhttpawsamazoncomjpglacierfaqs

bull  Amazon Glaceir価格httpawsamazoncomjpglacierpricing

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

76

QampA

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 68: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

68

EIP使用時の注意点

  グローバルIP(EIP)を用いた場合インターネット経由のアクセスとなり課金発生するケースがある

  名前解決したいサーバに固定IPを付与する13   各サーバは固定グローバルIPを元に

AWSのDNSに名前を問い合わせ13   問い合わせた結果返ってくる外部DNS名でサーバにアクセスを行う13   EC2内部で外部DNS名を使ってアクセスすると プライベートIPアドレスに変換されるため 目的のサーバにプライベートIPでアクセスできる13

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

69

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

70

AWSの課金金の仕組みインターネット

ELB

EC2

EBS

S3

データ転送量量

ELB利利用料料データ処理理量量

インスタンスタイプ別利利用料料

EBSの利利用料料

S3の利利用料料

大半を占める

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

71

Simple Monthly Calculator

  Web上にある計算機を使って概算費用を計算できますsect  httpcalculators3amazonawscomcalc5htmllng=ja_JP

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

72

複数の価格モデル

 課金金モデルが選べるsect 通常の時間課金金のオンデマンドインスタンス

sect ある程度度継続してEC2を使う(1年年3年年)EC2リザーブドインスタンス

sect 入札を利利用してより安く使うEC2スポットインスタンス

rarrマイスターシリーズ RIampスポットインスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

73

AWS無料料試用枠

  AWSでは無料料試用枠を用意していますbull  httpawsamazoncomjpfreeemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

74

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

75

Appendix

  参考資料料bull  Amazon Glacier Developer Guidehttpdocsamazonwebservicescomamazonglacierlatestdevintroductionhtml

bull  Amazon Glacier FAQhttpawsamazoncomjpglacierfaqs

bull  Amazon Glaceir価格httpawsamazoncomjpglacierpricing

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

76

QampA

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 69: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

69

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

70

AWSの課金金の仕組みインターネット

ELB

EC2

EBS

S3

データ転送量量

ELB利利用料料データ処理理量量

インスタンスタイプ別利利用料料

EBSの利利用料料

S3の利利用料料

大半を占める

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

71

Simple Monthly Calculator

  Web上にある計算機を使って概算費用を計算できますsect  httpcalculators3amazonawscomcalc5htmllng=ja_JP

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

72

複数の価格モデル

 課金金モデルが選べるsect 通常の時間課金金のオンデマンドインスタンス

sect ある程度度継続してEC2を使う(1年年3年年)EC2リザーブドインスタンス

sect 入札を利利用してより安く使うEC2スポットインスタンス

rarrマイスターシリーズ RIampスポットインスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

73

AWS無料料試用枠

  AWSでは無料料試用枠を用意していますbull  httpawsamazoncomjpfreeemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

74

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

75

Appendix

  参考資料料bull  Amazon Glacier Developer Guidehttpdocsamazonwebservicescomamazonglacierlatestdevintroductionhtml

bull  Amazon Glacier FAQhttpawsamazoncomjpglacierfaqs

bull  Amazon Glaceir価格httpawsamazoncomjpglacierpricing

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

76

QampA

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 70: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

70

AWSの課金金の仕組みインターネット

ELB

EC2

EBS

S3

データ転送量量

ELB利利用料料データ処理理量量

インスタンスタイプ別利利用料料

EBSの利利用料料

S3の利利用料料

大半を占める

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

71

Simple Monthly Calculator

  Web上にある計算機を使って概算費用を計算できますsect  httpcalculators3amazonawscomcalc5htmllng=ja_JP

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

72

複数の価格モデル

 課金金モデルが選べるsect 通常の時間課金金のオンデマンドインスタンス

sect ある程度度継続してEC2を使う(1年年3年年)EC2リザーブドインスタンス

sect 入札を利利用してより安く使うEC2スポットインスタンス

rarrマイスターシリーズ RIampスポットインスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

73

AWS無料料試用枠

  AWSでは無料料試用枠を用意していますbull  httpawsamazoncomjpfreeemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

74

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

75

Appendix

  参考資料料bull  Amazon Glacier Developer Guidehttpdocsamazonwebservicescomamazonglacierlatestdevintroductionhtml

bull  Amazon Glacier FAQhttpawsamazoncomjpglacierfaqs

bull  Amazon Glaceir価格httpawsamazoncomjpglacierpricing

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

76

QampA

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 71: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

71

Simple Monthly Calculator

  Web上にある計算機を使って概算費用を計算できますsect  httpcalculators3amazonawscomcalc5htmllng=ja_JP

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

72

複数の価格モデル

 課金金モデルが選べるsect 通常の時間課金金のオンデマンドインスタンス

sect ある程度度継続してEC2を使う(1年年3年年)EC2リザーブドインスタンス

sect 入札を利利用してより安く使うEC2スポットインスタンス

rarrマイスターシリーズ RIampスポットインスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

73

AWS無料料試用枠

  AWSでは無料料試用枠を用意していますbull  httpawsamazoncomjpfreeemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

74

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

75

Appendix

  参考資料料bull  Amazon Glacier Developer Guidehttpdocsamazonwebservicescomamazonglacierlatestdevintroductionhtml

bull  Amazon Glacier FAQhttpawsamazoncomjpglacierfaqs

bull  Amazon Glaceir価格httpawsamazoncomjpglacierpricing

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

76

QampA

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 72: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

72

複数の価格モデル

 課金金モデルが選べるsect 通常の時間課金金のオンデマンドインスタンス

sect ある程度度継続してEC2を使う(1年年3年年)EC2リザーブドインスタンス

sect 入札を利利用してより安く使うEC2スポットインスタンス

rarrマイスターシリーズ RIampスポットインスタンス

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

73

AWS無料料試用枠

  AWSでは無料料試用枠を用意していますbull  httpawsamazoncomjpfreeemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

74

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

75

Appendix

  参考資料料bull  Amazon Glacier Developer Guidehttpdocsamazonwebservicescomamazonglacierlatestdevintroductionhtml

bull  Amazon Glacier FAQhttpawsamazoncomjpglacierfaqs

bull  Amazon Glaceir価格httpawsamazoncomjpglacierpricing

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

76

QampA

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 73: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

73

AWS無料料試用枠

  AWSでは無料料試用枠を用意していますbull  httpawsamazoncomjpfreeemsp 

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

74

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

75

Appendix

  参考資料料bull  Amazon Glacier Developer Guidehttpdocsamazonwebservicescomamazonglacierlatestdevintroductionhtml

bull  Amazon Glacier FAQhttpawsamazoncomjpglacierfaqs

bull  Amazon Glaceir価格httpawsamazoncomjpglacierpricing

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

76

QampA

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 74: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

74

今日のAgenda

 Amazon EC2とは  Amazon EC2を触ってみる  Amazon EC2のセキュリティモデル  最新アップデート  利利用におけるTIPS  料料金金モデル  まとめ

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

75

Appendix

  参考資料料bull  Amazon Glacier Developer Guidehttpdocsamazonwebservicescomamazonglacierlatestdevintroductionhtml

bull  Amazon Glacier FAQhttpawsamazoncomjpglacierfaqs

bull  Amazon Glaceir価格httpawsamazoncomjpglacierpricing

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

76

QampA

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 75: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

75

Appendix

  参考資料料bull  Amazon Glacier Developer Guidehttpdocsamazonwebservicescomamazonglacierlatestdevintroductionhtml

bull  Amazon Glacier FAQhttpawsamazoncomjpglacierfaqs

bull  Amazon Glaceir価格httpawsamazoncomjpglacierpricing

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

76

QampA

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 76: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

76

QampA

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 77: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc copy 2012 Amazoncom Inc and its affiliates All rights reserved May not be copied modified or distributed in whole or in part without the express consent of Amazoncom Inc

77

Webinar資料料の配置場所

  AWS クラウドサービス活用資料料集bull  httpawsamazoncomjpaws-‐‑‒jp-‐‑‒introduction

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78

Page 78: AWS Black Belt Techシリーズ Amazon Elastic Compute Cloud (Amazon EC2)

24時間365日での日本語サポートの提供bull  日本語でのサポートをご提供しております httpawsamazoncomjppremiumsupport

ベーシック デベロッパー ビジネス エンタープライズ

受付時間 24時間 365日(年年中無休)

初回応答時間 セルフサービス 12時間(営業時間内) 1時間 15分

サポート連絡先 NA 1人 5人 無制限

チャット 不不可 不不可 可能 可能

TEL 不不可 不不可 可能 可能

専任スタッフ なし なし なし あり

料料金金(月額) 無料料(AWSの利利用料料に含まれる) $49月

AWS利利用総額の10〜~

最低料料金金$100月

AWS利利用総額の10〜~

最低$15000月

78