ladderlore
Request a guide
  • Type a service name, like S3 or IAM.

Concept

Principle of least privilege

Give every user, role and application only the permissions it needs for its task, and nothing more.

No access at the start
Grant only what is needed
Check what is really used
Remove what is not used
repeat
  1. 1A new identity starts with no permissions. Add only what its task needs.
  2. 2After some time, look at which permissions were really used.
  3. 3Remove the permissions, keys and identities that nobody uses.
Least privilege is a loop, not a one-time setup.

Step by step

  1. 1A new identity starts with no permissions. Add only what its task needs.
  2. 2After some time, look at which permissions were really used.
  3. 3Remove the permissions, keys and identities that nobody uses.

Least privilege is a loop, not a one-time setup.

  • A reporting app reads sales files

    Too much access
    Full access to every S3 bucket
    Least privilege
    Read access to the sales bucket only
  • A finance analyst checks monthly costs

    Too much access
    Administrator access
    Least privilege
    Read-only access to billing information
  • A developer tests new code

    Too much access
    Administrator in every account
    Least privilege
    Permissions in the test account only
  • An employee leaves the company

    Too much access
    Their password and access keys still work
    Least privilege
    Their access is removed on their last day
Four everyday examples.

1 / 2

  • A reporting app reads sales files

    Too much access
    Full access to every S3 bucket
    Least privilege
    Read access to the sales bucket only
  • A finance analyst checks monthly costs

    Too much access
    Administrator access
    Least privilege
    Read-only access to billing information

2 / 2

  • A developer tests new code

    Too much access
    Administrator in every account
    Least privilege
    Permissions in the test account only
  • An employee leaves the company

    Too much access
    Their password and access keys still work
    Least privilege
    Their access is removed on their last day
Four everyday examples.

What it is

Least privilege means granting only the permissions needed to do a task. If a reporting application only reads one Amazon S3 bucket, its role should be able to read that bucket and nothing else. Then a stolen credential or a simple mistake can do much less damage.

You apply it with IAM groups, roles and policies. Start with no access, add what the task needs, and check again over time. AWS managed policies are a quick way to start, but they are written for every customer, so move to customer managed policies once you know what the task needs.

What it is

IAM helps you find what to remove. Last accessed information shows when an identity last used each service it is allowed to use. IAM Access Analyzer can generate a policy from the actions that a role has used.

Remember

  • Grant the minimum first. Add more only when it is needed.
  • Give permissions through groups and roles, not to each user one by one.
  • Remove unused users, roles, access keys and permissions regularly.
  • Use policy conditions to narrow access further, for example to require MFA.

Remember

  • Least privilege is a key practice in the security pillar of the Well-Architected Framework.

On the exam

  • “Grant only the permissions required to perform a task” is the principle of least privilege.
  • “An application must read one S3 bucket”: allow read access to that bucket only, not full access to Amazon S3.