ちょっと話題の記事

AWSベストプラクティスをハンズオンラボで学ぼう

AWSベストプラクティスに沿ってハンズオンを行いスキルを身に付ける方法を紹介します。
2020.07.10

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

こんにちは。
ご機嫌いかがでしょうか。
"No human labor is no human error" が大好きな吉井 亮です。

AWS ベストプラクティス集、ソリューションアーキテクトのバイブルともいえる Well-Architected フレームワーク ホワイトペーパーが更新されました。
AWS をより良く効果的に利用するための方法が記述されていますので、是非一度ご覧になってみてください。

本エントリでは更新されたフレームワークに沿って、ハンズオンをしながら AWS を勉強するサイトを紹介します。

まずホワイトペーパーの何が更新されたか

ホワイトペーパーは 質問と回答 という形式で実践方法が記述されています。
今回の更新では、より具体的な実践方法が記述されるようになりました。

セキュリティの柱 質問2「How do you manage identities for people and machines?」を例にとって比較してみます。

前のバージョン

Control human access by implementing controls inline with defined business requirements to
reduce risk and lower the impact of unauthorized access. This applies to privileged users and
administrators of your AWS account, and also applies to end users of your application

Best practices:
• Define human access requirements: Clearly define access requirements for users based on
job function to reduce the risks from unnecessary privileges.

• Grant least privileges: Grant users only the minimum privileges you have defined to
reduce the risk of unauthorized access.

• Allocate unique credentials for each individual: Credentials are not shared between any
users to help segregation of users and traceability.

• Manage credentials based on user lifecycles: Integrate access management with user
lifecycle. For example, decommission a user to revoke unused and unnecessary credentials
when a user leaves or changes roles.

• Automate credential management: Automate credential management to enforce
minimum privileges and disable unused credentials. Automate auditing, reporting, and
management of the lifecycle of users.

• Grant access through roles or federation: Use IAM roles instead of IAM users or static
access keys to allow for secure cross-account access and federated users.

最新

There are two types of identities you need to manage when approaching operating secure
AWS workloads. Understanding the type of identity you need to manage and grant access
helps you ensure the right identities have access to the right resources under the right conditions.
Human Identities: Your administrators, developers, operators, and end users require
an identity to access your AWS environments and applications. These are members of your
organization, or external users with whom you collaborate, and who interact with your AWS
resources via a web browser, client application, or interactive command-line tools. Machine
Identities: Your service applications, operational tools, and workloads require an identity to
make requests to AWS services - for example, to read data. These identities include machines
running in your AWS environment such as Amazon EC2 instances or AWS Lambda functions.
You may also manage machine identities for external parties who need access. Additionally,
you may also have machines outside of AWS that need access to your AWS environment.

Best Practices:
• Use strong sign-in mechanisms: Enforce minimum password length, and educate users to
avoid common or re-used passwords. Enforce multi-factor authentication (MFA) with software
or hardware mechanisms to provide an additional layer.

• Use temporary credentials: Require identities to dynamically acquire temporary credentials.
For workforce identities, use AWS Single Sign-On, or federation with IAM roles to access
AWS accounts. For machine identities, require the use of IAM roles instead of long
term access keys.

• Store and use secrets securely: For workforce and machine identities that require secrets
such as passwords to third party applications, store them with automatic rotation using
the latest industry standards in a specialized service.

• Rely on a centralized identity provider: For workforce identities, rely on an identity
provider that enables you to manage identities in a centralized place. This enables you to
create, manage, and revoke access from a single location making it easier to manage access.
This reduces the requirement for multiple credentials and provides an opportunity to
integrate with HR processes.

• Audit and rotate credentials periodically: When you cannot rely on temporary credentials
and require long term credentials, audit credentials to ensure that the defined controls (for
example, MFA) are enforced, rotated regularly, and have appropriate access level.

• Leverage user groups and attributes: Place users with common security requirements
in groups defined by your identity provider, and put mechanisms in place to ensure that
user attributes that may be used for access control (e.g., department or location) are correct
and updated. Use these groups and attributes, rather than individual users, to control
access. This allows you to manage access centrally by changing a user’s group membership
or attributes once, rather than updating many individual policies when a user’s access
needs change.

パスワード長、MFA、SSO などの提示があり、より具体的な記述になっているのが確認できます。
「概念は理解したけど具体的に何をしていいか分からない」といった悩みは減ると思います。

その他変更箇所は以下のエントリが参考になります。

実践してみる

システムの設計を担当される方、社内ポリシーを策定される方、環境を構築される方、様々な役割の方々が Well-Architected フレームワークを参照すると思います。
ドキュメントを読んだだけでは100%理解することは難しいかもしれません。
100%理解をするためには実際に手を動かして実装してみることが近道です。

AWS では Well-Architected なハンズオンを用意しています。
AWS Well-Architected Labs

習熟度に合わせて複数のハンズオンが用意されているので、これから AWS を勉強する方はもちろん、基礎を学んで応用を身に付けたい方もご利用頂けると思います。
手順も細かく記載されています。お試しください。

ハンズオンの内容を見てみます。

運用の優秀性

Systems Manager を使ったインベントリとパッチ管理です。
レベル100になっていますが、内容的には 200、300 でもおかしくない内容です。

  • 100 Labs
    • 100 - Inventory and Patch Management

セキュリティ

ここを見る方が一番多いのではないでしょうか。
ハンズオンの数も一番多いです。
個人的には AWS を利用する全ての方に 100 Labs の IAM、Security Hub は実践して欲しい内容です。

AWS のセキュリティ基礎となる部分、Web アプリケーションのセキュリティなど充実した内容になっていると思います。
一通りハンズオンを実施すると良い勉強になりそうです。

  • 100 Labs
    • Level 100: AWS Account and Root User
    • Level 100: Basic Identity and Access Management User, Group, Role
    • Level 100: CloudFront with S3 Bucket Origin
    • Level 100: Enable Security Hub
    • Level 100: Create a Data Bunker Account
  • 200 Labs
    • Level 200: Automated Deployment of Detective Controls
    • Level 200: Automated Deployment of EC2 Web Application
    • Level 200: Automated Deployment of IAM Groups and Roles
    • Level 200: Automated Deployment of VPC
    • Level 200: Automated Deployment of Web Application Firewall
    • Level 200: Automated IAM User Cleanup
    • Level 200: Basic EC2 Web Application Firewall Protection
    • Level 200: AWS Certificate Manager Request Public Certificate
    • Level 200: CloudFront for Web Application
    • Level 200: CloudFront with WAF Protection
  • 300 Labs
    • Level 300: IAM Permission Boundaries Delegating Role Creation
    • Level 300: IAM Tag Based Access Control for EC2
    • Level 300: Incident Response Playbook with Jupyter - AWS IAM
    • Level 300: Incident Response with AWS Console and CLI
    • Level 300: Lambda Cross Account Using Bucket Policy
    • Level 300: Lambda Cross Account IAM Role Assumption
  • Quests
    • Quest: Loft - Introduction to Security
    • Quest: Quick Steps to Security Success
    • Quest: AWS Incident Response Day
    • Quest: AWS Security Best Practices Workshop
    • Quest: AWS Security Best Practices Day
    • Quest: Managing Credentials & Authentication
    • Quest: Control Human Access
    • Quest: Control Programmatic Access
    • Quest: Detect & Investigate Events
    • Quest: Defend Against New Threats
    • Quest: Protect Networks
    • Quest: Protect Compute
    • Quest: Classify Data
    • Quest: Protect Data at Rest
    • Quest: Protect Data in Transit
    • Quest: Incident Response

信頼性

レベル 300 が 300 らしい内容です。
疑似障害を挙動を確認してみたりしています。これは試してみたい。

基本的なことですが、忘れがちなバックアップ&リストアのハンズオンもあります。
お試しください。

  • 100 Labs
    • Level 100: Deploy a Reliable Multi-tier Infrastructure using CloudFormation
  • 200 Labs
    • Level 200: Implementing Bi-Directional Cross-Region Replication (CRR) for Amazon Simple Storage Service (Amazon S3)
    • Level 200: Deploy and Update CloudFormation
    • Level 200: Testing Backup and Restore of Data
    • Level 200: Testing for Resiliency of EC2 instances
  • 300 Labs
    • Level 300: Implementing Health Checks and Managing Dependencies to improve Reliability
    • Level 300: Testing for Resiliency of EC2, RDS, and AZ

パフォーマンス効率

CloudWatch ダッシュボードの作り方が分かります。
仮想サーバーの状態をグラフィカルは把握することに役立ちます。

もう一方は、Nitro 世代と前世代の EC2 インスタンスでパフォーマンス比較、及び、前世代のパフォーマンス改善をしています。

  • 100 Labs
    • Level 100: Monitoring with CloudWatch Dashboards
    • Level 100: Calculating differences in Linux clock source changes to application performance

コスト最適化

AWS への支払いを担当しているエンジニアは必見ではないでしょうか。
利用料金の把握方法、検索方法、予算によるガバナンス、料金モデルの選択、EC2 最適なサイズの決定など、通常私がお客様に対していることが網羅されています。
コスト最適化を勉強したい方におすすめです。

  • 100 Labs
    • Level 100: AWS Account Setup: Lab Guide
    • Level 100: Cost and Usage Governance
    • Level 100: Pricing Models
    • Level 100: Cost and Usage Analysis
    • Level 100: Cost Visualization
    • Level 100: EC2 Right Sizing
  • 200 Labs
    • Level 200: Cost and Usage Governance
    • Level 200: Pricing Models
    • Level 200: Cost and Usage Analysis
    • Level 200: Cost Visualization
    • Level 200: EC2 Right Sizing
    • Level 200: Pricing Model Analysis
    • Level 200: Workload Efficiency
  • 300 Labs
    • Level 300: Automated Athena CUR Query and E-mail Delivery
    • Level 300: Automated CUR Updates and Ingestion
    • Level 300: Splitting the CUR and Sharing Access

まとめ

自組織で AWS を採用することが決まったとしても、要員の教育は簡単には成し遂げられません。
AWS ベストプラクティスに沿って実際に手を動かしながら勉強できる教材があるのは大きな助けになります。
また、独学でスキルを身に付けたい場合にも満足できるサイトだと思います。

AWS の宣伝っぽくなってしまいましたが、とにかくハンズオンは有効な勉強方法です。お試しください。

参考

AWS Well-Architected Labs
Well-Architected Framework PDF
Operational Excellence PDF
Security PDF
Reliability PDF
Performance Efficiency PDF
Cost Optimization PDF
【資料公開】2020年1月29日 クラスメソッド主催セミナーでWell-Architecedフレームワークについて話しました
[アップデート] AWS Well-Architected フレームワークおよび AWS Well-Architected ツールが更新されたので、どこが変わったのかを調べてみた

以上、吉井 亮 がお届けしました。