DVA-C02 Troubleshooting and Optimization Practice Question
Network Topology
A developer is deploying a CloudFormation stack and sees the event above. What should the developer do to fix the error?
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
✓
Change the runtime to a supported version like nodejs18.x.
The error indicates that the runtime (Node.js 12.x) used in the Lambda function is deprecated and no longer supported by AWS. To fix this, the developer must update the CloudFormation template to specify a supported runtime version, such as nodejs18.x, and redeploy the stack. Option C correctly identifies this solution. Option A is incorrect because the programming language itself is not the issue; the runtime version needs updating. Option B is incorrect because increasing the timeout does not address the unsupported runtime. Option D is incorrect because adding permissions does not resolve the runtime deprecation error.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Update the Lambda function code to use a different programming language.
Why it's wrong here
Updating the Lambda function code to use a different programming language is an unnecessary and drastic step. The error likely indicates that the *specific version* of the runtime chosen (e.g., `nodejs12.x`) is no longer supported by AWS Lambda, not that the language itself (e.g., JavaScript) is inherently incompatible. The existing code might be perfectly valid for a currently supported version of its original language, requiring only a runtime identifier update.
- ✗
Increase the Lambda function timeout in the template.
Why it's wrong here
Increasing the Lambda function timeout in the template addresses a different class of problem. Timeout errors occur when a function runs longer than its configured duration, leading to termination. An error related to an 'unsupported runtime' indicates a fundamental issue with the execution environment's configuration or the specified runtime version itself, preventing the function from even initializing or starting successfully, rather than an issue with its execution duration.
- ✓
Change the runtime to a supported version like nodejs18.x.
Why this is correct
AWS Lambda regularly deprecates older runtime versions to ensure security, performance, and maintainability. When a CloudFormation stack specifies a runtime that is no longer supported (e.g., `nodejs12.x` or `python3.7`), the deployment will fail with an explicit error indicating the runtime is invalid. Updating the `Runtime` property in the CloudFormation template to a currently supported version, such as `nodejs18.x` or `python3.9`, directly resolves this specific deployment failure.
- ✗
Add permissions to the Lambda function's execution role.
Why it's wrong here
Adding permissions to the Lambda function's execution role would not resolve an 'unsupported runtime' error. The execution role grants the function necessary permissions to interact with other AWS services (e.g., S3, DynamoDB, CloudWatch Logs) during its execution. An error concerning runtime support points to an issue with the underlying execution environment's configuration or the specified runtime identifier, not with the function's authorization to access resources. Insufficient permissions would typically manifest as 'Access Denied' errors during function invocation, not during deployment due to an invalid runtime.
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 |
Go deeper
Related to this question
About these practice questions
This DVA-C02 question is part of Courseiva's 1,135-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
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.