Question 802 of 1,024
Security and CompliancemediumMultiple ChoiceObjective-mapped

CLF-C02 Security and Compliance Practice Question

This CLF-C02 practice question tests your understanding of security and compliance. Match the stated requirement to the specific cloud service, access model, or configuration option — many options are valid in isolation but not for this scenario. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

A company uses an IAM role to allow an application running on Amazon EC2 to decrypt data stored in Amazon S3. The security team wants to enforce that the application can only use the decryption permission when the IAM role has a specific tag (e.g., 'Environment=Production'). Which approach should the security team implement to meet this requirement?

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

Add a condition to the IAM policy that grants the 'kms:Decrypt' permission with a condition on 'aws:PrincipalTag' to require the tag.

Option C is correct because the condition key 'aws:PrincipalTag' in an IAM policy allows you to control access based on tags attached to the IAM principal (the role). By adding a condition that requires 'aws:PrincipalTag/Environment' to equal 'Production', the 'kms:Decrypt' permission is only effective when the IAM role has that specific tag. This directly enforces the security team's requirement at the IAM policy level, which is the appropriate place to restrict permissions based on principal attributes.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Answer analysis

Option-by-option breakdown

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

  • Add a condition to the KMS key policy that uses the 'kms:RequestTag/ConditionKey' to require the tag on the caller.

    Why it's wrong here

    Incorrect. KMS key policies use condition keys such as 'kms:EncryptionContext' or 'kms:ViaService', but not 'kms:RequestTag/ConditionKey' for principal tags. Principal tags are checked using 'aws:PrincipalTag' in the key policy, but this is not the most straightforward approach and the key policy alone cannot enforce this if the IAM policy also grants permission. Moreover, the option uses an incorrect condition key name.

    When this WOULD be correct

    If the requirement were to enforce that the KMS API request itself includes a specific tag (e.g., to track usage or enforce tagging policies on decryption requests), then using 'kms:RequestTag' in the key policy would be correct.

  • Add a condition to the IAM role's trust policy that denies the 'kms:Decrypt' action unless the role has the tag.

    Why it's wrong here

    Incorrect. A role's trust policy controls which principals can assume the role, not what actions the role can perform. The trust policy cannot directly limit the decryption permissions of the role. The permissions are governed by the IAM policy attached to the role.

    When this WOULD be correct

    If the requirement were to restrict which principals (users or services) can assume the IAM role based on a tag (e.g., only allow EC2 instances with a specific tag to assume the role), then adding a condition on 'aws:PrincipalTag' in the trust policy would be correct.

  • Add a condition to the IAM policy that grants the 'kms:Decrypt' permission with a condition on 'aws:PrincipalTag' to require the tag.

    Why this is correct

    Correct. IAM policies support the 'aws:PrincipalTag' condition key, which checks the tags attached to the IAM principal (user or role) making the request. By adding a condition like 'StringEquals': {'aws:PrincipalTag/Environment': 'Production'} to the IAM policy that grants 'kms:Decrypt', the decryption action is only allowed when the role has the specified tag. This is a form of attribute-based access control (ABAC).

    Related concept

    Read the scenario before looking for a memorised answer.

  • Add a condition to the S3 bucket policy that denies all access unless the IAM role has the required tag.

    Why it's wrong here

    Incorrect. An S3 bucket policy controls access to S3 actions (like s3:GetObject), but it does not control the KMS decrypt action. Even if the bucket policy allows access, the application still needs explicit permission to use the KMS key. Additionally, S3 bucket policies can use 'aws:PrincipalTag' conditions, but that would only affect S3 API calls, not the decryption operation.

    When this WOULD be correct

    If the requirement were to restrict access to S3 objects based on the IAM role's tag (e.g., only allow read access when the role has 'Environment=Production'), then adding a condition to the S3 bucket policy using 'aws:PrincipalTag' would be correct.

Option-by-option analysis

Why each answer is right or wrong

Understanding why wrong answers are wrong — and when they would be correct — is what separates a 750 score from a 900. The CLF-C02 exam frequently reuses these exact scenarios with slightly different constraints.

Add a condition to the IAM policy that grants the 'kms:Decrypt' permission with a condition on 'aws:PrincipalTag' to require the tag.Correct answer

Why this is correct

Correct. IAM policies support the 'aws:PrincipalTag' condition key, which checks the tags attached to the IAM principal (user or role) making the request. By adding a condition like 'StringEquals': {'aws:PrincipalTag/Environment': 'Production'} to the IAM policy that grants 'kms:Decrypt', the decryption action is only allowed when the role has the specified tag. This is a form of attribute-based access control (ABAC).

Add a condition to the KMS key policy that uses the 'kms:RequestTag/ConditionKey' to require the tag on the caller.Wrong answer — click to see why

Why this is wrong here

The condition 'kms:RequestTag/ConditionKey' checks for tags on the KMS API request, not on the IAM role. The requirement is to enforce that the IAM role has a specific tag, not that the request includes a tag.

★ When this WOULD be the correct answer

If the requirement were to enforce that the KMS API request itself includes a specific tag (e.g., to track usage or enforce tagging policies on decryption requests), then using 'kms:RequestTag' in the key policy would be correct.

Why candidates choose this

Candidates may confuse request tags with principal tags, or think that KMS key policies can directly evaluate IAM role tags via request conditions.

Add a condition to the IAM role's trust policy that denies the 'kms:Decrypt' action unless the role has the tag.Wrong answer — click to see why

Why this is wrong here

The IAM role's trust policy controls who can assume the role, not what actions the role can perform. Adding a condition to deny 'kms:Decrypt' in the trust policy is ineffective because trust policies do not evaluate permissions for service actions like KMS decryption.

★ When this WOULD be the correct answer

If the requirement were to restrict which principals (users or services) can assume the IAM role based on a tag (e.g., only allow EC2 instances with a specific tag to assume the role), then adding a condition on 'aws:PrincipalTag' in the trust policy would be correct.

Why candidates choose this

Candidates may confuse the purpose of trust policies with identity-based policies, thinking that conditions in trust policies can control the role's permissions to perform actions, rather than just controlling who can assume the role.

Add a condition to the S3 bucket policy that denies all access unless the IAM role has the required tag.Wrong answer — click to see why

Why this is wrong here

The S3 bucket policy cannot enforce conditions on the IAM role's tags for KMS decryption; it controls access to S3 objects, not KMS actions. The requirement is to restrict the KMS decryption permission, which is governed by IAM policies and KMS key policies, not S3 bucket policies.

★ When this WOULD be the correct answer

If the requirement were to restrict access to S3 objects based on the IAM role's tag (e.g., only allow read access when the role has 'Environment=Production'), then adding a condition to the S3 bucket policy using 'aws:PrincipalTag' would be correct.

Why candidates choose this

Candidates may think S3 bucket policies can control all related actions (including KMS decryption) because the data is stored in S3, or they may confuse the scope of S3 bucket policies with IAM policies.

Analysis generated from the official CLF-C02blueprint and verified against question context. The “when correct” sections are what AI assistants cite when candidates ask “what’s the difference between these options?”

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is confusing which policy document (IAM policy vs. key policy vs. bucket policy) and which condition key (PrincipalTag vs. RequestTag) is appropriate for restricting actions based on the caller's tags.

Detailed technical explanation

How to think about this question

The 'aws:PrincipalTag' condition key is evaluated against the tags attached to the IAM user or role making the request. When using KMS with IAM policies, the effective permissions are the intersection of the IAM policy and the KMS key policy. This approach allows fine-grained access control without modifying the KMS key policy, which is often shared across multiple roles. In a real-world scenario, this pattern is used to enforce that only production roles can decrypt production data, even if the same KMS key is used across environments.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

A media company stores terabytes of video archives that are accessed once a year for audit purposes. Moving these objects to a cold storage tier (Azure Archive, S3 Glacier, or Google Nearline) costs a fraction of hot storage. Questions like this test whether you understand storage tiers, access frequency tradeoffs, and retrieval latency requirements.

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

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related CLF-C02 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free CLF-C02 practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this CLF-C02 question test?

Security and Compliance — This question tests Security and Compliance — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: Add a condition to the IAM policy that grants the 'kms:Decrypt' permission with a condition on 'aws:PrincipalTag' to require the tag. — Option C is correct because the condition key 'aws:PrincipalTag' in an IAM policy allows you to control access based on tags attached to the IAM principal (the role). By adding a condition that requires 'aws:PrincipalTag/Environment' to equal 'Production', the 'kms:Decrypt' permission is only effective when the IAM role has that specific tag. This directly enforces the security team's requirement at the IAM policy level, which is the appropriate place to restrict permissions based on principal attributes.

What should I do if I get this CLF-C02 question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Keep practising

More CLF-C02 practice questions

Last reviewed: Jun 11, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This CLF-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 CLF-C02 exam.