©2014, Amazon Web Services, Inc. or its affiliates. All rights reserved. ©2014, Amazon Web Services, Inc. or its affiliates. All rights reserved.
今更聞けない AWS クラウド入門
アマゾンデータサービスジャパン株式会社
ソリューションアーキテクト 篠原英治
©2014, Amazon Web Services, Inc. or its affiliates. All rights reserved. ©2014, Amazon Web Services, Inc. or its affiliates. All rights reserved.
フィードバックをお寄せ下さい
本イベントについてツイートされる際は、
ハッシュタグをご利用ください。
#AWSRoadshow
お帰りになる前には、アンケートへのご協力をお願いします。
引換用の記念品をご用意しています。
名前:
・篠原 英治 / ソリューションアーキテクト
役割:
・スタートアップ企業向け技術支援担当
・Amazon CloudSearch Subject Matter Expert
©2014, Amazon Web Services, Inc. or its affiliates. All rights reserved.
10年以上ずっとITの現場にいます!
• 2002-2007
• SIer: プログラマ
• 2007-2013
• インターネットサービス企業: エンジニア
• 2013-現在
• アマゾンデータサービスジャパン ソリューションアーキテクト
オンライン
• ブログ: shinodogg.com
• Twitter: @shinodogg
自己紹介
セッションタイトル
©2014, Amazon Web Services, Inc. or its affiliates. All rights reserved.
今更きけない??
©2014, Amazon Web Services, Inc. or its affiliates. All rights reserved.
• AWSとは?
• 最初におさえておきたい3つのサービス
• AWSの料金について
• AWSのセキュリティについて
• 最後に
本日の目次
• AWSとは?
• 最初におさえておきたい3つのサービス
• AWSの料金について
• AWSのセキュリティについて
• 最後に
本日の目次
初期のAmazon.com
©2014, Amazon Web Services, Inc. or its affiliates. All rights reserved.
amazon.com, 2014
長年にわたるAmazon.comの
ITインフラ運用ノウハウをサービスに!
Amazonのビジネスモデル
創業者ジェフ・ベゾスが起業時にレストランのナプキンに書いたオリジナルのコンセプト図
規模の拡大とイノベーションのサイクル
資本
投資
技術
投資
効率
改善
値下げ
より多く
の
顧客獲得
©2014, Amazon Web Services, Inc. or its affiliates. All rights reserved.
規模の拡大とイノベーション
技術
投資
効率
改善
値下げ
資本
投資
現在AWSでは、Amazon.com が
年商約7,000 億円($7B)企業であった際と
同等のサーバー数を
毎日追加
するスピードで成長
より多く
の
顧客獲得
©2014, Amazon Web Services, Inc. or its affiliates. All rights reserved.
どのくらいの規模なのでしょうか?
ストレージサービス(Amazon S3)で
お預かりしているファイルの数はどれくらい?
• 1:29億個
• 2:140億個
• 3:2兆個
Q4
2006
Q4
2007
Q4
2008
Q4
2009
Q4
2010
Q4
2011
Q4
2012
Q2
2013
29億 140億 400億 1,020億
2,620億
7,620億
1.3兆
2兆
○
×
×
資本
投資
規模の拡大とイノベーション
効率
改善
値下げ
より多く
の
顧客獲得
2013年1年間だけでも、
280の新サービスや新機能を追加
技術
投資
©2014, Amazon Web Services, Inc. or its affiliates. All rights reserved.
資本
投資
規模の拡大とイノベーション
技術
投資
より多く
の
顧客獲得
2006年のサービス開始から
44
回の値下げを実施
値下げ
効率
改善
©2014, Amazon Web Services, Inc. or its affiliates. All rights reserved.
“AWSとは”何かご理解いただけたと思います
• AWSとは?
• 最初におさえておきたい3つのサービ
ス
• AWSの料金について
• AWSのセキュリティについて
• 最後に
本日の目次
©2014, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWSの豊富なサービス
AWSのアカウントを作ってログインする
と、、
©2014, Amazon Web Services, Inc. or its affiliates. All rights reserved.
©2014, Amazon Web Services, Inc. or its affiliates. All rights reserved.
良さそうなのは理解できたけど、、
©2014, Amazon Web Services, Inc. or its affiliates. All rights reserved.
大丈夫です!
©2014, Amazon Web Services, Inc. or its affiliates. All rights reserved.
1c
Amazon EC2
・台数やスペックを柔軟に変更可能な仮想サーバ
(
各種Linux/Windows
)
・
初期費用不要で、必要な時に必要な台数を
時間課金で利用可能
・
API(Application Programming Interface)で、
起動や停止、スペック変更などの各種操作が可能
©2014, Amazon Web Services, Inc. or its affiliates. All rights reserved.
仮想サーバ台数
5,000
月 火 水 木 金 土 日
3日間で
5,000台まで増加
少額の
初期費用で
公開
アプリ対応
必要なときに必要なだけ①
• インターネットビデオアプリケーションの例
必要なときに必要なだけ②
毎秒数十万の同時接続
クライアントに
メッセージ配信を行うため、
クラウドを活用してオンデマンドに調達した
©2014, Amazon Web Services, Inc. or its affiliates. All rights reserved. US West (Northern California) US East (Northern Virginia) EU (Ireland) Asia Pacific (Singapore)
Asia
Pacific
(Tokyo) GovCloud (US ITAR Region) US West (Oregon) South America (Sao Paulo) AWS RegionsAWS Edge Locations
Asia Pacific (Sydney)
世界中のデータセンタ群(リージョン)
どのリージョンでも同じ使い勝手
同じやり方で日本から利用可能
EU – NEW! (Frankfurt)• Tokyoリージョンは2つのデータセンタ(AZ)
• 2つのAZを利用した冗長構成も簡単
リージョン=データセンタ”群”?
EU (Ireland) Availability Zone A Availability Zone C Availability Zone BAsia Pacific (Tokyo)
Availability Zone A Availability Zone B US West (Oregon) Availability Zone A Availability Zone B US West(Northern California) Availability Zone A Availability Zone B
Asia Pacific (Singapore)
Availability Zone A
Availability Zone B
AWS GovCloud (US)
Availability Zone A
Availability Zone B
South America (Sao Paulo)
Availability Zone A
Availability Zone B
US East (Northern Virginia)
Availability Zone D Availability Zone C Availability Zone B Availability Zone E Availability Zone A
Asia Pacific (Sydney)
Availability Zone A Availability Zone B
*AZ=Availability Zoneの略
距離の離れたデータセンタ
©2014, Amazon Web Services, Inc. or its affiliates. All rights reserved.
EC2を利用すれば、以前から皆さんがお使いの
サーバーを必要な分だけ世界中に構築できます!
1
Amazon RDS
・マネージドデータベースサービス
(
MySQL/PostgreSQL/Oracle/SQL Server
に対応)
・冗長構成、マスタ/スレーブ構成や
自動バックアップなどご利用可能
まずは、おさえておきたいサービス (データベース)
EC2と同様に、日頃から皆さんがお使いの
データベースを必要な分だけ世界中に簡単に構築可能!
©2014, Amazon Web Services, Inc. or its affiliates. All rights reserved. SnapShot
(自動/手動)
RDSで2つのデータセンターを使う構成(MultiAZ)にすると
万が一のことがあっても安心・安全
Availability Zone
Availability Zone
RDS
RDS
同期レプリケーション
自動フェイルオーバー
ログ (5分間隔)データセンター間での冗長構成
スナップショットとログからデータ復元
RDSなら読み取り専用インスタンスも簡単構築
Availability Zone
Availability Zone
RDS
RDS
非同期レプリケーション
©2014, Amazon Web Services, Inc. or its affiliates. All rights reserved.
まずは、おさえておきたいサービス (ストレージ)
1
Amazon S3
・容量無制限の
オンラインストレージ
・自動的に複数DCに保存し、高い耐久性を実現
・保存した分だけの安価な従量課金
実質的に業界標準の分散オブジェクトストレージ
“S3 互換” 等のキーワードで検索してみましょう!
分散オブジェクトストレージ?
難しそう…?
©2014, Amazon Web Services, Inc. or its affiliates. All rights reserved.
S3の概要
東京リージョン
3か所以上で
自動複製
バケット
高い耐久性で
データ失わない:
99.999999999%
世界中の拠点(リージョン)から選択
データセンターA
データ置くだけ。
インフラ、電源、
気にしない。
容量無制限。
データセンターB
データセンターC
ファイル
⇒ テキスト、画像、動画
保存するデータは、
自動で暗号化する
ことも可能
安価な従量課金
例:1GB/月 –
約3.4円
使うのはとても簡単!
©2014, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS SDK for PHP(AWSのPHPライブラリ)を
使う例: バケットにファイルを追加
// S3用のクライアントを生成
$client = S3Client::factory();
// バケットにファイルを追加
$key = 'hello_world.txt';
$result = $client->
putObject
(array(
'Bucket' => $bucket,
'Key' => $key,
'Body' => "Hello World!"
));
AWS SDK for PHP(AWSのPHPライブラリ)を
使う例: バケットからファイルを取得
// バケットからファイルを取得して表示
$result = $client->
getObject
(array(
'Bucket' => $bucket,
'Key' => $key
));
©2014, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS CLI(AWSのコマンドラインツール)を
使う例: バケットからファイルの一覧を取得
$ aws s3
ls
s3://bucket-name
Bucket: my-bucket
Prefix:
LastWriteTime Length Name
--- --- ----
PRE MyFolder/
2013-09-04 19:05:48 3 MyFile1.txt
AWS CLI(AWSのコマンドラインツール)を
使う例: ディレクトリのsync
$ aws s3
sync
. s3://my-bucket/Foo
upload: Bar¥MyFile3.txt to s3://my-bucket/Foo/Bar/MyFile3.txt
upload: MyFile2.txt to s3://my-bucket/Foo/MyFile2.txt
©2014, Amazon Web Services, Inc. or its affiliates. All rights reserved.
プログラムとか良く分からなくても
S3は使えます!
©2014, Amazon Web Services, Inc. or its affiliates. All rights reserved.
©2014, Amazon Web Services, Inc. or its affiliates. All rights reserved.
S3にアップロードしたHTMLや画像を公開することも簡単!
HTMLと画像を
S3にUpload
HTMLと画像が
配信されている
©2014, Amazon Web Services, Inc. or its affiliates. All rights reserved.
1c
Amazon EC2
・一般的なLinux/Windowsサーバ
・プラスアルファで便利な機能
1
Amazon S3
・業界標準APIで操作するストレージ
・プラスアルファで便利な機能や高い耐久性
1
Amazon RDS
・一般的なMySQLまたはPostgreSQL
・プラスアルファで便利な機能
いずれも既存の知識で使えます!
• AWSとは?
• 最初におさえておきたい3つのサービス
• AWSの料金について
• AWSのセキュリティについて
• 最後に
本日の目次
©2014, Amazon Web Services, Inc. or its affiliates. All rights reserved.
個人でもスタートアップでも、
エンタープライズでも同じ価格
主要サービスの価格
①サーバ
データベース
約3円~ / 1時間
Amazon EC2
②ストレージ
1GB1ヶ月保存で約3.4円
③データ転送
(ダウンロードのみ課金対象)
約20円 / 1GB
※サーバスペックによって異なりますAmazon S3
約4円~ / 1時間
Amazon RDS
いずれも初期費用は不要(0円)
©2014, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS利用料の一般的な内訳例
一般的に「サーバ/DB」が全体の8~9割程度を
占めるケースが多い
AWSにはいろいろな課金箇所があるが、サーバ/DB利用料、
データ転送料が想定できれば、大体の金額は算出できる
サーバ/DBは使った分だけの従量課金
• 初期費用は不要
• 起動時間1時間単位の課金
• たとえば2台を1ヶ月利用の場合は…
時間単価×24(時間)×日数(30日など)×2(台数)
• 時間単価はスペックによって異なる
©2014, Amazon Web Services, Inc. or its affiliates. All rights reserved.
長期ご利用の割引プランもあります
• リザーブド・インスタンス
– 1年間 or 3年間での「インスタンス割引権利」の購入
– 大幅割引
(
3~5割引
)
が適用
– 長期間稼動が見込まれる処理に最適
オンデマンド
インスタンス
リザーブド
インスタンス
積算料金
期間
一時金
台数×時間
• 200台を2時間なら…
時間単価×200(台数)×2(時間)
• 2台を200時間なら…
時間単価×2(台)×200(時間)
• たとえば…1,000台のサーバを使って、
1時間だけ計算処理をすることも可能
同じ料金
©2014, Amazon Web Services, Inc. or its affiliates. All rights reserved.
突発的なピーク対応にいくらかかると思いますか?
• 1:約1,000円
• 2:約10,000円
• 3:約100,000円
・2時間後にピーク前の状態に戻す前提、ピークが来ない場合との比較
・m3.mediumのスペック:1コア・メモリ3.7GB
・m3.xlargeのスペック:4コア・メモリ15GB
テレビ番組対策で2時間の間…
EC2(medium)を20台増設、
RDSをスペックアップ(medium→xlarge)
©2014, Amazon Web Services, Inc. or its affiliates. All rights reserved.
突発的なピーク対応にいくらかかると思いますか?
• 1:約1,000円
• 2:約10,000円
• 3:約100,000円
・2時間後にピーク前の状態に戻す前提、ピークが来ない場合との比較
・m3.mediumのスペック:1コア・メモリ3.7GB
・m3.xlargeのスペック:4コア・メモリ15GB
テレビ番組対策で2時間の間…
EC2(medium)を20台増設、
RDSをスペックアップ(medium→xlarge)
○
×
×
これならいきなりトラフィックが増えても
コスト的にも安心ですね!
©2014, Amazon Web Services, Inc. or its affiliates. All rights reserved.
データ転送も使った分だけの課金
• 回線契約のような固定費用は無し
• AWS(各リージョン)からダウンロードされた
データが課金対象
• アップロードは無料
帯域 時間 ピークを想定した帯域で固定料金 実際のトラフィック 帯域 時間 使った分だけの課金 実際のトラフィック いままで AWS• AWSとは?
• 最初におさえておきたい3つのサービス
• AWSの料金について
• AWSのセキュリティについて
• 最後に
本日の目次
©2014, Amazon Web Services, Inc. or its affiliates. All rights reserved.
クラウドでセキュリティ大丈夫??
⇒ 今でもよく聞かれる質問です
CIAの技術主任が
「クラウドは既存のアプローチよりもセキュアである」と発言
©2014, Amazon Web Services, Inc. or its affiliates. All rights reserved.
セキュアなデータはご自身で暗号化しましょう
AWSはインフラ部分のセキュリティ担当
ファシリティ
物理セキュリティ
コンピュートインフラ
ストレージインフラ
ネットワークインフラ
仮想化レイヤー
OS
アプリケーション
セキュリティグループ
ファイアーウォール
ネットワーク設定
アカウント管理
ユーザ
責任共有モデル
©2014, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWSのセキュリティ方針
• セキュリティはAWSにおける最優先事項
• セキュリティに対する継続的な投資
• セキュリティ専門部隊の設置
• 複数の第三者認証を取得
• セキュリティ関連ホワイトペーパーの公開
•
http://aws.amazon.com/jp/security/
セキュリティ関連の第三者認証
SSAE 16/ISAE 3402基準、SOC1レポート
SOC2レポート、SOC3レポート
ISO 27001 Certification
PCI DSS Level 1
FISMA moderate
Sarbanes-Oxley (SOX)
FedRAMP
DoD (国防総省暫定認定)
©2014, Amazon Web Services, Inc. or its affiliates. All rights reserved.
決済サービスという金融事業を行う上では、PCI DSSへの準拠が必須で
あったように、セキュリティはもっとも重要な要素の一つですが、この点
もAWSであれば解決でき、市場へのサービス投入までの時間 を圧倒的に短
縮することができたことも大きな魅力です
©2014, Amazon Web Services, Inc. or its affiliates. All rights reserved.
• AWSとは?
• 最初におさえておきたい3つのサービス
• AWSの料金について
• AWSのセキュリティについて
• 最後に
本日の目次
本セッションでは3つのサービスしか
ご紹介できませんでしたが、、
©2014, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS Black Belt Tech Webinar
• 毎週
水
曜日 18時~19時 に Webセミナーやってます!
http://aws.typepad.com/sajp/
AWS Black Belt Tech Webinar
©2014, Amazon Web Services, Inc. or its affiliates. All rights reserved.
操作方法説明資料や
サービスごとの詳しい資料あります
http://aws.amazon.com/jp/aws-jp-introduction/
©2014, Amazon Web Services, Inc. or its affiliates. All rights reserved.
例えば検索エンジン
お客様のアプリケーション
認証 AWS IAM モニタリング Amazon CloudWatch Web管理画面 Management Console デプロイと自動化 AWS Elastic Beanstalk AWS Cloud FormationAWS OpsWorks IDEプラグイン Eclipse Visual Studio ライブラリ & SDKs Java, PHP, .NET, Python, Ruby, node.js Development & Administration ネットワーク & ルーティング
Amazon VPC / ELB / Amazon Route 53 /AWS Direct Connect
Infrastructure Service コンピュータ処理 Amazon EC2 Auto Scale ストレージ Amazon S3 Amazon EBS Amazon Glacier AWS StorageGateway データベース Amazon RDS Amazon DynamoDB Amazon ElastiCache Amazon Redshift コンテンツ配信 Amazon CloudFront メッセージ Amazon SNS Amazon SQS Amazon SES 分散処理 Elastic MapReduce 検索エンジン Amazon Cloud Search
トランスコード
Amazon Elastic Transcoder
ワークフロー管理
Amazon SWF
Application Service
• Amazon CloudSearch
– フルマネージドなクラウド型検索エンジン
– 検索ソリューションが容易に導入可能
– 2014年11月現在 34 の言語をサポート
– 豊富な検索機能
• ハイライト表示
• サジェスト(AutoComplete)
• 地理空間検索
©2014, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Automatic Scaling
• ドキュメントのサイズ/数および検索リクエスト数によって自動的にス
ケール
データ量増加に
自動対応
検索アクセス増加に
自動対応
• CloudSearch勉強会の大須賀さん@Yahoo!のスライド
正解は自分達しか知らないので
自分達で辞書のメンテナンスを
©2014, Amazon Web Services, Inc. or its affiliates. All rights reserved.
CloudSearch Updates
• Indexing Bigrams
– Bi-gramでのインデクシング
• Customizing Japanese Tokenization
– 形態素解析辞書のカスタマイズ
導入支援をさせていただいて、よく頂くお言葉。
『マネージドサービスを活用することで、
保守運用にかかっていた時間をサービスの向上や
新機能の開発に使えるようになった』
©2014, Amazon Web Services, Inc. or its affiliates. All rights reserved.
無料でお試し出来ます
https://aws.amazon.com/jp/free/
実際に使うと
わかりやすいです
©2014, Amazon Web Services, Inc. or its affiliates. All rights reserved.
ユーザグループのイベントもたくさん
J
apan
AWS
U
ser
G
roup =
JAWS-UG
日本中で勉強会が
行われています
©2014, Amazon Web Services, Inc. or its affiliates. All rights reserved.
24時間365時間対応の日本語サポートも選べます
ベーシック デベロッパー ビジネス エンタープライズ フォーラム 利用可能 利用可能 利用可能 利用可能 サポートへの コンタクト EC2の 健全性エラーが発生 した場合 コンタクト フォーム 電話、チャット コンタクト フォーム 電話、チャット コンタクト フォーム 初回応答時間 不可 (営業時間内) 12時間 1時間 15分 連絡先登録 - 1 5 無制限 24/365対応 なし なし あり あり Trusted Advisor なし なし あり あり 専任スタッフ 特別サポート なし なし なし あり 料金(月額) 無料 $49 AWS利用総額の $0~$10K: 10% $10K~$80K: 7% $80K~$250K: 5% $250K~: 3% (最低$100) AWS利用総額の10% (最低$15000)©2014, Amazon Web Services, Inc. or its affiliates. All rights reserved.
https://aws.amazon.com/jp/contact-us/aws-sales/
体験ハンズオンも開催中です!
テキスト見ながら
ハンズオン
©2014, Amazon Web Services, Inc. or its affiliates. All rights reserved.
はサーバや
ストレージといったITリソースを
電気・ガス・水道と同じように
必要なときに、必要なだけ
使えるようにしたサービスです
③
AWSは…
⑥
⑥
④
⑤
①
②
これからはじめるに最適!
• 初期費用不要で使った分だけの従量課金(長期契約不要)
• 汎用的な技術で構成
• スケールアウト/スケールアップ/スケールダウンが容易
• 世界中のデータセンタ群を利用出来る
スモールスタートが出来る!
急なサービス成長にも対応出来る!
効率的な利用でコスト削減も可能!
既存の技術知識で、すぐに始められる
グローバル展開も容易
©2014, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Kyushu Startup Night! [17時半~]
★ お飲み物をご用意しています ★
スタートアップならおさえておきたいAWS入門
@STARTUP CAFE[明後日18時~]
http://startupcafeaws.peatix.com/
©2014, Amazon Web Services, Inc. or its affiliates. All rights reserved.