SAP-C02 Practice Question: Design Solutions for Organizational Complexity
A company has a multi-account AWS environment with hundreds of accounts. The security team needs to centrally manage IAM roles for cross-account access. They want to ensure that when a role is created in a member account, it automatically adheres to the principle of least privilege and is auditable. What solution should they implement?
⚠ Common exam trap
A common mix-up: candidates choose Option A, thinking that CloudFormation StackSets alone provide enforcement, but they miss the critical need for a preventive control (SCPs) to block manual role creation outside the template.
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 AWS Organizations service control policies (SCPs) to deny creation of IAM roles except through AWS CloudFormation, and use a centrally managed CloudFormation template via StackSets.
AWS Organizations SCPs can be used to deny the creation of IAM roles except through AWS CloudFormation, ensuring that roles are only created via a centrally managed template. By combining this with AWS CloudFormation StackSets, the security team can deploy IAM roles from a single template across all member accounts, enforcing the principle of least privilege and providing full auditability through CloudFormation stack events and AWS CloudTrail.
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 CloudFormation StackSets to deploy IAM roles from a central template in each account.
Why it's wrong here
StackSets deploy a fixed template, but they do not enforce least privilege on roles created later outside that template, nor provide central ongoing auditability of every role. It tempts because it is the standard cross-account deployment mechanism, and would fit standardised baseline provisioning rather than continuous compliance enforcement.
- ✓
Use AWS Organizations service control policies (SCPs) to deny creation of IAM roles except through AWS CloudFormation, and use a centrally managed CloudFormation template via StackSets.
Why this is correct
SCPs restrict member accounts to creating roles only via CloudFormation, and StackSets deploys one centrally governed template across the organisation. This enforces least privilege consistently and keeps every role creation auditable, meeting the multi-account requirement.
- ✗
Configure AWS Config rules to detect non-compliant roles and trigger a Lambda function to remove them.
Why it's wrong here
Config rules detect non-compliance reactively and the Lambda deletes offending roles, which is remediation after the fact rather than ensuring roles are created least-privileged and auditable. It tempts as a compliance-guardrail pattern, and suits drift detection, but not preventive central management of role creation.
- ✗
Create a Lambda function that monitors CloudTrail events for role creation and sends alerts.
Why it's wrong here
CloudTrail plus Lambda only detects and alerts after a role already exists, so least privilege is never enforced at creation and no central template governs it. It tempts teams wanting lightweight monitoring, and suits detective alerting use cases, but the scenario demands preventive, auditable role deployment across accounts.
Go deeper
Related to this question
About these practice questions
This SAP-C02 question is part of Courseiva's 984-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.