DVA-C02 Troubleshooting and Optimization Practice Question
A developer is optimizing an AWS Lambda function that processes streaming data from Amazon Kinesis. The function is CPU-bound. Which TWO actions should the developer take to improve performance?
⚠ Common exam trap
DVA-C02 often tests the misconception that reserved concurrency or shard count improves per-invocation performance, when in fact only memory allocation (and runtime choice) affects CPU available to a single Lambda invocation.
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
✓
Rewrite the function in a compiled language like Go.
Option A is correct because rewriting a CPU-bound Lambda function in a compiled language such as Go reduces execution time: Go compiles to native machine code, avoids the JIT warm-up and higher memory overhead of interpreted runtimes like Python or Node.js, and typically delivers significantly faster CPU throughput for the same work. Option C is correct because in AWS Lambda, CPU power scales proportionally with the configured memory allocation; increasing memory from, say, 512 MB to 1769 MB grants roughly one full vCPU, which directly speeds up CPU-bound processing. Option B is wrong because reserved concurrency only caps or guarantees the number of simultaneous invocations; it does not make any single invocation faster and can even throttle throughput if set too low. Option D is wrong because increasing Kinesis shard count raises stream throughput and parallelism across records, but it does not accelerate the CPU-bound work inside one function invocation. Option E is wrong because AWS Lambda does not support GPU acceleration; GPU-backed compute requires services like Amazon EC2, ECS, or SageMaker.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Rewrite the function in a compiled language like Go.
Why this is correct
Rewriting the function in a compiled language such as Go can significantly improve performance due to its direct compilation into machine code, eliminating the need for a runtime interpreter during execution. This results in faster execution speeds, lower CPU utilization per task, and often reduced cold start times compared to interpreted languages like Python or Node.js. Go's efficient concurrency model further aids in optimizing resource-intensive operations.
- ✗
Increase the function's reserved concurrency.
Why it's wrong here
Increasing a Lambda function's reserved concurrency allocates a dedicated pool of concurrent execution capacity, preventing it from being throttled by unreserved functions. However, this action solely impacts the maximum number of simultaneous invocations the function can handle, not the execution speed or resource allocation for any single invocation. Therefore, it does not improve the processing time of an individual event.
- ✓
Increase the function's memory allocation.
Why this is correct
Increasing a Lambda function's memory allocation directly scales the proportional share of CPU power and network bandwidth available to its execution environment. For CPU-bound or memory-intensive workloads, providing more memory can significantly reduce execution duration by allowing the function to process data faster, utilize more parallel threads, or avoid memory-related bottlenecks and garbage collection overhead. This is a primary method for improving single-invocation performance.
- ✗
Increase the Kinesis stream's shard count.
Why it's wrong here
Increasing the Kinesis stream's shard count enhances the stream's overall data ingestion and consumption throughput by allowing more parallel read and write operations. While this can reduce backlogs in the stream, it does not directly influence the computational efficiency or execution duration of the downstream AWS Lambda function processing records from that stream. The Lambda's performance bottleneck would remain within its own execution environment.
- ✗
Enable GPU acceleration for the function.
Why it's wrong here
AWS Lambda functions execute within a serverless compute environment that currently relies exclusively on general-purpose CPU resources. The Lambda service does not offer any native support or configuration options for enabling GPU acceleration, which is typically reserved for specialized compute services like EC2 instances with GPU-optimized types. Therefore, this option is not technically feasible for Lambda functions.
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 and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Amazon Web Services exam blueprint
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.