Courseiva
Question 112 of 724
Troubleshooting and OptimizationmediumMultiple ChoiceObjective-mapped

DVA-C02 Troubleshooting and Optimization Practice Question

A developer is deploying a serverless application using AWS CloudFormation. The stack creation fails with the error 'CREATE_FAILED: The following resource(s) failed to create: [MyLambdaFunction]'. The developer checks the CloudFormation events and sees '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

Another resource in the stack failed, triggering a rollback and cancelling the Lambda creation.

The error 'Resource creation cancelled' indicates that the creation of the Lambda function was aborted because another resource in the stack failed. CloudFormation by default rolls back the stack on failure, cancelling any in-progress resource creations. Thus, option C is correct. Option A is incorrect because large code would cause a different error (e.g., 'RequestEntityTooLargeException'). Option B is incorrect because a timeout would show 'CREATE_FAILED' with a timeout message, not 'cancelled'. Option D is incorrect because missing permissions would result in a different error (e.g., 'AccessDeniedException') during invocation, not creation.

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 Lambda function code is too large and exceeds the deployment limit.

    Why it's wrong here

    AWS Lambda imposes specific limits on the size of deployment packages, such as a 50 MB zipped and 250 MB unzipped limit. If a Lambda function's code package exceeds these predefined limits, the Lambda service would reject the deployment request with a specific validation error, such as 'RequestEntityTooLargeException'. This would result in a 'CREATE_FAILED' status for the Lambda resource itself, clearly indicating a size constraint violation, rather than a 'Resource creation cancelled' message which implies an external trigger for termination.

  • The Lambda function creation timed out due to a network issue.

    Why it's wrong here

    A network issue preventing the successful creation of a Lambda function would typically manifest as a 'CREATE_FAILED' status for that specific resource in CloudFormation, accompanied by an explicit timeout error message or a service unavailability indication. This type of failure implies the resource creation attempt itself failed to complete within the allotted time due to connectivity problems. It is distinct from a 'Resource creation cancelled' status, which signifies that the creation process was deliberately terminated due to an external event, such as a stack rollback.

  • Another resource in the stack failed, triggering a rollback and cancelling the Lambda creation.

    Why this is correct

    When deploying resources using AWS CloudFormation, the deployment process is atomic. If any single resource within a CloudFormation stack fails to create, update, or delete, CloudFormation initiates an automatic rollback of the entire stack to its last stable state. In this scenario, if the Lambda function was pending creation or in the process of being created when another resource in the same stack encountered a failure, its creation would be explicitly cancelled as part of this rollback mechanism, resulting in the 'Resource creation cancelled' status.

  • The Lambda function's execution role is missing permissions.

    Why it's wrong here

    The Lambda function's execution role defines the permissions the function assumes when it runs, allowing it to interact with other AWS services (e.g., writing logs to CloudWatch, accessing S3 buckets). If these permissions are insufficient, the Lambda function would typically fail at runtime with an 'AccessDeniedException' when attempting an unauthorized action, not during its initial creation. The 'Resource creation cancelled' status indicates a higher-level orchestration issue, not a runtime permission problem.

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 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 →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

1 more way this is tested on DVA-C02

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. 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?

easy
  • A.The SAM template is malformed.
  • B.A resource in the stack failed to create.
  • C.The Lambda function code has a timeout.
  • D.The IAM role does not have sufficient permissions.

Why B: 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.

Last reviewed: Jun 20, 2026

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.

Loading comments…

Sign in to join the discussion.

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.