Courseiva

SOA-C02 Cost and Performance Optimization Practice Question

A company uses AWS Lambda functions to process messages from an SQS queue. The Lambda function is configured with a reserved concurrency of 100. The SQS queue receives unpredictable spikes of up to 10,000 messages per second. The function takes about 1 second to process a message. The SysOps team notices that during spikes, messages are being throttled and appear in the DLQ. How can the team resolve this while optimizing cost?

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 reserved concurrency to 1000 and enable batch processing with a batch size of 10 in the SQS event source mapping.

Increasing reserved concurrency to 1000 allows the Lambda function to scale to handle the spike of 10,000 messages per second, and enabling batch processing with a batch size of 10 reduces the number of invocations, which optimizes cost by processing up to 10 messages per invocation instead of one. Option A is wrong because reducing reserved concurrency would throttle even more messages, increasing DLQ traffic. Option C is wrong because using EC2 adds operational overhead and does not leverage Lambda's serverless scaling, increasing complexity and cost. Option D is wrong because Lambda does not use instance types; memory and timeout adjustments do not directly address concurrency limitations or batch processing.

Answer analysis

Option-by-option breakdown

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

  • ✗

    Reduce the reserved concurrency to 10 to force the function to process messages more slowly.

    Why it's wrong here

    Reducing reserved concurrency to 10 constrains the Lambda function to a maximum of 10 concurrent executions, which will throttle incoming SQS invocations and cause messages to accumulate. Once messages exceed the queue's visibility timeout or the Lambda invocation fails due to throttling, they are pushed to the configured DLQ, leading to potential data loss or reprocessing. This approach artificially bottlenecks processing and does not address the underlying need for higher throughput.

  • ✓

    Increase reserved concurrency to 1000 and enable batch processing with a batch size of 10 in the SQS event source mapping.

    Why this is correct

    Increasing reserved concurrency to 1000 allows AWS Lambda to scale out to handle a high volume of SQS messages without throttling, as the event source mapping automatically exercises up to that concurrency. Setting a batch size of 10 instructs the SQS event source to deliver up to 10 records per Lambda invocation, reducing the total number of invocations and overhead while dramatically improving throughput. This is the recommended pattern for processing large SQS workloads in a serverless architecture.

  • ✗

    Provision an EC2 fleet to poll the SQS queue and invoke the Lambda function.

    Why it's wrong here

    Provisioning an EC2 fleet to poll SQS and invoke Lambda manually reintroduces server management, scaling, and cost burdens that AWS Lambda is designed to eliminate. These EC2 instances must run continuously, incurring compute costs even when the queue is empty, and they still may not achieve higher throughput than a well-configured Lambda concurrency. This approach diverges from the serverless model, where the SQS integration handles scaling automatically, and is therefore the wrong solution.

  • ✗

    Increase the Lambda function memory and timeout to use a larger instance type.

    Why it's wrong here

    Increasing the Lambda function's memory and timeout does not affect the concurrency ceiling; it only changes the resources allocated per invocation and the maximum execution duration. Since the problem is that the current concurrency limit is too low, raising memory will not allow more simultaneous executions, and any modest performance gain is unlikely to offset the increase in cost per invocation. Lambda does not use instance types, so this approach misinterprets the root cause.

Visual reference

Client Recursive Resolver Root DNS (13 root servers) TLD DNS (.com, .org, …) Authoritative example.com query IP addr answer

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

Courseiva writes every SOA-C02 question from scratch — 1,169 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. 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 SOA-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 SOA-C02 exam.