AWS Certified Machine Learning Engineer Associate · Free Practice Question Medium
Question 13
What is the main difference between identity-based policies and resource-based policies in AWS IAM?
-
A
Identity-based policies can only be applied to groups, while resource-based policies can only be applied to individual users.
-
B
Identity-based policies are applied directly to AWS resources, while resource-based policies are attached to users, groups, or roles.
-
C
Resource-based policies must always be AWS managed policies, while identity-based policies must be inline policies.
-
D
Identity-based policies are applied to IAM users, groups, or roles, whereas resource-based policies are directly attached to AWS resources like S3 buckets.
Reveal correct answer
Correct answer: D
A.
Identity-based policies can be applied to both users, groups, and roles, while resource-based policies are specific to resources.
B.
Identity-based policies are applied to identities (users, groups, roles) while resource-based policies are attached to AWS resources like S3 buckets.
C.
Both identity-based and resource-based policies can be managed or inline; there is no such restriction.
D.
Identity-based policies apply to IAM identities (users, roles, groups), and resource-based policies are attached to resources such as S3 buckets or EC2 instances.
Discussion
Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.
