IAM & Access Control
AWS SAA SAA-C03 · Design Secure Architectures
What IAM is for
AWS Identity and Access Management (IAM) controls who can do what in an AWS account. Every request to AWS — whether it comes from a person in the console, an application on an EC2 instance, or another AWS service — is authenticated and then authorized by IAM. If the request has no permission that allows it, it is denied. That default-deny behavior is the foundation of AWS security, and the exam tests it constantly: the correct answer is usually the option that grants the smallest permission that still gets the job done.
IAM is a global service, not a Regional one. Users, groups, roles, and policies exist at the account level and apply across all Regions. There is no charge for IAM itself. A few IAM concepts appear in almost every exam question about security, so it pays to learn them precisely rather than approximately.
Identities: users, groups, and roles
An IAM user is a long-term identity for a person or an application. A user signs in with a password (console access) or uses access keys (programmatic access through the CLI, SDKs, or API). Access keys are long-lived credentials: they keep working until they are rotated or deactivated, which is why the exam treats hard-coding them into application code as a mistake. A group is a collection of users; you attach policies to the group and every member inherits them. Groups make permission management scalable — when someone joins the database team, you add them to the group instead of editing their individual permissions.
An IAM role is an identity with permissions but no long-term credentials of its own. Something assumes a role — a user, an application, an AWS service, or an identity from another account — and receives temporary security credentials that expire. This is the single most important IAM idea for the exam: roles, not users with access keys, are how applications and services should get permissions. An EC2 instance that needs to read from S3 gets an instance role (an instance profile); a Lambda function gets an execution role; a developer in another account gets a cross-account role. Temporary credentials from the Security Token Service (STS) limit the damage if credentials leak, because they stop working within hours.
Policies: how permissions are written
A policy is a JSON document that states which actions are allowed or denied on which resources, optionally under conditions. Identity-based policies attach to users, groups, or roles. Resource-based policies attach to the resource itself — an S3 bucket policy or a KMS key policy, for example — and are the only way to grant access to a principal in another account without that account creating a role. Inline policies live inside one identity; AWS managed policies are maintained by AWS and cover common job functions (such as ReadOnlyAccess or AmazonS3FullAccess); customer managed policies are ones you write yourself and can reuse.
Policy evaluation follows a strict order that the exam loves to test. Every request starts as an implicit deny. If any applicable policy allows the action, the request is allowed — unless any applicable policy contains an explicit deny, which overrides every allow. Conditions refine policies further: a policy can require that requests come from a specific source IP, use HTTPS, or include multi-factor authentication (MFA). The condition key aws:MultiFactorAuthPresent is the standard way to require MFA before sensitive actions are permitted.
Least privilege is the design principle behind all of this: grant only the permissions a task actually needs, for only as long as it needs them. AWS supports this with tools like IAM Access Analyzer, which examines access activity and suggests policies scoped to what is actually used, and with permission boundaries, which set a maximum permission ceiling for an identity even if other policies grant more. Service control policies (SCPs) from AWS Organizations work at a higher level still: they limit what is possible in an entire account, regardless of what IAM policies inside that account allow. Note that SCPs do not grant permissions — they can only restrict them.
Protecting the root user and human access
Every AWS account has a root user with unrestricted access to everything, including billing and account settings that IAM cannot control. The exam expects you to know that the root user should be locked down: enable MFA on it, delete its access keys, use it only for the handful of tasks that require it (such as changing the support plan or closing the account), and never use it for daily work. For everyday human access, the modern answer is IAM Identity Center (the successor to AWS SSO), which gives workforce users single sign-on across accounts, ideally federated from an existing corporate identity provider. Creating one IAM user per employee in every account is the old pattern and is hard to manage at scale.
For applications and external identities, the pattern is the same idea: avoid long-term credentials. Web and mobile applications authenticate users through Amazon Cognito, which hands out temporary AWS credentials for authenticated (or guest) users. Workloads running outside AWS can use IAM Roles Anywhere or OIDC federation instead of storing access keys. And whenever you need to know who has access to what, IAM provides credential reports, access advisor data showing when a permission was last used, and Access Analyzer findings that flag resources shared outside the account.
Exam mindset for IAM
IAM questions usually describe a requirement and ask for the most secure or least-privilege way to meet it. The answer is almost never “create an IAM user with AdministratorAccess and share the keys.” Look for the option that uses a role, a managed policy scoped to the job, a condition, or federation. When two options both work, the one with narrower permissions or shorter-lived credentials is usually the better design. And when a question involves another account, remember the two halves of cross-account access: the trusting account's role must have a trust policy naming the other account, and the trusted account's identity must have permission to assume the role.
Permission boundaries, SCPs, and keeping access tidy over time
As an account grows, two more IAM mechanisms help keep permissions under control. A permissions boundary is a managed policy that sets the maximum permissions an identity can have: even if other policies grant more, the boundary caps what is actually allowed. Boundaries are commonly used to let teams create their own roles safely — a developer can build a role for a new application, but the boundary prevents them from granting it administrator access. Service control policies (SCPs) from AWS Organizations work one level higher: they limit what is possible in an entire account or organizational unit, regardless of what IAM policies inside that account allow. An SCP can, for example, prevent anyone in a member account from disabling CloudTrail or from launching resources in unapproved Regions. Remember the key rule: SCPs and boundaries can only restrict permissions, never grant them.
Access also needs maintenance. The IAM credential report shows the state of every user and credential in the account — password age, access key age, MFA status — and is the first thing to check in an audit. IAM Access Analyzer goes further: it examines actual access activity and identifies unused permissions, suggests least-privilege policies based on what was really used, and flags resources shared outside the account. Access keys should be rotated regularly, and unused users and roles removed. The exam rewards designs where access is granted through groups and roles, reviewed periodically, and removed promptly when no longer needed.
Exam traps to watch for
- Putting access keys on an EC2 instance or in application code instead of using an IAM role. Roles with temporary credentials are almost always the correct answer.
- Confusing an explicit deny with an implicit deny: an explicit deny in ANY applicable policy overrides allows everywhere, including AdministratorAccess.
- Using IAM users for workforce sign-in at scale instead of IAM Identity Center with federation — and forgetting that the root user needs MFA and no access keys.
- Forgetting that SCPs only restrict permissions; they never grant them. An SCP cannot give an account a permission that no IAM policy allows.
Practice questions
Test yourself on this guide. Answers are checked instantly, with a full explanation for each question.
Q1.A company runs a web application on Amazon EC2 instances. The application needs to read objects from a private Amazon S3 bucket. A developer suggests creating an IAM user with an access key and storing the key in the application configuration file. What should the solutions architect recommend instead?
Explanation: An IAM role attached to the EC2 instances gives the application temporary credentials automatically, with no long-term secret to store, rotate, or leak. The policy can be scoped to read-only access on just that bucket, which follows least privilege. Option C is wrong twice over: it grants full administrator access when only S3 reads are needed, and it stores a long-lived access key in a file where it can be exposed. Option D removes all access control from the bucket, which is a serious security failure. Option B is not possible: IAM groups contain users, not EC2 instances.
Exam objective: SAA-C03 Task Statement 1.1: Design secure access to AWS resources
Q2.A new developer joins a team that manages a production database. The developer needs to view database performance metrics in the AWS Management Console but must not be able to modify or delete any resources. Which approach follows the principle of least privilege?
Explanation: A group with a read-only policy gives the developer exactly what the job needs — visibility into metrics — and nothing that could change or delete resources. Groups also make the permission easy to manage as the team changes. Option A grants full control of the account, far beyond the requirement. Option B shares credentials, which destroys accountability and cannot be revoked for one person. Option D also grants far more than needed; a role does not fix a policy that is too broad.
Exam objective: SAA-C03 Task Statement 1.1: Design secure access to AWS resources
Q3.Company A needs to give a partner company read access to objects in one of its S3 buckets. The partner's employees already have IAM users in the partner's own AWS account. What is the most secure way to grant this access?
Explanation: A cross-account role is the standard pattern: the trust policy names the partner account, the role's permission policy is scoped to read access on one bucket, and the partner's users get temporary credentials when they assume the role. No long-term credentials cross the company boundary. Option C creates and distributes long-lived credentials for outsiders, which is hard to audit and revoke. Option A makes the bucket readable by anyone on the internet, not just the partner. Option B copies data unnecessarily and uses root credentials, which should never run automated workloads.
Exam objective: SAA-C03 Task Statement 1.1: Design secure access to AWS resources
Q4.A company requires that any IAM user who performs sensitive actions, such as deleting an S3 bucket, must have authenticated with multi-factor authentication (MFA) in the current session. Which solution enforces this requirement?
Explanation: A policy condition using aws:MultiFactorAuthPresent is the mechanism that ties permission to MFA: the deny applies whenever the request was not authenticated with MFA, so a user without MFA simply cannot perform the sensitive action. Option A only protects the root user, not the IAM users who do the daily work. Option B is a password hygiene measure that says nothing about MFA. Option C records API activity for auditing after the fact but does not block any request.
Exam objective: SAA-C03 Task Statement 1.1: Design secure access to AWS resources
Q5.A solutions architect is reviewing the security of a new AWS account. Which action is the MOST important first step for protecting the account's root user?
Explanation: The root user has unrestricted access, so the priority is to protect it with MFA, remove its long-lived access keys, and keep it unused except for the few tasks that only root can do. Option A is the opposite of good practice: root access keys are the highest-value credential in the account. Option C is wrong because IAM policies do not apply to the root user — its permissions cannot be reduced by attaching a policy. Option B is not possible: the root user is not an IAM user and cannot be placed in a group.
Exam objective: SAA-C03 Task Statement 1.1: Design secure access to AWS resources
Q6.An IAM user has the AmazonS3FullAccess managed policy attached. A separate policy attached to the same user explicitly denies the s3:DeleteBucket action. The user attempts to delete an S3 bucket. What happens?
Explanation: IAM policy evaluation is clear: an explicit deny in any applicable policy overrides every allow, no matter how broad the allow is or in what order policies were attached. The user can do everything else in S3 but cannot delete a bucket. Option A ignores the deny. Option D invents a rule about attachment order, which has no effect on evaluation. Option B confuses the permission question with the separate rule that a bucket must be empty before deletion — the request is denied on permissions before that rule is even reached.
Exam objective: SAA-C03 Task Statement 1.1: Design secure access to AWS resources
Q7.A company with 200 employees uses five AWS accounts. Employees currently have a separate IAM user in each account, and the security team struggles to remove access promptly when people leave. Which solution BEST simplifies workforce access management?
Explanation: IAM Identity Center gives each employee one sign-on that works across all accounts, federated from the identity provider the company already uses. When someone leaves, disabling them in one place removes their AWS access everywhere. Option A destroys accountability — shared credentials cannot be traced to a person. Option D is not how roles work (roles have no long-term credentials to publish) and would expose access to everyone. Option C improves authentication security but does nothing about the management problem of hundreds of separate users.
Exam objective: SAA-C03 Task Statement 1.1: Design secure access to AWS resources
Q8.A mobile application needs to let authenticated users upload photos directly to an S3 bucket. The application must not embed any AWS credentials in the mobile app. Which solution meets these requirements?
Explanation: Amazon Cognito is built for this: it authenticates the app's users and issues short-lived, scoped temporary credentials, so the app never contains a long-lived secret. Option D puts a long-term credential in software distributed to users' phones, where it can be extracted. Option C lets anyone on the internet write to the bucket. Option A is unmanageable at mobile scale and still stores long-lived credentials on devices.
Exam objective: SAA-C03 Task Statement 1.1: Design secure access to AWS resources