Courseiva
SecurityeasyMultiple ChoiceObjective-mapped

DVA-C02 Security Practice Question

A developer needs to grant an IAM user access to list objects in an S3 bucket named 'app-data'. Which IAM policy statement should be used?

⚠ Common exam trap

Test-takers frequently confuse s3:ListBucket (bucket-level action) with s3:GetObject (object-level action) or incorrectly apply the resource ARN with a trailing '/*' for bucket-level permissions.

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

{"Effect":"Allow","Action":"s3:ListBucket","Resource":"arn:aws:s3:::app-data"}

The s3:ListBucket action is required to list the objects in an S3 bucket, and the resource ARN must specify the bucket itself (arn:aws:s3:::app-data) without a trailing /*. This grants permission to list the contents of the 'app-data' bucket, which is the exact requirement.

Answer analysis

Option-by-option breakdown

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

  • {"Effect":"Allow","Action":"s3:*","Resource":"*"}

    Why it's wrong here

    This policy is overly permissive because it grants full administrative access to all S3 actions (`s3:*`) across all S3 resources (`*`) within the AWS account. While it would technically allow listing objects, it violates the principle of least privilege by providing far more permissions than necessary for the specific task of listing objects in a single bucket. This broad access poses a significant security risk.

  • {"Effect":"Allow","Action":"s3:ListAllMyBuckets","Resource":"*"}

    Why it's wrong here

    The `s3:ListAllMyBuckets` action is designed to list all S3 buckets owned by the AWS account, not the objects contained within a specific bucket. This action operates at the account level and only returns bucket names, without providing any details about their contents. Therefore, it does not fulfill the requirement to list objects inside the `app-data` bucket.

  • {"Effect":"Allow","Action":"s3:ListBucket","Resource":"arn:aws:s3:::app-data"}

    Why this is correct

    This policy correctly grants the `s3:ListBucket` action, which is specifically used to retrieve a list of objects and common prefixes within a designated S3 bucket. The resource ARN `arn:aws:s3:::app-data` precisely targets the `app-data` bucket, ensuring the user can list its contents without gaining broader, unnecessary permissions. This aligns perfectly with the principle of least privilege for the stated requirement.

  • {"Effect":"Allow","Action":"s3:GetObject","Resource":"arn:aws:s3:::app-data/*"}

    Why it's wrong here

    The `s3:GetObject` action is used for retrieving the content of a single, specific object from an S3 bucket, not for enumerating multiple objects within it. While the resource `arn:aws:s3:::app-data/*` correctly specifies objects within the `app-data` bucket, the action itself is for reading data from an object, not for generating a list of available objects. Thus, it fails to meet the requirement to list objects.

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

This DVA-C02 question is part of Courseiva's 724-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. 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.