Courseiva
SecurityeasyMultiple ChoiceObjective-mapped

DVA-C02 Security Practice Question

A developer needs to allow an IAM user to perform only specific actions on an S3 bucket. Which type of policy should be attached to the IAM user?

⚠ Common exam trap

AWS often tests the distinction between identity-based policies (IAM policies) and resource-based policies (bucket policies), where candidates mistakenly choose a bucket policy thinking it can control user permissions directly, but bucket policies are tied to the resource, not the user identity.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

An IAM policy

An IAM policy (Option D) is the correct choice because it is an identity-based policy that can be directly attached to an IAM user, group, or role to grant or deny permissions for specific actions on AWS resources, including S3 buckets. This allows the developer to precisely control which S3 actions (e.g., s3:GetObject, s3:PutObject) the user can perform on a particular bucket, meeting the requirement of limiting the user to specific actions.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • A service control policy

    Why it's wrong here

    Service Control Policies (SCPs) are a feature of AWS Organizations that define the maximum permissions available to accounts within an organization unit (OU) or the entire organization. They act as guardrails, restricting what an IAM user or role can do, even if an IAM policy grants broader permissions. However, SCPs cannot grant permissions directly to an individual IAM user; they only filter the effective permissions, making them unsuitable for specifically allowing actions.

  • A bucket policy

    Why it's wrong here

    A bucket policy is an access policy attached directly to an Amazon S3 bucket, defining permissions for principals (users, roles, or other AWS accounts) to access objects and actions within that specific bucket. While a bucket policy can grant permissions to an IAM user for S3 resources, it cannot define the user's general permissions across other AWS services or even for S3 actions outside that particular bucket. Therefore, it's not the mechanism to allow an IAM user to perform only specific actions across AWS.

  • A trust policy

    Why it's wrong here

    A trust policy, also known as a role trust policy, is a required component of an IAM role that specifies which principals (users, services, or accounts) are allowed to assume that role. It defines the "who can assume" part of a role, establishing a trust relationship between the role and the assuming identity. However, a trust policy does not directly grant permissions to an IAM user; instead, it enables a user to temporarily assume a role, thereby inheriting the permissions defined in that role's permissions policy.

  • An IAM policy

    Why this is correct

    An IAM policy is a JSON document that explicitly defines permissions, specifying what actions are allowed or denied on which AWS resources, and under what conditions. These policies are directly attached to IAM identities such as users, groups, or roles, making them the fundamental mechanism for granting specific permissions to an IAM user. By attaching a tailored IAM policy to a user, a developer can precisely control and limit the actions that user is authorized to perform across AWS services.

Quick reference

AWS S3 Storage Class Comparison

Storage ClassMin DurationRetrievalUse Case
S3 StandardNoneImmediateFrequently accessed data
S3 Standard-IA30 daysImmediateInfrequent access, rapid retrieval
S3 One Zone-IA30 daysImmediateNon-critical infrequent data
S3 Intelligent-TieringNoneImmediate–hoursUnknown or changing access patterns
S3 Glacier Instant90 daysMillisecondsArchive with instant retrieval
S3 Glacier Flexible90 daysMinutes–hoursArchive, flexible retrieval
S3 Glacier Deep Archive180 daysHoursLong-term compliance archive

About these practice questions

One of 724 original DVA-C02 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This DVA-C02 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the DVA-C02 exam.