SAP-C02 Continuous Improvement for Existing Solutions Practice Question
A company is using AWS CloudFormation to manage infrastructure. The security team requires that all CloudFormation stacks include a specific tag (CostCenter). The company wants to enforce this tag automatically. Which method should be used to enforce the tag?
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 an AWS Config rule to check for the tag and a custom IAM policy to deny stack creation without the tag.
An AWS Config rule can detect stacks missing the required tag, and a custom IAM policy can deny the ability to create or update stacks that do not have the tag, providing preventive enforcement. Option A is incorrect because AWS Service Catalog can enforce tags on products it provisions, but the question is about all CloudFormation stacks, not just those from Service Catalog. Option C is incorrect because a Lambda function can alert or remediate after the fact, but it does not prevent creation of non-compliant stacks. Option D is incorrect because tagging after creation does not enforce the tag requirement at creation time, and AWS Resource Groups is not an enforcement mechanism.
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 AWS Service Catalog to enforce mandatory tags on all provisioned products.
Why it's wrong here
Service Catalog enforces tags on its products, not on all CloudFormation stacks.
- ✓
Use an AWS Config rule to check for the tag and a custom IAM policy to deny stack creation without the tag.
Why this is correct
Config can detect and IAM policy can prevent non-compliant stack creation.
- ✗
Create an AWS Lambda function that checks for the tag and sends alerts.
Why it's wrong here
Lambda can detect but not prevent non-compliance proactively.
- ✗
Use AWS Resource Groups to tag resources after stack creation.
Why it's wrong here
Resource Groups do not enforce tag creation automatically.
Quick reference
Cloud Service Model Comparison
| Model | You Manage | Provider Manages | Examples |
|---|---|---|---|
| IaaS | OS, runtime, apps, data | Hardware, hypervisor, networking | EC2, Azure VMs, GCP Compute Engine |
| PaaS | Apps and data | OS, runtime, middleware, hardware | Elastic Beanstalk, Azure App Service |
| SaaS | Data and settings only | Everything else | Microsoft 365, Salesforce, Workday |
| FaaS / Serverless | Function code only | Infra, scaling, runtime | Lambda, Azure Functions, Cloud Run |
| CaaS | Containers and apps | Kubernetes, OS, hardware | EKS, AKS, GKE |
Go deeper
Related to this question
About these practice questions
This SAP-C02 question is part of Courseiva's 1,660-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 SAP-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 SAP-C02 exam.