This DOP-C02 practice question tests your understanding of sdlc automation. The scenario asks you to isolate a root cause — eliminate options that address a different problem before choosing. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. 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.
Exhibit
CodePipeline execution details:
- Source: CodeCommit (branch: main)
- Build: CodeBuild (buildspec.yml)
- Deploy: CloudFormation (template.yml)
- Status: Failed at Deploy stage
- Error message: "The following resource(s) failed to create: [MyLambdaFunction]. WaitCondition received 1 unique messages. UniqueId count: 1. Received: 'CREATE_FAILED'"
- CloudFormation stack events: "Resource creation cancelled" for a Lambda function with a VPC configuration.
- Build logs show: "npm install succeeded, tests passed"
Refer to the exhibit. A CodePipeline deployment fails at the CloudFormation stage. The Lambda function creation is cancelled. What is the MOST likely cause?
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.
Exhibit
CodePipeline execution details:
- Source: CodeCommit (branch: main)
- Build: CodeBuild (buildspec.yml)
- Deploy: CloudFormation (template.yml)
- Status: Failed at Deploy stage
- Error message: "The following resource(s) failed to create: [MyLambdaFunction]. WaitCondition received 1 unique messages. UniqueId count: 1. Received: 'CREATE_FAILED'"
- CloudFormation stack events: "Resource creation cancelled" for a Lambda function with a VPC configuration.
- Build logs show: "npm install succeeded, tests passed"
A
The buildspec.yml file contains an invalid command.
Why wrong: Build logs show successful build, so build is not the issue.
B
The Lambda function is configured in a VPC without a NAT gateway or VPC endpoints, causing deployment timeout.
Lambda in VPC without internet access can cause timeouts if it needs to download packages or call external services during initialization.
C
The Lambda function's execution role lacks permissions to create ENIs.
Why wrong: That would cause a different error, not a wait condition timeout.
D
The CodeCommit branch is not configured correctly in the pipeline.
Why wrong: Source stage succeeded, so branch is correct.
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
The Lambda function is configured in a VPC without a NAT gateway or VPC endpoints, causing deployment timeout.
When a Lambda function is deployed inside a VPC, it requires internet access via a NATgateway or VPC endpoints to download dependencies or communicate with services like CloudFormation. Without a NAT gateway or VPC endpoints, the function cannot reach the internet, causing the deployment to time out. This is the most likely reason for the CloudFormation stage failure and Lambda creation cancellation.
Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
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 buildspec.yml file contains an invalid command.
Why it's wrong here
Build logs show successful build, so build is not the issue.
✓
The Lambda function is configured in a VPC without a NAT gateway or VPC endpoints, causing deployment timeout.
Why this is correct
Lambda in VPC without internet access can cause timeouts if it needs to download packages or call external services during initialization.
Clue confirmation
The clue word "most likely" in the question point toward this answer.
Related concept
Read the scenario before looking for a memorised answer.
✗
The Lambda function's execution role lacks permissions to create ENIs.
Why it's wrong here
That would cause a different error, not a wait condition timeout.
✗
The CodeCommit branch is not configured correctly in the pipeline.
Why it's wrong here
Source stage succeeded, so branch is correct.
Common exam traps
Common exam trap: answer the scenario, not the keyword
The trap here is that candidates often assume the issue is a permissions problem (Option C) or a code error (Option A), but the real cause is the network configuration for Lambda in a VPC, which is a common oversight in CloudFormation deployments.
Trap categories for this question
Command / output trap
Build logs show successful build, so build is not the issue.
Detailed technical explanation
How to think about this question
Lambda functions in a VPC use an Elastic Network Interface (ENI) to connect to the VPC, but they lose direct internet access unless the VPC has a NAT gateway or VPC endpoints for services like S3 or CloudFormation. The default route in the VPC's subnet must point to a NAT gateway for outbound traffic; otherwise, the function's requests to external endpoints (e.g., for downloading deployment packages) will time out after 3 seconds (Lambda's default timeout for synchronous invocations). In real-world scenarios, this often occurs when developers forget to configure a NAT gateway in private subnets, leading to mysterious deployment failures.
KKey Concepts to Remember
Read the scenario before looking for a memorised answer.
Find the constraint that changes the correct option.
Eliminate answers that are true in general but not in this case.
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
Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
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.
Visual reference
Quick reference
Cloud Service Model Comparison
Model
You Manage
Provider Manages
Examples
IaaS
OS, runtime, apps, data
Hardware, hypervisor, networking
EC2, Azure VMs, GCP Compute Engine
PaaS
Apps and data
OS, runtime, middleware, hardware
Elastic Beanstalk, Azure App Service
SaaS
Data and settings only
Everything else
Microsoft 365, Salesforce, Workday
FaaS / Serverless
Function code only
Infra, scaling, runtime
Lambda, Azure Functions, Cloud Run
CaaS
Containers and apps
Kubernetes, OS, hardware
EKS, AKS, GKE
What to study next
Got this wrong? Here's your next step.
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
SDLC Automation — This question tests SDLC Automation — Read the scenario before looking for a memorised answer..
What is the correct answer to this question?
The correct answer is: The Lambda function is configured in a VPC without a NAT gateway or VPC endpoints, causing deployment timeout. — When a Lambda function is deployed inside a VPC, it requires internet access via a NAT gateway or VPC endpoints to download dependencies or communicate with services like CloudFormation. Without a NAT gateway or VPC endpoints, the function cannot reach the internet, causing the deployment to time out. This is the most likely reason for the CloudFormation stage failure and Lambda creation cancellation.
What should I do if I get this DOP-C02 question wrong?
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
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?
Read the scenario before looking for a memorised answer.
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 →
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 company uses AWS CloudFormation to create a stack with a Lambda function that uses a VPC. The stack creation fails with 'CREATE_FAILED: The provided execution role does not have permissions to call ec2:CreateNetworkInterface on the resource'. What is the likely cause?
hard
A.The VPC does not have a subnet with internet access.
B.The CloudFormation template does not specify a security group.
C.The Lambda function code has a syntax error.
✓ D.The Lambda execution role is missing the ec2:CreateNetworkInterface permission.
Why D: Option D is correct because when a Lambda function is configured to run inside a VPC, it requires the `ec2:CreateNetworkInterface` permission to create an Elastic Network Interface (ENI) in the VPC subnets. The error message explicitly states that the execution role lacks this permission, which is a required IAM action for VPC-enabled Lambda functions. Without this permission, CloudFormation cannot provision the ENI, causing the stack creation to fail.
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.
This DOP-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 DOP-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.