SAP-C02 Continuous Improvement for Existing Solutions Practice Question
A company is using AWS CloudFormation to deploy a web application. The stack creation fails with the error: 'The following resource(s) failed to create: [MyEC2Instance].' The EC2 instance creation failed because of an insufficient IAM permissions error. Which TWO actions should the company take to resolve this issue? (Choose two.)
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
✓
Update the IAM role associated with the CloudFormation stack to include ec2:RunInstances permission.
Options C and E are correct. The error indicates that the IAM role used by CloudFormation to create the EC2 instance lacks the ec2:RunInstances permission. Therefore, updating the IAM role to include this permission (C) and then executing a stack update (E) will resolve the issue. Option A is incorrect because the instance type is not related to the IAM permissions error. Option B is incorrect because creating a new role is unnecessary; updating the existing role suffices. Option D is incorrect because granting permissions to the user does not affect the CloudFormation service role's permissions.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Modify the CloudFormation template to use a different instance type.
Why it's wrong here
Instance type is not related to permissions.
- ✗
Create a new IAM service role for CloudFormation and assign it to the stack.
Why it's wrong here
The existing role just needs additional permissions.
- ✓
Update the IAM role associated with the CloudFormation stack to include ec2:RunInstances permission.
Why this is correct
The CloudFormation service needs permission to create the EC2 instance.
- ✗
Grant the user additional IAM permissions to create EC2 instances.
Why it's wrong here
The issue is with CloudFormation's role, not the user.
- ✓
Execute a stack update with the corrected IAM role.
Why this is correct
Updating the stack with the correct role allows the creation to proceed.
Visual reference
Go deeper
Related to this question
About these practice questions
Courseiva writes every SAP-C02 question from scratch — 1,660 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or 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.