Courseiva

SAP-C02 Continuous Improvement for Existing Solutions Practice Question

A company is using AWS CloudFormation to manage infrastructure. The stack creation fails with the error 'Resource handler returned message: 'User: arn:aws:sts::123456789012:assumed-role/Admin/MySession is not authorized to perform: ec2:RunInstances'. What is the MOST likely cause?

⚠ Common exam trap

SAP-C02 often tests whether candidates can parse the exact IAM error string and distinguish authorization failures from template syntax or region errors — the phrase 'not authorized to perform' is the giveaway.

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

✓

The IAM role used by CloudFormation does not have ec2:RunInstances permission.

The error message explicitly names the assumed role and the denied action `ec2:RunInstances`, which is the signature of an IAM permissions problem. CloudFormation uses either the user's credentials or a service role to create resources; if that principal lacks `ec2:RunInstances`, the stack fails with exactly this 'not authorized to perform' message.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✓

    The IAM role used by CloudFormation does not have ec2:RunInstances permission.

    Why this is correct

    CloudFormation assumes an IAM role to make API calls; if that role's policy lacks ec2:RunInstances, the stack's instance creation is denied. The error names the assumed role, confirming the missing permission is the cause of the stack creation failure.

  • ✗

    The region specified in the template is disabled.

    Why it's wrong here

    A disabled region causes CloudFormation to reject the stack at the regional endpoint before any EC2 call is attempted, so it cannot yield an explicit ec2:RunInstances authorisation error. Disabled regions matter when a stack targets a region you have not enabled.

  • ✗

    The CloudFormation template has a syntax error.

    Why it's wrong here

    A template syntax error produces a validation or parsing failure before any API call, so it cannot yield an explicit ec2:RunInstances authorisation denial naming an assumed role. Syntax checking is what cfn-lint or validate-template addresses; here the request reached EC2 and IAM rejected it.

  • ✗

    The AWS account is not subscribed to EC2 service.

    Why it's wrong here

    EC2 is available in every AWS account by default; there is no subscription or activation step, so an account-level enrolment gap cannot produce an IAM authorisation denial. Service subscription is the right concept for Marketplace products or opt-in Regions, not core compute.

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 →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official Amazon Web Services exam blueprint

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.