An enterprise wants to enforce a rule that all EC2 instances must be launched with a specific set of tags for cost allocation. How can they implement this 'Tagging Enforcement' to prevent non-compliant resources from even being created?

Direct Answer (Verified)Reviewed by Sunny (Senior Cloud Engineer)

Correct Answer: IAM Policy with 'Condition' element evaluating the resource tags (aws:RequestTag)

IAM policies can be written with 'StringEquals' conditions on request tags to deny the 'RunInstances' API call if the required tags are not present....

📋Part of AWS Certified Solutions Architect – Professional (SAP-C02) · AWS Certification Practice
Real Exam ScenarioAWS IAM

An enterprise wants to enforce a rule that all EC2 instances must be launched with a specific set of tags for cost allocation. How can they implement this 'Tagging Enforcement' to prevent non-compliant resources from even being created?

✓ Correct Answer & ExplanationAWS IAM

Correct Answer

IAM Policy with 'Condition' element evaluating the resource tags (aws:RequestTag)

Why This Answer Is Correct

IAM policies can be written with 'StringEquals' conditions on request tags to deny the 'RunInstances' API call if the required tags are not present.

📚 What This Question Tests

This question evaluates your knowledge of AWS IAM — a core concept tested in AWS Certified Solutions Architect – Professional (SAP-C02). Understanding AWS IAM is essential for designing scalable, secure, and cost-effective cloud architectures. Mastery of this topic will help you answer scenario-based questions confidently on exam day.