AWS IAM Practice Questions – 50+
AWS IAM Sample Questions for SAA-C02
Question 1 – IAM Users & Policies
Q: You have a new developer who needs read-only access to all S3 buckets in your AWS account. Which IAM policy should you attach?
A) AmazonS3FullAccess
B) AmazonS3ReadOnlyAccess
C) AdministratorAccess
D) Create a policy granting only s3:ListBucket
Answer: B) AmazonS3ReadOnlyAccess
Explanation: AmazonS3ReadOnlyAccess provides full read-only access (list and get) to all S3 buckets. AmazonS3FullAccess gives write privileges, which is not needed here.
Question 2 – IAM Roles
Q: You want an EC2 instance to access objects in S3 securely without embedding credentials. What should you use?
A) IAM User with Access Keys
B) IAM Role attached to the EC2 instance
C) Store keys in EC2 environment variables
D) Hardcode credentials in application
Answer: B) IAM Role attached to the EC2 instance
Explanation: IAM Roles allow EC2 instances to assume permissions dynamically, avoiding hard-coded credentials, which is best practice.
Question 3 – IAM Best Practices
Q: Which of the following is a best practice for IAM?
A) Share your root account credentials
B) Use IAM users with MFA enabled
C) Use the same IAM credentials across multiple accounts
D) Create long-term access keys for all users
Answer: B) Use IAM users with MFA enabled
Explanation: Enabling MFA for IAM users enhances account security. Never share root credentials or reuse keys across accounts.
Question 4 – IAM Policies
Q: You want to grant temporary access to an S3 bucket for a third-party vendor for 1 hour. Which service should you use?
A) IAM Users
B) IAM Groups
C) IAM Roles with STS (Security Token Service)
D) Policy attached to Root User
Answer: C) IAM Roles with STS
Explanation: Temporary security credentials via IAM Roles + STS allow secure short-term access without creating permanent IAM users.
Question 5 – IAM Groups
Q: You have 10 developers, and you want them to have the same permissions. Which is the easiest way?
A) Attach individual policies to each user
B) Use an IAM Group with policies attached
C) Share a single IAM User
D) Use root credentials
Answer: B) Use an IAM Group with policies attached
Explanation: IAM Groups simplify permission management for multiple users. Policies attached to a group are automatically applied to all members.
✅ Tips for IAM Section in Exam
- Remember the hierarchy: Root account > IAM Users > IAM Groups > IAM Policies > IAM Roles.
- Always use roles for AWS services (EC2, Lambda, etc.) instead of embedding credentials.
- Temporary credentials (STS) are used for cross-account or third-party access.
- MFA + least privilege principle are always best practices.
- Know inline vs managed policies and when to use each.
Section 1: IAM Basics (1–10)
-
What is the default permission for a new IAM user?
- A) Full access
- B) Read-only
- C) No access
-
D) Administrator
Answer: C
-
True or False: IAM Groups can contain other groups.
Answer: False -
Which is a best practice for using AWS accounts?
- A) Share root credentials
- B) Enable MFA for root and users
- C) Use long-lived access keys
-
D) Avoid IAM roles
Answer: B
-
How can an EC2 instance securely access S3?
- A) Hard-coded keys
- B) IAM Role attached to EC2
- C) Root credentials
-
D) Environment variable keys
Answer: B
-
True or False: Root account should be used for daily operations.
Answer: False -
What is the primary purpose of IAM?
- A) Create EC2 instances
- B) Manage user access & permissions
- C) Store database credentials
-
D) Monitor CloudWatch logs
Answer: B
-
What AWS service provides temporary security credentials?
- A) CloudTrail
- B) STS
- C) CloudWatch
-
D) Config
Answer: B
-
You want to allow multiple developers the same permissions. What should you do?
- A) Assign policies individually
- B) Use IAM Group
- C) Share a single IAM user
-
D) Give root access
Answer: B
-
True or False: An IAM role can be assumed by a service, a user, or an external account.
Answer: True -
Which is not recommended in IAM best practices?
- A) Enable MFA
- B) Use least privilege principle
- C) Share root credentials
-
D) Rotate access keys
Answer: C
Section 2: IAM Policies (11–20)
-
Which policy type can be reused across multiple users?
- A) Inline
- B) Managed
- C) Root policy
-
D) Temporary policy
Answer: B
-
True or False: Inline policies are always preferred over managed policies.
Answer: False -
What is the “Effect: Deny” in an IAM policy?
- A) Grants access
- B) Explicitly denies access
- C) Overrides default permissions
-
D) Both B and C
Answer: D
-
You want a user to only list S3 buckets. Which action is needed?
-
Answer:
s3:ListBucket
-
Answer:
-
You want to restrict access to a specific folder in S3. Which IAM feature helps?
- Answer: Policy with resource path condition
-
True or False: Policies attached to IAM groups are automatically applied to users.
Answer: True -
Which AWS feature monitors IAM activity for auditing?
- Answer: CloudTrail
-
What is the maximum number of managed policies per IAM user?
- Answer: 10
-
Scenario: User has two conflicting policies, one allows
s3:DeleteObjectand another denies it. What happens?- Answer: Deny overrides allow
-
True or False: You can attach multiple policies to the same IAM role.
Answer: True
Section 3: IAM Roles & STS (21–30)
-
How can a third-party vendor get temporary S3 access?
- Answer: IAM Role + STS
-
Which is best practice for cross-account Lambda deployment?
- Answer: IAM Role with STS
-
What is the default duration of STS temporary credentials?
- A) 1 hour
- B) 12 hours
- C) 36 hours
-
D) 1 hour to 12 hours (varies by role/session)
Answer: D
-
True or False: IAM roles are not tied to a specific user.
Answer: True -
You want an EC2 instance to access RDS without hardcoding credentials. How?
- Answer: Attach an IAM Role to EC2 with necessary permissions
-
Which service provides temporary credentials for AWS CLI?
- Answer: STS AssumeRole
-
True or False: Roles can have trust relationships specifying which entities can assume them.
Answer: True -
Scenario: A role has a trust policy allowing a service to assume it. What else is needed for access?
- Answer: Permission policy attached to the role
-
What is the difference between roles and users?
- Answer: Users have long-term credentials; roles have temporary credentials
-
How can you audit which role a user assumed?
- Answer: CloudTrail logs
Section 4: Scenario-Based & Best Practices (31–40)
-
A user cannot access S3 despite policy. What could be wrong?
- Answer: Bucket policy denying access
-
True or False: Always use least privilege principle.
Answer: True -
You need to prevent deletion of all S3 objects. Which IAM policy is needed?
-
Answer: Deny
s3:DeleteObject
-
Answer: Deny
-
You want fine-grained access for billing. What IAM policy type is recommended?
-
Answer: AWS-managed
Billingpolicies
-
Answer: AWS-managed
-
How often should IAM access keys be rotated?
- Answer: Every 90 days
-
True or False: MFA should be enabled for all privileged IAM users.
Answer: True -
What is a best practice for temporary credentials in CI/CD?
- Answer: Use IAM Role assumed by pipeline
-
Scenario: You want a user to access only certain EC2 instances. How?
-
Answer: Policy with
ResourceARNs
-
Answer: Policy with
-
True or False: Using root account for API calls is recommended.
Answer: False -
You want auditing of all IAM changes. Which services help?
- Answer: CloudTrail + AWS Config
Section 5: Advanced Scenario Questions (41–50+)
-
A federated user needs AWS access. Which service is used?
- Answer: IAM Role with SAML / OIDC
-
Which IAM feature allows attribute-based access?
- Answer: IAM Policy Conditions
-
True or False: Policies with Deny always override Allow.
Answer: True -
How can you allow cross-account S3 access without creating new users?
- Answer: IAM Role with trust policy
-
Scenario: An application needs S3 + DynamoDB access. Best approach?
- Answer: IAM Role with attached policies, assumed by application
-
You want time-limited access for a contractor. Which approach?
- Answer: STS temporary credentials
-
True or False: Managed policies are reusable across multiple accounts via AWS Organizations.
Answer: True -
Which IAM concept allows scalable permission management for multiple users?
- Answer: IAM Groups
-
You want to restrict console access for a user but allow API access. How?
-
Answer: Deny
aws-portal:*for console access
-
Answer: Deny
-
Scenario: Implement a DevOps pipeline with least privilege. What’s the recommended approach?
- Answer: Use service roles + temporary credentials, attach only necessary permissions
-
You want an EC2 instance to write logs to CloudWatch securely. How?
-
Answer: Attach IAM Role with
logs:PutLogEventspermission
-
Answer: Attach IAM Role with
.png)
%20(1).png)


%20By%20EduArn.jpg)
