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

概念 · 基于 CLF-C02

Users, groups and roles: authorization model

Pick the identity by who needs access, and cap what administrators can hand out.

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

你在云从业者中已学过

  • An IAM user is one person or application with long-term credentials.
  • A group gives the same policies to many users. Groups cannot be nested.
  • A role has no password or keys. It hands out temporary credentials.
  • AWS recommends roles and federation for people and applications.
阅读云从业者课程
  • An employee, many accounts

  • An application on EC2

    Role with an instance profile
  • A Lambda function

    Execution role
  • A person in another AWS account

    Cross-account role
  • A customer of your app

  • A tool that cannot use roles

    IAM user with MFA
Choose the identity type from the person or workload.

1 / 2

  • An employee, many accounts

  • An application on EC2

    Role with an instance profile
  • A Lambda function

    Execution role
  • A person in another AWS account

    Cross-account role

2 / 2

  • A customer of your app

  • A tool that cannot use roles

    IAM user with MFA
Choose the identity type from the person or workload.
  • S3 and EC2

    Boundary allows
    S3 only
    Result
    S3 only
  • S3

    Boundary allows
    EC2 only
    Result
    Nothing
  • Nothing

    Boundary allows
    Everything
    Result
    Nothing
The effective permissions are the overlap of the identity policy and the boundary.

是什么

Roles cover three jobs. A service role lets a service act for you, such as a Lambda execution role. An instance profile is the container that passes a role to an EC2 instance. A cross-account role lets a trusted principal from another account in. In all three, no one stores a key.

A permissions boundary is a managed policy set as the maximum for a user or role. The identity gets only what its own policies and the boundary both allow. A boundary never grants anything. Use it to let developers create roles without letting them create more power than they have.

是什么

Role-based access control (RBAC) writes one policy per job. Attribute-based access control (ABAC) compares tags on the person with tags on the resource, such as project. With ABAC, new projects need no new policies.

要记住

  • No users at all for the workforce: use IAM Identity Center or federation.
  • Keep IAM users only for tools that cannot use roles and for break-glass access.
  • An instance profile connects an IAM role to an EC2 instance.
  • A permissions boundary limits, it does not grant.

要记住

  • ABAC: match aws:PrincipalTag with the resource tag. It scales with fewer policies.
  • A group holds IAM users in one account. A permission set creates roles across many accounts.

考试中

  • “An application on EC2 needs to read S3 without stored keys” points to an IAM role through an instance profile.
  • “Developers may create roles but never exceed their own permissions” points to a permissions boundary.
  • “Reduce the number of policies as projects grow” points to ABAC with tags.