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.
Refer to the exhibit. A CloudFormation template creates a Lambda function. After deployment, the function fails with a timeout error. Logs are not being created in CloudWatch. 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.
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
The IAM role does not grant sufficient permissions to write logs.
The most likely cause is that the IAM execution role attached to the Lambda function lacks the necessary permissions to create and write log streams and log events to CloudWatch Logs. Without the `logs:CreateLogGroup`, `logs:CreateLogStream`, and `logs:PutLogEvents` actions, the Lambda runtime cannot send its output to CloudWatch, so even if the function code runs, no logs appear. The timeout error occurs because the function is waiting for log delivery or failing silently, but the absence of logs is the direct symptom of insufficient IAM permissions.
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 IAM role does not grant sufficient permissions to write logs.
Why this is correct
The log group ARN should include a log group name pattern like '/aws/lambda/*'.
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 runtime is not supported.
Why it's wrong here
Python 3.9 is supported.
✗
The Lambda execution role has a trust policy that is missing the lambda service.
Why it's wrong here
The trust policy includes lambda.amazonaws.com.
✗
The Lambda function code is faulty.
Why it's wrong here
The code is not shown, but the issue is with logging.
Common exam traps
Common exam trap: answer the scenario, not the keyword
AWS often tests the distinction between 'no logs at all' (permissions issue) versus 'logs present but function fails' (code error), and the trap here is that candidates might assume a timeout always means faulty code, ignoring that missing CloudWatch Logs permissions can cause the function to appear unresponsive.
Trap categories for this question
Command / output trap
The code is not shown, but the issue is with logging.
Detailed technical explanation
How to think about this question
Lambda uses the execution role's IAM policy to authorize CloudWatch Logs API calls. The `logs:CreateLogGroup` action is required only once per log group, while `logs:CreateLogStream` and `logs:PutLogEvents` are needed for every invocation. If the policy is missing these actions, the Lambda runtime silently fails to write logs, and the function may still run but appear to hang or timeout because the runtime waits for the logging subsystem to respond. In real-world scenarios, this often happens when developers attach a managed policy like 'AWSLambdaBasicExecutionRole' but accidentally remove or override the CloudWatch Logs permissions.
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.
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 IAM role does not grant sufficient permissions to write logs. — The most likely cause is that the IAM execution role attached to the Lambda function lacks the necessary permissions to create and write log streams and log events to CloudWatch Logs. Without the `logs:CreateLogGroup`, `logs:CreateLogStream`, and `logs:PutLogEvents` actions, the Lambda runtime cannot send its output to CloudWatch, so even if the function code runs, no logs appear. The timeout error occurs because the function is waiting for log delivery or failing silently, but the absence of logs is the direct symptom of insufficient IAM permissions.
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 →
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.