Courseiva

DVA-C02 Troubleshooting and Optimization Practice Question

A developer is deploying a serverless application using AWS SAM. The deployment fails with the error 'Resource creation cancelled'. 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

✓

A resource in the stack failed to create.

The 'Resource creation cancelled' error in AWS SAM indicates that the CloudFormation stack creation was cancelled because one or more resources failed to create, triggering a rollback. Option A is incorrect because a malformed SAM template would produce a validation error, not 'Resource creation cancelled'. Option C is incorrect because a Lambda function timeout is a runtime issue, not a deployment error. Option D is incorrect because insufficient IAM permissions would result in an access denied error, not this specific cancellation 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 SAM template is malformed.

    Why it's wrong here

    A malformed SAM template fails template validation and transformation before CloudFormation ever begins creating stack resources, producing a template validation or syntax error message, not the 'Resource creation cancelled' status which only appears after resource creation has already started.

  • ✓

    A resource in the stack failed to create.

    Why this is correct

    'Resource creation cancelled' is CloudFormation's standard rollback behavior: when one resource in the stack fails to create (for example, an S3 bucket name collision or an invalid property value), CloudFormation cancels the creation of any remaining resources that haven't started yet and begins rolling back what did get created.

  • ✗

    The Lambda function code has a timeout.

    Why it's wrong here

    A Lambda function timing out is a runtime/execution-time issue that occurs only after the function has been successfully created and invoked; it would surface as a function execution error in CloudWatch Logs, not as a CloudFormation resource creation cancellation during stack deployment.

  • ✗

    The IAM role does not have sufficient permissions.

    Why it's wrong here

    Insufficient IAM permissions during a SAM deploy would produce an explicit access-denied error identifying the denied action and resource, giving a distinctly different and more specific error message than the generic 'Resource creation cancelled' rollback status.

Quick reference

Cloud Service Model Comparison

ModelYou ManageProvider ManagesExamples
IaaSOS, runtime, apps, dataHardware, hypervisor, networkingEC2, Azure VMs, GCP Compute Engine
PaaSApps and dataOS, runtime, middleware, hardwareElastic Beanstalk, Azure App Service
SaaSData and settings onlyEverything elseMicrosoft 365, Salesforce, Workday
FaaS / ServerlessFunction code onlyInfra, scaling, runtimeLambda, Azure Functions, Cloud Run
CaaSContainers and appsKubernetes, OS, hardwareEKS, AKS, GKE

About these practice questions

Courseiva writes every DVA-C02 question from scratch — 1,135 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 →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

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.