Question 1,429 of 724
DVA-C02 Troubleshooting and Optimization Practice Question
A developer is troubleshooting a CloudFormation stack that fails to create. The stack includes an Auto Scaling group with a launch template. The error message says 'Value (null) for parameter groupId is invalid.' What is the MOST likely cause?
⚠ Common exam trap
A common mix-up: candidates confuse a missing subnet or user data error with a parameter null value, but the specific 'groupId' error points directly to a security group parameter issue, not infrastructure or script problems.
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 launch template references a SecurityGroupId parameter that is not provided or is misspelled.
The error 'Value (null) for parameter groupId is invalid' indicates that a SecurityGroupId parameter referenced in the launch template is either not provided or misspelled. CloudFormation resolves parameters at stack creation; if the parameter is missing or has a typo, it evaluates to null, causing the launch template to fail validation because a security group ID is required for the network interface.
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 launch template references a SecurityGroupId parameter that is not provided or is misspelled.
Why this is correct
When a CloudFormation launch template attempts to create an EC2 instance, it requires valid security group IDs. If the template references a `SecurityGroupId` parameter that is either not declared in the CloudFormation template's `Parameters` section, or if the `Ref` function used to access it contains a typo, CloudFormation will fail to resolve a concrete value. This results in a null or empty value being passed to the EC2 API for `groupId`, leading to a validation error during stack creation.
- ✗
The Auto Scaling group does not specify a VPC subnet.
Why it's wrong here
An Auto Scaling group (ASG) must be configured with at least one VPC subnet through its `VpcZoneIdentifier` property to successfully launch instances. If this property were missing or invalid, the CloudFormation error message would specifically indicate a problem with the subnet configuration, such as "No default VPC for this user" or "Invalid Subnet ID," rather than an issue related to a null `SecurityGroupId`.
- ✗
The Auto Scaling group's user data script contains a syntax error.
Why it's wrong here
Syntax errors within an Auto Scaling group's user data script typically manifest much later in the instance launch process. CloudFormation successfully provisions the EC2 instance, but the instance itself fails to execute the script correctly during boot. This would lead to instances entering a `running` state but failing health checks or not joining the application, without generating a `SecurityGroupId` validation error during the initial CloudFormation stack creation.
- ✗
The launch template specifies an invalid key pair name.
Why it's wrong here
If a launch template specifies an invalid or non-existent `KeyPairName`, the EC2 API would return a specific error indicating that the "Key pair 'your-key-name' does not exist." This error is distinct from a `SecurityGroupId` issue, as the validation failure would directly reference the key pair property, not a missing or null security group identifier.
Visual reference
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Last reviewed: Jun 24, 2026
This DVA-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 DVA-C02 exam.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.