DEA-C01 aws:PrincipalTag Practice Question
A data engineer wants to ensure that only users with a specific tag (e.g., "Department": "DataEngineering") can access an S3 bucket. How can this be enforced?
⚠ Common exam trap
Be careful not to confuse principal tags with resource tags. The condition 'aws:PrincipalTag' checks the requester's IAM user/role tags, while 's3:ExistingObjectTag' checks tags on the S3 object itself. This question tests the distinction.
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
✓
Use a bucket policy with aws:PrincipalTag condition
S3 bucket policies support condition keys like aws:PrincipalTag, which allow access control based on tags attached to IAM principals (users or roles). Option A is correct because it uses aws:PrincipalTag in the bucket policy to restrict access to users with the specific tag. Option B is incorrect because S3 object tags are for objects, not principals, and cannot be used to filter users. Option C is incorrect because attaching an IAM policy to each user is less scalable and does not leverage the bucket policy's centralized control. Option D is incorrect because S3 Object Lambda is for modifying data during retrieval, not for access control decisions.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Use a bucket policy with aws:PrincipalTag condition
Why this is correct
This is correct. The 'aws:PrincipalTag' condition key in a bucket policy evaluates the tags attached to the IAM principal (user or role) making the request, allowing fine-grained access control based on those tags.
- ✗
Use S3 object tags and a bucket policy condition
Why it's wrong here
This is incorrect. S3 object tags are metadata for objects, not principals. The bucket policy can use 's3:ExistingObjectTag' or 's3:RequestObjectTag' conditions, but these relate to object tags, not the requester's tags.
- ✗
Attach an IAM policy to each user with the tag
Why it's wrong here
This is incorrect in the context of the question, which asks for enforcing access via an S3 bucket policy. While attaching an IAM policy per user can work, it is not the approach described (it would require managing individual policies). The bucket policy is more centralized.
- ✗
Use S3 Object Lambda to check user tags
Why it's wrong here
This is incorrect. S3 Object Lambda is used to transform data as it is retrieved, not to evaluate user tags for access control purposes.
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
One of 1,711 original DEA-C01 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 →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This DEA-C01 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 DEA-C01 exam.