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 Class | Min Duration | Retrieval | Use Case |
|---|---|---|---|
| S3 Standard | None | Immediate | Frequently accessed data |
| S3 Standard-IA | 30 days | Immediate | Infrequent access, rapid retrieval |
| S3 One Zone-IA | 30 days | Immediate | Non-critical infrequent data |
| S3 Intelligent-Tiering | None | Immediate–hours | Unknown or changing access patterns |
| S3 Glacier Instant | 90 days | Milliseconds | Archive with instant retrieval |
| S3 Glacier Flexible | 90 days | Minutes–hours | Archive, flexible retrieval |
| S3 Glacier Deep Archive | 180 days | Hours | Long-term compliance archive |
Go deeper
Related to this question
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 →
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.