[新機能紹介]AWS Well-Architected Toolでサーバレスアプリケーションの評価ができるようになりました

2020.02.12

この記事は公開されてから1年以上経過しています。情報が古い可能性がありますので、ご注意ください。

本日、AWS Well-Architected Toolでサーバーレスアプリケーションの評価ができるように機能が追加されました。

New – Serverless Lens in AWS Well-Architected Tool

ワークロード固有のアドバイスを提供するためにWell-Architected FrameworkにLensという概念で拡張されたのが2017年です。

AWS Well-Architected Toolを使ってクラウド上のアーキテクチャを設計および評価している方は多いと思います。

今回は サーバレスアプリケーションが Serverless Applications Lens に適用できるように AWS Well-Architected Toolに追加されました。

確認してみる

AWS Well-Architected Toolのワークロードの定義を行うページにいきます

※ リージョンは東京とします

ワークロードのプロパティを定義したら適用するLensを選択できます。

AWS Well-Architected Framework はデフォで選択されていますが、今回追加された Serverless Lens も選択できるようになっていますね。

レビューを開始すると5つの柱をベースとした質問が用意されていますね。

質問の内容をみていきましょう。

運用上の優秀性

OPS 1. How do you evaluate your Serverless application’s health?

サーバレスアプリケーションの評価をどのように行なっているかどうかを問われています。

  • Understand, analyze, and alert on metrics provided out of the box
  • Use distributed tracing and code is instrumented with additional context
  • Use structured and centralized logging
  • Use application, business, and operations metrics
  • None of these

なお、質問の内容を理解しやすいように右側に説明がされています。

OPS 2. How do you approach application lifecycle management?

アプリケーションのライフサイクルでどのようなアプローチを使っているか問われています。

ライフサイクル管理アプローチを採用して、より高い忠実度、品質に関する迅速なフィードバック、迅速なバグ修正により、本番環境への変更の流れを改善します。これらのプラクティスは、カスタマーエクスペリエンスに影響を与える変更を迅速に特定、修正、および制限するのに役立ちます。

  • Use infrastructure as code and stages isolated in separate environments
  • Prototype new features using temporary environments
  • Use a rollout deployment mechanism
  • Use configuration management
  • Review the function runtime deprecation policy
  • Use CI/CD including automated testing across separate accounts
  • None of these

セキュリティ

SEC 1. How do you control access to your Serverless API?

サーバーレスAPIに対するアクセス制御をどのように行なっているか問われています。

認証および承認メカニズムを使用して、不正アクセスを防止し、パブリックリソースの割り当てを強制します。

  • Use appropriate endpoint type and mechanisms to secure access to your API
  • Use authentication and authorization mechanisms
  • Scope access based on identity’s metadata
  • None of these

SEC 2. How do you manage your Serverless application’s security boundaries?

セキュリティ境界の管理について問われています

サーバーレスアプリケーションの境界を定義して保護することにより、コンポーネントの分離、内部、およびコンポーネント間の分離が保証されます

  • Evaluate and define resource policies
  • Use temporary credentials between resources and components
  • Control network traffic at all layers
  • Design smaller, single purpose functions
  • None of these

SEC 3. How do you implement application Security in your workload?

ワークロードにアプリケーションセキュリティをどのように実装するのか問われています

アプリケーションコードレベルでセキュリティプラクティスをレビューおよび自動化し、開発ワークフローの一部としてセキュリティコードレビューを実施します。これらのベストプラクティスは、新たなセキュリティの脅威から保護し、悪意のあるコード(サードパーティの依存関係を含む)からの攻撃対象を減らします。

  • Review security awareness documents frequently
  • Store secrets that are used in your code securely
  • Implement runtime protection to help prevent against malicious code execution
  • Automatically review workload’s code dependencies/libraries
  • Validate inbound events
  • None of these

信頼性

REL 1. How do you regulate inbound request rates?

リクエストレート(インバウンド)の制御について問われています

インバウンドリクエストレートを定義、分析、および実施すると、スループットの向上に役立ちます。規制は、顧客の需要に基づいてさまざまなスケーリングメカニズムを適応させるのに役立ちます。

  • Use throttling to control inbound request rates
  • Use, analyze, and enforce API quotas
  • Use mechanisms to protect non-scalable resources
  • None of these

REL 2. How do you build resiliency into your Serverless application?

アプリケーションの回復力を組み込むにはどうしているか問われています

サーバーレスリソースと非サーバーレスリソースのスケーリングメカニズムを評価して、顧客の需要に対応し、回復力を構築して、依存関係全体にわたる部分的および断続的な障害に耐えます

  • Manage transaction, partial, and intermittent failures
  • Manage duplicate and unwanted events
  • Orchestrate long-running transactions
  • Consider scaling patterns at burst rates
  • None of these

パフォーマンス効率

PERF 1. How do you optimize your Serverless application’s performance?

パフォーマンスをどのように最適化しているか問われています

アクセスパターン、スケーリングメカニズム、およびネイティブ統合に基づいてサーバーレスアプリケーションのパフォーマンスを評価および最適化することにより、トランザクションごとに継続的に価値を高めることができます。

  • Measure, evaluate, and select optimum capacity units
  • Measure and optimize function startup time
  • Take advantage of concurrency via async and stream-based function invocations
  • Optimize access patterns and apply caching where applicable
  • Integrate with managed services directly over functions when possible

コスト最適化

COST 1. How do you optimize your Serverless application’s costs?

コストをどのように最適化しているか問われています

アプリケーションを設計、実装、最適化して、価値を最大化します。非同期設計パターンとパフォーマンスプラクティスにより、リソースの効率的な使用が保証され、ビジネストランザクションごとの価値に直接影響します。

  • Minimize external calls and function code initialization
  • Optimize logging output and its retention
  • Optimize function configuration to reduce cost
  • Use cost-aware usage patterns in code
  • None of these

~~~~~

以上の質問に答えていくとレポートが表示されます。

改善計画のタブをクリックすると、リスクに対してどのように改善していけばいいかが表示されます。

レポートの内容をPDFで出力することも可能です。

このServerless Lensを使うことにより、 既存のワークロードがベストプラクティスとどれだけ違うのか、新しいワークロードに適用して設計していくことの手助けにもなります。 可視化もできるので関係者と共有するのも簡単です。

新しいワークロードの場合だと、設計の段階、実装の段階、本番反映前など複数回に分けてツールを使用して評価することによりサーバレスアプリケーションの状況を確認していくことも重要かと思います(AWS Well-Architected Toolでマイルストーンを設定できます)。

また、必ずベストプラクティスに沿わなければいけないかというと、ワークロードによってはそうではない場合もあるかと思いますが、 ベストプラクティスが何なのかを知ることもでき、今後の改善計画も立てやすくなっていくので一度お使いになることをお勧めします。

※ このツールを使用するための料金は無料となっています

参考