The mental model
A principal makes a request. IAM evaluates the request against applicable policies, including explicit denies. A role has a trust policy describing who may assume it, and permissions describing what an assumed session may do. Granting a role permission does not automatically let every person or service assume it.
Prefer temporary credentials for people and workloads. A function that writes one table should not receive administrator access or credentials embedded in source code. Start with the actions and resources required by a specific workflow, then inspect failures and add only the permissions that the workflow actually needs.
Decisions to make
- Use a workload role for service access rather than embedding long-lived access keys.
- Review both the role trust policy and the permissions policy when diagnosing access.
Design exercise · no AWS resources needed
Work through a scenario
A Lambda function only needs to read one configuration object from S3.
- Name the caller, action, and exact object resource.
- Describe a role permission limited to that read operation.
- Explain why the browser should never receive the function’s credentials.
Check your understanding
What belongs in a role trust policy?
Choose an answer to see the reasoning.
Continue with AWS documentation
Before following a deployment guide, review current pricing, permissions, and cleanup steps. Budget alerts are not a hard spending cap.