Courseiva
Accelerate Workload Migration and ModernizationmediumMultiple ChoiceObjective-mapped

SAP-C02 Practice Question: Accelerate Workload Migration and Modernization

Exhibit

Refer to the exhibit.

```
# CloudFormation template snippet
Resources:
  MyInstance:
    Type: AWS::EC2::Instance
    Properties:
      InstanceType: t2.micro
      ImageId: ami-0abcdef1234567890
      UserData:
        Fn::Base64: !Sub |
          #!/bin/bash
          yum install -y httpd
          systemctl start httpd
  MyDB:
    Type: AWS::RDS::DBInstance
    Properties:
      Engine: MySQL
      DBInstanceClass: db.t2.micro
      MasterUsername: admin
      MasterUserPassword: !Ref DBPassword
      AllocatedStorage: 20
```

Refer to the exhibit. A company is deploying a CloudFormation stack for a web application. The stack creation fails with the error 'The parameter DBPassword is not defined'. What is the most likely cause?

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 DBPassword parameter is not defined in the Parameters section

The template uses !Ref DBPassword, but DBPassword is not defined in the Parameters section of the template. CloudFormation requires parameters to be declared before they can be referenced. The other options are not indicated by the error 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 DBPassword parameter is misspelled in the template

    Why it's wrong here

    Incorrect: The error says it's not defined, not misspelled.

  • The DBPassword parameter is defined but used in a condition

    Why it's wrong here

    Incorrect: Not indicated.

  • The DBPassword parameter is not defined in the Parameters section

    Why this is correct

    Correct: The template lacks a Parameters section with DBPassword.

  • The DBPassword parameter is defined but the value is too short

    Why it's wrong here

    Incorrect: Error is about missing definition.

About these practice questions

This SAP-C02 question is part of Courseiva's 1,660-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 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.