Courseiva
Continuous Improvement for Existing SolutionseasyMultiple ChoiceObjective-mapped

SAP-C02 Continuous Improvement for Existing Solutions Practice Question

A company uses AWS Lambda functions to process messages from an Amazon SQS queue. The Lambda function is CPU-bound and takes close to the 15-minute timeout. The operations team notices that the function sometimes times out during peak hours. What is the SIMPLEST way to improve the function's performance?

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

Increase the memory (and CPU) allocation for the Lambda function.

Increasing the Lambda function's memory also increases CPU allocation proportionally, which directly speeds up CPU-bound processing and reduces the chance of timeout during peak hours. Option A is wrong because increasing reserved concurrency only allows more parallel invocations, but does not improve per-invocation performance; it could actually increase load on the same slow function. Option B is wrong because increasing the batch size makes each invocation process more messages, which would further increase processing time and worsen timeouts. Option C is wrong because using a Lambda function URL changes the invocation source but does not affect CPU allocation or timeout behavior. Option E is wrong because migrating to ECS with Fargate is more complex and not the simplest solution; increasing Lambda memory is a simpler and effective change.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Increase the reserved concurrency of the Lambda function.

    Why it's wrong here

    Reserved concurrency limits the number of concurrent executions, not per-invocation performance.

  • Increase the batch size in the SQS event source mapping.

    Why it's wrong here

    Larger batch size means more messages per invocation, increasing runtime.

  • Use a Lambda function URL instead of SQS invocation.

    Why it's wrong here

    Function URL does not change performance characteristics.

  • Increase the memory (and CPU) allocation for the Lambda function.

    Why this is correct

    Lambda allocates CPU proportionally to memory, so more memory speeds up CPU-bound tasks.

  • Migrate the Lambda function to run on Amazon ECS with Fargate using a larger task size.

    Why it's wrong here

    Migrating to ECS with Fargate and a larger task size does not address the root cause of the Lambda timeout, which is the 15-minute execution limit; ECS Fargate tasks have no such hard timeout, but the question asks for the *simplest* improvement, and moving to a container orchestration platform introduces significant architectural complexity and operational overhead compared to simply increasing the Lambda function’s memory allocation (which also proportionally increases CPU). This option is tempting because ECS with Fargate is designed for long-running, CPU-intensive workloads that exceed Lambda’s constraints, and it would be the correct choice if the function required consistent execution beyond 15 minutes or needed persistent, stateful processing.

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

About these practice questions

One of 1,660 original SAP-C02 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This SAP-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 SAP-C02 exam.