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

Quick Answer

The correct approach is to add a condition to the IAM policy that grants the kms:Decrypt permission with a condition on aws:PrincipalTag to require the tag. This works because the aws:PrincipalTag condition key evaluates the tags attached to the IAM principal—in this case, the role—and only allows the action when the specified tag key and value match, such as Environment=Production. On the AWS Certified Cloud Practitioner CLF-C02 exam, this scenario tests your understanding of how IAM condition keys can restrict permissions based on principal attributes, a common topic in the security section. A frequent trap is confusing resource tags with principal tags; remember that aws:PrincipalTag checks the identity itself, not the resource it accesses. To recall this, think of the mnemonic “Tag the actor, not the action”—the condition locks the permission to the tagged role, ensuring only that specific principal can decrypt.

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?

Question 1mediummultiple choice
Full question →

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.

  • 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.

  • 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.

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.

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.