SOA-C02 Cost and Performance Optimization Practice Question
A company is using AWS Lambda functions to process events from Amazon S3. The functions are invoked several thousand times per minute. The SysOps administrator notices that the functions are taking longer to execute during peak times. Which action should the administrator take to improve 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 allocation for the Lambda functions.
Increasing the memory allocation for a Lambda function also proportionally increases its CPU allocation, which can improve execution speed for compute-bound tasks, such as processing events from S3 during peak times. Option A is incorrect because increasing the timeout only allows the function to run longer, but does not make it faster. Option B is incorrect because Lambda abstracts the underlying infrastructure; you cannot choose EC2 instance types. Option D is incorrect because provisioned concurrency reduces cold starts but does not affect the execution time of warm functions.
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 Lambda function timeout.
Why it's wrong here
Increasing the Lambda function timeout merely raises the maximum duration the function is allowed to run before being terminated; it does not allocate additional CPU, memory, or I/O resources. If the function is slow because of insufficient compute capacity, a longer timeout will not make it faster—it only delays the point at which the function would be killed. In fact, extending the timeout can increase cost and allow a poorly performing function to consume resources for longer without addressing the root cause.
- ✗
Use a larger EC2 instance type for the Lambda functions.
Why it's wrong here
Lambda is a fully managed serverless compute service; you cannot select or change the underlying EC2 instance type, vCPU count, or host hardware directly. The only resource you control is memory allocation (128 MB to 10,240 MB), which inversely affects the configured vCPU fraction. Thus specifying a larger EC2 instance type is not an available or valid configuration option for Lambda functions.
- ✓
Increase the memory allocation for the Lambda functions.
Why this is correct
Increasing the memory allocation is the correct approach because Lambda allocates a proportional amount of virtual CPU (vCPU) based on the configured memory value, up to the maximum allowed. More memory translates to more compute power, which directly speeds up CPU-bound and memory-intensive code, thereby reducing execution duration. For example, a function with 1,769 MB receives a full vCPU, while higher values receive more, so raising memory is effectively scaling up the function's processing capacity.
- ✗
Enable provisioned concurrency on the Lambda functions.
Why it's wrong here
Provisioned concurrency pre-warms a configured number of execution environments to eliminate cold-start latency when new invocations arrive, but it does not alter the runtime duration of an invocation once it begins. It is designed for consistent, low-latency response times in workloads with spiky traffic, not for making individual executions complete faster. Since the function's execution speed remains unchanged, this setting has no effect on the processing time of an in-flight invocation.
Quick reference
AWS S3 Storage Class Comparison
| Storage Class | Min Duration | Retrieval | Use Case |
|---|---|---|---|
| S3 Standard | None | Immediate | Frequently accessed data |
| S3 Standard-IA | 30 days | Immediate | Infrequent access, rapid retrieval |
| S3 One Zone-IA | 30 days | Immediate | Non-critical infrequent data |
| S3 Intelligent-Tiering | None | Immediate–hours | Unknown or changing access patterns |
| S3 Glacier Instant | 90 days | Milliseconds | Archive with instant retrieval |
| S3 Glacier Flexible | 90 days | Minutes–hours | Archive, flexible retrieval |
| S3 Glacier Deep Archive | 180 days | Hours | Long-term compliance archive |
Go deeper
Related to this question
About these practice questions
This SOA-C02 question is part of Courseiva's 1,169-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 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.