ladderlore
请求新指南
  • 输入服务名称,例如 S3 或 IAM。

概念 · 基于 CLF-C02

Least privilege in practice

Start with enough access to work, then tighten with real activity and IAM Access Analyzer.

本课尚未翻译,暂以英文显示。

你在云从业者中已学过

  • Grant only the permissions a task needs, and nothing more.
  • Last accessed information shows which services an identity really uses.
  • IAM Access Analyzer can generate a policy from past activity.
阅读云从业者课程
Broad starter policy
CloudTrail
IAM Access Analyzer
Tight policy
  1. 1The workload runs with a broad starter policy.
  2. 2CloudTrail records every call the role makes.
  3. 3Access Analyzer turns that activity into a policy that you attach in place of the broad one.
Tighten a policy with real activity.

分步说明

  1. 1The workload runs with a broad starter policy.
  2. 2CloudTrail records every call the role makes.
  3. 3Access Analyzer turns that activity into a policy that you attach in place of the broad one.

Tighten a policy with real activity.

  • External access

    Who outside my account can reach this resource?
  • Unused access

    Which roles and permissions are never used?
  • Policy validation

    Is this policy valid and safe?
  • Policy generation

    What did this role really call?
Four jobs of IAM Access Analyzer.

是什么

Perfect least privilege on day one is hard, because you do not yet know what the workload calls. A practical path is to start with a broader policy in a test account, let the workload run, and then replace the policy with one that matches what it used.

IAM Access Analyzer supports this. It reads AWS CloudTrail activity and generates a policy for a role. It also reports findings for resources that outside principals can reach, such as an S3 bucket shared with another account. Policy validation checks a draft against the policy grammar and best practices.

是什么

Customer managed policies are reusable, versioned and easy to audit. Inline policies belong to one identity and suit a strict one-to-one link. AWS managed policies are a start, not an end.

要记住

  • External access findings show resources open to principals outside your account or organization.
  • Policy generation builds a policy from CloudTrail activity.
  • Policy validation catches mistakes before you attach a policy.
  • Unused access findings show roles, users and permissions nobody uses.

要记住

  • Last accessed data shows the services and actions an identity used.
  • Prefer customer managed policies for reuse. Use inline policies only for a strict one-to-one link.

考试中

  • “Find S3 buckets shared with outside accounts” points to IAM Access Analyzer.
  • “Replace a broad policy with one that matches what the role really used” points to Access Analyzer policy generation.
  • “Remove permissions that nobody uses” points to last accessed data or unused access findings.