SOA-C02 Security and Compliance Practice Question
A company uses AWS Organizations and wants to restrict access to S3 buckets based on project tags. The security policy requires that users in the 'DataScientists' group can only access S3 buckets that have the tag 'Project: DataEngineering'. Which IAM policy condition key should the SysOps administrator use in a customer managed policy to enforce this restriction?
⚠ Common exam trap
Watch out — candidates often confuse `aws:ResourceTag` with service-specific keys like `s3:ExistingObjectTag`, mistakenly applying object-level conditions to bucket-level restrictions, or they assume `s3:ResourceTag` exists as a valid key when it does not.
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
✓
aws:ResourceTag
The `aws:ResourceTag` condition key is used in IAM policies to control access based on the tags attached to the AWS resource (in this case, an S3 bucket). By specifying `aws:ResourceTag/Project` with a value of `DataEngineering`, the policy ensures that only S3 buckets with that exact tag are accessible to the 'DataScientists' group. This key is evaluated against the resource's tags at the time of the request, making it the appropriate choice for tag-based resource restrictions.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
aws:ResourceTag
Why this is correct
The aws:ResourceTag condition key allows you to control access based on tags attached to the resource being accessed (e.g., S3 bucket tag). You can use it in the 'Condition' element of an IAM policy to enforce the tag requirement.
- ✗
s3:ExistingObjectTag
Why it's wrong here
The s3:ExistingObjectTag condition key is designed to evaluate tags on individual S3 objects, not on the bucket itself. For bucket-level operations such as s3:ListBucket or s3:GetBucketLocation, there is no object in context, so this key cannot be evaluated. Even when object-level actions are in play, it only checks the object's own tags, not the bucket's tag, making it unsuitable for a bucket-tag restriction.
- ✗
s3:ResourceTag
Why it's wrong here
There is no defined IAM condition key named s3:ResourceTag. IAM condition keys use a service prefix followed by a specific key name, and while aws:ResourceTag is a global condition, S3 does not define a service-specific s3:ResourceTag. Attempting to use this nonexistent key in a policy would result in a validation error or simply not match any context, so it cannot enforce the desired bucket tag restriction.
- ✗
iam:ResourceTag
Why it's wrong here
The iam:ResourceTag condition key evaluates tags that are attached to IAM resources, such as users, roles, groups, or managed policies. S3 buckets are not IAM resources, and their tags are separate; iam:ResourceTag would look at the IAM resource's tags, not the bucket's tags. Consequently, it would not restrict access based on the bucket's tag and would be ineffective for this use case.
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 SOA-C02 question is part of Courseiva's 247-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 SOA-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 SOA-C02 exam.