DVA-C02 · Question #538
A company is launching a photo sharing application on AWS. Users use the application to upload images to an Amazon S3 bucket. When users upload images, an AWS Lambda function creates thumbnail version
The correct answer is C. Configure the Lambda function to increase the amount of memory.. Lambda CPU power scales proportionally with allocated memory; increasing memory is the correct way to speed up CPU-bound tasks like image processing.
Question
A company is launching a photo sharing application on AWS. Users use the application to upload images to an Amazon S3 bucket. When users upload images, an AWS Lambda function creates thumbnail versions of the images and stores the thumbnail versions in another S3 bucket. During development, a developer notices that the Lambda function takes more than 2 minutes to complete the thumbnail process. The company needs alll images to be processed in less than 30 seconds. What should the developer do to meet these requirements?
Options
- AIncrease the virtual CPUs (vCPUs) for the Lambda function to use 10 vCPUs.
- BChange Lambda function instance type to use m6a.4xlarge.
- CConfigure the Lambda function to increase the amount of memory.
- DConfigure burstable performance for the Lambda function.
How the community answered
(35 responses)- A3% (1)
- B6% (2)
- C83% (29)
- D9% (3)
Why each option
Lambda CPU power scales proportionally with allocated memory; increasing memory is the correct way to speed up CPU-bound tasks like image processing.
Lambda does not expose a direct vCPU configuration setting; CPU allocation is controlled indirectly through memory settings, so developers cannot independently set vCPUs to a specific count.
Lambda is a serverless compute service and does not use EC2 instance types; there is no concept of choosing an m6a.4xlarge instance type for a Lambda function.
AWS Lambda allocates CPU power linearly in proportion to the configured memory. For a CPU-intensive task like generating image thumbnails, increasing the memory allocation (e.g., from 128 MB to 3008 MB) proportionally increases the available vCPU, directly reducing execution time. This is the standard Lambda optimization technique for compute-bound workloads.
Lambda does not offer burstable performance as a configuration option; burstable performance (T-series instances) is an EC2 concept and does not apply to Lambda.
Concept tested: Lambda memory and CPU scaling for performance optimization
Source: https://docs.aws.amazon.com/lambda/latest/dg/configuration-memory.html
Community Discussion
No community discussion yet for this question.