DOP-C02 Configuration Management and IaC Practice Question
A DevOps engineer is troubleshooting a CloudFormation stack creation failure. The stack includes an AWS::EC2::Instance with a UserData script. The stack creation fails with the error: 'The following resource(s) failed to create: [EC2Instance]. The requested configuration is currently not supported. Please check the documentation for supported configurations.' The engineer suspects the instance type is not supported in the selected Availability Zone. Which action should the engineer take to resolve this issue and ensure successful stack creation?
⚠ Common exam trap
Watch out — candidates often assume the instance type itself is unsupported in the entire region and choose to change the region or instance type, rather than recognizing that the error is AZ-specific and can be resolved by explicitly specifying a supported Availability Zone.
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
✓
Add an Availability Zone parameter and map it to an AZ that supports the instance type, or use the AWS::EC2::Instance AvailabilityZone property to specify an AZ that supports the instance type.
The error indicates the instance type is not supported in the default Availability Zone (AZ) selected by CloudFormation. By explicitly specifying an AZ that supports the instance type via the `AvailabilityZone` property or by parameterizing the AZ, the engineer can override the default AZ selection and resolve the incompatibility. This approach directly addresses the root cause without changing the instance type or region.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Add an Availability Zone parameter and map it to an AZ that supports the instance type, or use the AWS::EC2::Instance AvailabilityZone property to specify an AZ that supports the instance type.
Why this is correct
The error occurs because CloudFormation did not explicitly specify an Availability Zone, so AWS placed the instance in an AZ that does not offer the selected instance type. By adding an Availability Zone parameter that is constrained to zones where the instance type is supported—or by setting the AvailabilityZone property directly on the AWS::EC2::Instance resource—you force EC2 to launch in a compatible AZ. This addresses the root cause without changing the instance type, region, or underlying architecture.
- ✗
Use AWS OpsWorks to deploy the instance instead of CloudFormation.
Why it's wrong here
AWS OpsWorks is a configuration management service for running Chef and Puppet recipes to automate the deployment and management of applications, not a replacement for CloudFormation's resource provisioning. OpsWorks still relies on EC2 to launch instances, and those instances are placed in an Availability Zone in the same regional network. If the selected AZ cannot run the instance type, the OpsWorks stack will encounter the same capacity or compatibility error, so switching services does not resolve the placement problem.
- ✗
Change the instance type to a previous generation that is supported in all AZs.
Why it's wrong here
Selecting an older instance generation assumes all previous-generation types are uniformly available across every AZ, which is not guaranteed and is rarely true for older hardware as it is gradually retired. Even if you find a legacy type that works everywhere, you are intentionally regressing compute performance, potentially sacrificing features like newer CPU instructions, improved networking, or better price-performance. The correct fix is to keep the intended instance type and explicitly assign it to an AZ that supports it, not to weaken the application's infrastructure requirements to sidestep the error.
- ✗
Modify the template to specify a different region that supports the instance type.
Why it's wrong here
Changing the entire stack to another region is an overly disruptive workaround that relocates all resources, including VPCs, subnets, security groups, and dependent data, which can affect latency, compliance, data residency, and cost. It does not address the fact that the current region has an AZ that supports the instance type—the issue is only with the specific AZ that CloudFormation implicitly selected. You should resolve the availability inconsistency within the existing region by specifying a supported AZ parameter or AvailabilityZone property, rather than ripping up and recreating the stack in a new geographic location.
Visual reference
Go deeper
Related to this question
About these practice questions
This DOP-C02 question is part of Courseiva's 1,298-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 DOP-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 DOP-C02 exam.