INFRASTRUCTURE LEARNINGINFRASTRUCTURE LEARNING
インフラ大全インフラ大全IT INFRASTRUCTURE / LEARNING
Infrastructure learning guide
Find a lesson or lab/

Esc to close · Search terms stay on your device

LEARNING日本語

Core lesson 8 of 18Topic: IAM: identity and permissions

What is AWS IAM? Authentication and permissions for beginners

AWS Identity and Access Management (IAM) controls access to AWS resources. Authentication establishes who is making a request; authorization decides whether that request is permitted. Follow an internal reporting app to understand why signing in does not automatically give permission to read a file.

What you will learn

Describe a request using its principal, action and resource. Distinguish successful authentication from permission to act, and separate human access from application access.

Prerequisite

No AWS account or keys are needed. Imagine an internal app reading a monthly report.

Start with who, what and which resource

A principal is the identity making a request. An action is the requested API operation, and a resource is its target. “Use S3” is too broad to analyze. Our example fixes one request: an app using its reporting role calls s3:GetObject for report.csv.

Compare one request with its applicable permissions
Compare one request with its applicable permissions1: Reporting role — Makes the request using this identity — GetObject / report.csv. 2: GetObject / report.csv — Check action, resource and relevant context — Applicable permissions12Reporting roleGetObject /report.csvApplicablepermissionsCompare one request with its applicable permissions1: Reporting role — Makes the request using this identity — GetObject / report.csv. 2: GetObject / report.csv — Check action, resource and relevant context — Applicable permissions12Reporting roleGetObject /report.csvApplicablepermissions
  1. Reporting role → GetObject / report.csvMakes the request using this identity
  2. GetObject / report.csv → Applicable permissionsCheck action, resource and relevant context
Reporting role
The identity used by the app, considered separately from an employee signing in.
GetObject / report.csv
The read operation and target file form one specific request.
Applicable permissions
Compare applicable policies with request context. This is not the full AWS evaluation algorithm.
Make the request concrete
ElementOur exampleDo not confuse it with
PrincipalThe app using its reporting roleThe name of the person operating a screen is not enough
Actions3:GetObject: retrieve an objects3:PutObject is a different operation
Resourcereport.csv in demo-bucketOther objects in the same bucket

Authentication is not permission to perform every action

A checked employee badge does not unlock every storage room. In AWS, establishing an identity and authorizing a particular operation are separate questions. Reaching the console does not establish permission to retrieve, modify or delete a report.

Authorization also depends on the applicable policies and context. Finding one Allow is not the same as establishing effective permission. An applicable explicit Deny or a permissions limit can change the outcome.

Choose an option to see the result and explanation.

You can sign in to the console. Does this alone establish permission to retrieve report.csv?
Read the answer and reason

Answer: No · Successful authentication establishes an identity. You still need to examine permissions applicable to GetObject and the target object.

Separate access for people and applications

An IAM role is an identity that can be assumed to obtain temporary credentials. A role is not automatically safe: who may assume it and what its permissions allow are distinct design questions.

Choose access according to the actor
ActorStart by consideringAvoid as a default
PeopleFederation or IAM Identity Center with temporary accessUsing root for everyday work
Apps running on services such as EC2An appropriate IAM role with the required permissionsEmbedding long-lived access keys in code
The account root userStrong protection for tasks that actually require rootSharing root credentials with apps or coworkers

Three distinctions that prevent mistakes

Do not infer permissions from names or screens
ObservationWhat it does and does not establish
A role named “administrator”The name is descriptive; inspect its actual permissions
One Allow existsThis does not establish the outcome of all applicable controls
A network path is reachableConnectivity and permission to perform an AWS API operation are separate questions

Apply the request to a policy statement

  1. Write the principal, action and resource on one line.
  2. Change “read” to “save” and identify the action that changes.
  3. Read Effect, Action and Resource in the JSON lesson, then change one condition at a time in the IAM lab.

Check, then explain in your own words

  1. Describe the principal, action and resource in the report example.
  2. Explain why sign-in and GetObject permission are separate.
  3. Continue to the IAM policy JSON lesson.
Check your understanding: Must you check again if the same role requests a different file?

Yes. The resource in the request has changed.

The principal may be unchanged, but action, resource and conditions must match the new request. One successful read does not establish access to every object.

Sources and conditions checked

The official references used in this lesson are collected here with their scope, conditions and corresponding sections. Independent expert review and live AWS comparison have not been performed.