[レベル: 100] aws アンチパターン(初級編) · 塩漬けアンチパターン 原因...
TRANSCRIPT
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS アンチパターン(初級編)
荒木靖宏
アマゾンウェブサービスジャパン
技術統括本部プリンシパルソリューションアーキテクト
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
自己紹介
名前
荒木 靖宏
所属
アマゾンウェブサービスジャパン株式会社
技術統括本部 シニアマネージャー
プリンシパルソリューションアーキテクト
好きなAWSサービス
Amazon Virtual Private Cloud
AWS Direct Connect
EC2 Spot Instances
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
アンチパターンの前に
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS Well-Architected Frameworkとは?
• AWSが、 10年以上に渡って、様々な業種業界、数多くのお客様のアーキテクチャ設計
および検証をお手伝いしてきた経験から作成した、クラウド設計、構築、運用のベスト
プラクティス集
• クラウドでの設計原則とセキュリティ、信頼性、パフォーマンス効率、コストの最適化、
運用性についてのベストプラクティスが質問形式で記載されています
コストの最適化セキュリティ 信頼性 パフォーマンス効率 運用性
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
アンチパターンの紹介
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
アンチパターン
失敗に陥るパターンを類型化し、事例の早期発見と対応策に関しての提案を目的とする
動作やプロセス、構造について、当初は妥当であったのに、最終的に悪い結果が繰り返されるパターン
リファクタリングするための方法が存在するパターン
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
机上の空論アンチパターン塩漬けアンチパターン
ノーコスト最適化アンチパターン
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
机上の空論アンチパターン
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
机上の空論アンチパターン
原因• サーバ発注、システムデプロイ、納品の硬直したループにはまっている
• (最初から)完璧を求めすぎる• カタログスペックやマイクロベンチマークに過度に頼る
症状:利用前に発生する• 動作確認をしない• 事前のキャパシティプランニングに時間をかけすぎる
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
机上の空論アンチパターン
解決法• まずは小さくても試してみること
備考• 塩漬け&ノーコスト最適化と結びつくと最悪の結果に
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS 無料利用枠https://aws.amazon.com/jp/free/
60を超える製品に無料利用枠で実際に試用可能(以下は一例)
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
塩漬けアンチパターン
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
塩漬けアンチパターン
原因• 構築した当初のまま構成の見直しをしない
症状: 利用開始後に比較的短期でも発覚• 実際の利用にくらべてキャパシティの過不足を放置したまま利用することに
• 一時凌ぎで選んだサービスをそのまま使い続けることに
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
塩漬けアンチパターン
解決法• サービスはすくなくとも一定期間後に見直す• サービスは定期的に見直すように決めておく• 新サービスや新機能を定期的に確認して取り入れる
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
オンプレミス vs EC2+ミドルウェア vs マネージドサービス
電源、ネットワーク
ラック導入管理
サーバメンテナンス
OSのパッチ
ミドルウェアのパッチ
バックアップ
スケーラビリティ
可用性
ミドルウェアの導入
OSの導入
アプリからの利用
オンプレミス ミドルウェアon EC2 Amazon RDS等マネージドサービス
お客様がご担当する作業 AWSが提供するマネージド機能
電源、ネットワーク
ラック導入管理
サーバメンテナンス
OSのパッチ
ミドルウェアのパッチ
バックアップ
スケーラビリティ
可用性
ミドルウェアの導入
OSの導入
アプリからの利用
電源、ネットワーク
ラック導入管理
サーバメンテナンス
OSのパッチ
ミドルウェアのパッチ
バックアップ
スケーラビリティ
可用性
ミドルウェアの導入
OSの導入
アプリからの利用
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
オンプレミスのコスト構造
運用・保守費削減
クラウド利用料
ソフトウェア関連パッケージ関連
削減
削減
TCO削減(ROI改善)人的リソース捻出(新業務へのシフト)時間捻出(生産性向上)+俊敏性・弾力性(ユーザーの信頼)
運用・保守費
設備(DC)費用
HW費用
ソフトウェア関連OS/DB
ソフトウェア関連パッケージ関連
IT関連コストに占める運用管理コストは40%~50% 運用・保守費用の大きな低減が期待できる
クラウド化に伴うコスト低減イメージ
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
継続的に新サービス、新機能をリリース• 機能追加はAWSが実施• 基盤への適用、バージョンアップ費用が不要
機能追加/改善
その年にリリースされた機能改善、新機能、サービスの数
48 82160
280
516
722
1017
1430
1,957
2009 2011 2012 2013 2014 2015 2016 2017 2018
# S
erv
ices
an
d f
eatu
res
rele
ase
d
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWSの豊富なサービス群現在、165以上のサービスを提供中
CORE SERVICES
Integrated Networking
Rules Engine
Device Shadows
Device SDKs
Device Gateway
Registry
Local Compute
Custom Model
Training & Hosting
Conversational Chatbots
Virtual Desktops
App Streaming
Schema Conversion
Image & Scene Recognition
Sharing & Collaboration
Exabyte-Scale
Data Migration
Text to Speech
Corporate Email Application Migration
Database Migration
Regions
Availability Zones
Points of Presence
Data Warehousing
Business Intelligence
Elasticsearch
Hadoop/Spark
Data Pipelines
Streaming Data
Collection
ETLStreaming Data
Analysis
Interactive SQL
Queries
Queuing & Notifications
Workflow
Transcoding
Deep Learning(Apache MXNet,
TensorFlow, & others)
Server MigrationCommunications
MARKETPLACE
Business Apps Business Intelligence DevOps Tools Security Networking StorageDatabases
API Gateway
Single Integrated Console
Identity
Sync
Mobile Analytics
Mobile App Testing
Targeted Push Notifications
One-click App Deployment
DevOps Resource Management
Application Lifecycle Management
Containers
Triggers
Resource Templates
Build & Test
Analyze & Debug
Identity Management
Key Management
& Storage
Monitoring & Logs
Configuration Compliance
Web Application Firewall
Assessment
& Reporting
Resource & Usage Auditing
Access Control
Account Grouping
DDOS
Protection
TECHNICAL & BUSINESS SUPPORT
SupportProfessional
ServicesOptimization Guidance
Partner
EcosystemTraining & Certification
Solutions Management Account ManagementSecurity & Billing Reports
Personalized Dashboard
Monitoring
Manage Resources
Data Integration
Integrated Identity & Access
Integrated Resource & Deployment Management
Integrated Devices& Edge Systems
Resource Templates
Configuration Tracking
Server Management
Service Catalogue
Search
MIGRATIONHYBRID ARCHITECTUREENTERPRISE APPSMACHINE LEARNINGIoTMOBILE SERVICESDEV OPSANALYTICS
APP SERVICES
INFRASTRUCTURE SECURITY & COMPLIANCE MANAGEMENT TOOLS
ComputeVMs, Auto-scaling, Load Balancing, Containers,
Virtual Private Servers,
Batch Computing, Cloud
Functions, Elastic GPUs,
Edge Computing
StorageObject, Blocks, File, Archivals, Import/Export, Exabyte-scale
data transfer
CDN
DatabasesRelational, NoSQL, Caching, Migration,
PostgreSQL compatible
NetworkingVPC, DX, DNS
Facial Recognition & Analysis
Facial Search
Patching
Contact Center
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
セキュリティ向上を手助けするサービスその1
AWS Security and Compliance AWSの責任で統制
お客様のセキュリティ向上をサポートするサービス群
Service Type Use cases
APIログの取得AWS環境の操作に関するログの取得
リソース・ログ監視AWSサービスのリソース監視と各種ログの収集・モニタリング
変更管理AWSサービスの変更記録とトラッキング
オンデマンドの評価EC2インスタンス内の導入されるOS・アプリケーションのセキュリティ分析
定期的な評価コスト、パフォーマンス、信頼性、セキュリティの観点からの広範な調査
AmazonInspector
Trusted Advisor
AWSConfig
CloudTrail
CloudWatch
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
セキュリティ向上を手助けするサービスその2
AWS Security and Compliance
Service Type Use cases
認証・認可AWS環境への認証・認可、アクセス権限管理
脅威検知機械学習による脅威リスク、異常検知
ネットワーク防御 L3、L4を標的としたDDoS防御
アプリケーション防御SQL Injection、XSS等の悪意ある攻撃の防御
データ保護機械学習による機密情報の検出、分類、データ漏えいの監視
データ保護データ暗号化に必要な暗号鍵の作成、管理、運用
AWS WAF
AmazonMacie
AWSCloudHMS
AWSShield
AWSIAM
AmazonGuardDuty
AWSの責任で統制
お客様のセキュリティ向上をサポートするサービス群
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
ノーコスト最適化アンチパターン
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
ノーコスト最適化アンチパターン
原因既存構成を変更できないので何もしない
症状:利用開始から長期間経過過剰な要件による利用額の増大過剰なリソース確保による利用額の高止まり
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
ノーコスト最適化アンチパターン
解決法要件の理解割引オプションリソース利用状況確認
備考塩漬けアンチパターンと密接な関係も
構成変更ができればさらなる最適化も
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWSのコスト最適化
マネージドサービスの活用
インスタンス台数/タイプの最適化
スポットインスタンスの活用
運用自動化
ストレージタイプの最適化
リザーブドインスタンス
CloudFrontリザーブドキャパシティ
DynamoDBリザーブドキャパシティ
EBS, Snapshot, EIP等々…
AWS化したアーキテクチャ
割引オプションの活用
細かいリソースの無駄チェック
非常に
大きい
大きい
小さい
変更必要
変更不要
変更不要
効果 構成
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Trusted Advisor(TA)の活用
ご利用実績を元に、自動的にセキュリティリスク指摘、コスト最適化提案をするツール
• ご利用にはAWSサポート(ビジネス、エンタープライズ)が必要
• 使用率の低いEC2, 利用頻度の低いEBS, 関連付けれれていないEIPなどを指摘
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
EC2リソース最適化推奨(2019.7発表)
https://console.aws.amazon.com/billing/ コスト管理スイートのひとつ
AWS Cost Explorer で、カスタム生成した Amazon EC2 リソース最適化推奨をご利用いただけるようになりました。
• EC2リソースの使用実績、CloudWatchメトリクス、リザーブドインスタンス状況などを分析
• Trusted Advisorよりさらに踏み込んで、インスタンス縮小や削除などを推奨する
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
アンチパターンまとめ
アンチパターンはリファクタリング方法が存在する
3つの避けるべきタイミング別のメタアンチパターン• 机上の空論アンチパターン• 塩漬けアンチパターン• ノーコスト最適化アンチパターン
AWS Well-Architected Frameworkが手助けします
Thank you!
© 2019、 Amazon Web Services、 Inc. or its affiliates. All rights reserved.
Event info - https://amzn.to/JPEvents
Webinar - https://amzn.to/JPWebinar
Archive - https://amzn.to/JPArchive