AWS Certified Developer – Associate (DVA-C02) — Question 514
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?
Answer options
- A. Increase the virtual CPUs (vCPUs) for the Lambda function to use 10 vCPUs.
- B. Change Lambda function instance type to use m6a.4xlarge.
- C. Configure the Lambda function to increase the amount of memory.
- D. Configure burstable performance for the Lambda function.
Correct answer: C
Explanation
AWS Lambda allocates CPU power proportionally to the amount of memory configured for the function, so increasing the memory limit will automatically grant more CPU resources to speed up processing. Developers cannot directly modify vCPUs, instance types, or burstable performance settings for Lambda functions, as these are managed automatically by AWS. Therefore, increasing the memory is the correct way to reduce the execution time of CPU-bound tasks like image resizing.