A company uses AWS CloudFormation to deploy a web application across multiple AWS accounts using StackSets. The DevOps team notices that stack instance updates are failing in some accounts with the error: 'Insufficient IAM permissions to perform the action'. The team has already verified that the StackSet IAM role has the necessary permissions. What is the most likely cause of this issue?
AWS CloudFormation StackSets require a trust relationship between the IAM role used to administer the StackSet (in the management account) and an execution role in each target account. If the execution role’s trust policy does not include the StackSet IAM role (or the appropriate account) as a trusted principal, the sts:AssumeRole call fails with an access-denied error. This trust policy is what authorizes the management account’s role to assume the target execution role, so its absence directly produces the reported failure.
Why this answer
StackSets require a trust relationship between the StackSet IAM role (in the management account) and an execution role in each target account. Even if the StackSet IAM role has full permissions, the target accounts must have a trust policy that allows the StackSet IAM role to assume the execution role. Without this trust policy, the assumption fails, resulting in the 'Insufficient IAM permissions' error.
Exam trap
The trap here is that candidates often assume the error is due to missing permissions on the StackSet IAM role itself, but the DOP-C02 exam tests the understanding that StackSets require a trust chain where the target account's execution role must explicitly trust the management account's StackSet IAM role.
How to eliminate wrong answers
Option A is wrong because the error message specifically mentions IAM permissions, not stack limits; reaching the 200-stack limit would produce a limit exceeded error, not an IAM permissions error. Option C is wrong because SCPs can deny actions even if the IAM role has full admin permissions, but the question states the team verified the StackSet IAM role has necessary permissions, and the error is about IAM permissions, not SCP denials; however, SCPs would cause a different error (e.g., 'Action denied by service control policy'), and the scenario points to a trust policy issue. Option D is wrong because StackSet names have character restrictions that are validated at creation time, not during updates, and invalid characters would cause a creation failure, not an update permission error.