Question 818 of 1,616
Troubleshooting and OptimizationeasyMultiple ChoiceObjective-mapped

DVA-C02 AWS CloudFormation Resource Creation Practice Question

This DVA-C02 practice question tests your understanding of troubleshooting and optimization. The scenario asks you to isolate a root cause — eliminate options that address a different problem before choosing. A key principle to apply: aWS CloudFormation Resource Creation. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

A developer is deploying a serverless application using AWS CloudFormation. The stack creation fails with the error 'The following resource(s) failed to create: [MyLambdaFunction]'. The developer checks the CloudWatch logs but finds no logs for the Lambda function. What is the most likely reason?

Clue words in this question

Noticing these words before you look at the options changes how you read each choice.

  • Clue: "most likely"

    Why it matters: Probability qualifier — the question wants the most probable cause or outcome, not a guaranteed one. Eliminate low-probability options.

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 CloudFormation template has a syntax error.

Option D is correct because a CloudFormation template syntax error, such as a missing required property (e.g., 'Handler' or 'Runtime'), can cause the Lambda function resource to fail creation. The error message indicates the specific resource failed, and the absence of CloudWatch logs is expected because the function was never created. Option A is incorrect because code syntax errors do not prevent resource creation; they affect invocation. Option B is incorrect because the function not being invoked is a consequence, not the cause. Option C is incorrect because missing CloudWatch Logs permissions do not prevent creation; they only affect logging during invocation.

Key principle: AWS CloudFormation Resource 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 has a syntax error that prevents creation.

    Why it's wrong here

    The Lambda function code syntax error does not prevent the resource from being created; the function is deployed regardless. Syntax errors only cause invocation failures.

  • The Lambda function was never invoked.

    Why it's wrong here

    The function was never invoked because it failed to create. This is a result, not the root cause.

  • The Lambda function's IAM role does not have permission to write to CloudWatch Logs.

    Why it's wrong here

    Missing CloudWatch Logs permissions on the IAM role do not prevent creation of the Lambda function; they only prevent logging during invocation.

  • The CloudFormation template has a syntax error.

    Why this is correct

    A syntax error in the CloudFormation template, such as a missing required property for the Lambda resource, can cause creation failure. The error message and lack of logs are consistent with this.

    Clue confirmation

    The clue word "most likely" in the question point toward this answer.

    Related concept

    AWS CloudFormation Resource Creation

Common exam traps

Common exam trap: answer the scenario, not the keyword

The key trap is that candidates may assume the absence of logs means the function was never invoked or that a code error existed. However, the error explicitly states the resource failed to create, so the function was never deployed. The missing logs are a direct consequence of the creation failure, not a separate issue. The root cause is often a missing IAM permission for CloudWatch Logs, which is required during resource creation.

Detailed technical explanation

How to think about this question

Under the hood, when CloudFormation creates a Lambda function, it first provisions the function resource (including code upload) and then attempts to invoke it for a 'Create' event. If the IAM role lacks CloudWatch Logs permissions, the invocation fails silently, and CloudFormation reports a creation failure because the function's initial invocation (for log setup) fails. In real-world scenarios, this often occurs when using a custom IAM role without the AWSLambdaBasicExecutionRole managed policy, leading to a 'ResourceFailedToCreate' error with no logs.

KKey Concepts to Remember

  • AWS CloudFormation Resource Creation
  • Lambda Execution Role Permissions

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

AWS CloudFormation Resource Creation

Real-world example

How this comes up in practice

A company's IT admin needs to give a contractor read-only access to production logs without sharing account credentials. Using role-based access control (RBAC) and temporary scoped permissions — not a permanent shared password — is the correct pattern. Questions like this test whether you can apply least-privilege access across cloud identity services.

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

What to study next

Got this wrong? Here's your next step.

Review aWS CloudFormation Resource Creation, then practise related DVA-C02 questions on the same topic to reinforce the concept.

Related practice questions

Related DVA-C02 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free DVA-C02 practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this DVA-C02 question test?

Troubleshooting and Optimization — This question tests Troubleshooting and Optimization — AWS CloudFormation Resource Creation.

What is the correct answer to this question?

The correct answer is: The CloudFormation template has a syntax error. — Option D is correct because a CloudFormation template syntax error, such as a missing required property (e.g., 'Handler' or 'Runtime'), can cause the Lambda function resource to fail creation. The error message indicates the specific resource failed, and the absence of CloudWatch logs is expected because the function was never created. Option A is incorrect because code syntax errors do not prevent resource creation; they affect invocation. Option B is incorrect because the function not being invoked is a consequence, not the cause. Option C is incorrect because missing CloudWatch Logs permissions do not prevent creation; they only affect logging during invocation.

What should I do if I get this DVA-C02 question wrong?

Review aWS CloudFormation Resource Creation, then practise related DVA-C02 questions on the same topic to reinforce the concept.

Are there clue words in this question I should notice?

Yes — watch for: "most likely". Probability qualifier — the question wants the most probable cause or outcome, not a guaranteed one. Eliminate low-probability options.

What is the key concept behind this question?

AWS CloudFormation Resource Creation

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

Keep practising

More DVA-C02 practice questions

Last reviewed: Jun 24, 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.