mediumMultiple ChoiceObjective-mapped
CV0-004 Practice Question: A cloud security analyst finds the above JSON…
Exhibit
Refer to the exhibit.
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::confidential/*",
"Principal": "*"
}
]
}A cloud security analyst finds the above JSON policy attached to an S3 bucket containing confidential customer data. What change must be made to comply with the principle of least privilege?
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
✓
Restrict the Principal to a specific AWS account or user.
The JSON policy attached to the S3 bucket includes a wildcard Principal ("Principal": "*"), which allows anonymous access to anyone. To comply with the principle of least privilege, access must be restricted to only authorized entities. Option A correctly identifies this by requiring the Principal to be set to a specific AWS account or user, ensuring only authenticated and authorized principals can access the bucket.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Restrict the Principal to a specific AWS account or user.
Why this is correct
This limits access to only authorized identities.
- ✗
Change the Effect to 'Deny'.
Why it's wrong here
Deny would block all access, not restrict to authorized users.
- ✗
Change the Action to 's3:PutObject'.
Why it's wrong here
Changing the action does not address the anonymous access issue.
- ✗
Remove the Resource field.
Why it's wrong here
This would still allow anonymous access to all buckets.
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 CV0-004 question is part of Courseiva's 977-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 CV0-004 practice question is part of Courseiva's free CompTIA 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 CV0-004 exam.