Question #1081
A company is launching a video processing application on AWS. Users upload videos to an Amazon S3 bucket, and an AWS Lambda function converts the videos into multiple formats, storing the outputs in another S3 bucket. During testing, the developer observes that the Lambda function takes over 5 minutes to process each video. The application requires all videos to be processed in under 1 minute.
What should the developer do to meet these requirements?
Increase the number of virtual CPUs (vCPUs) allocated to the Lambda function to 8 vCPUs.
Modify the Lambda function to use a c7g.2xlarge instance type.
Adjust the Lambda function configuration to allocate more memory.
Enable provisioned concurrency for the Lambda function.
Explanation
The correct answer is C because AWS Lambda allocates CPU power proportionally to the memory configured. Increasing memory boosts both memory and CPU resources, which can reduce video processing time.
- A is incorrect: Lambda does not allow direct vCPU allocation; CPU scales with memory.
- B is invalid: Lambda does not support instance type selection (e.g., c7g.2xlarge).
- D addresses cold starts (concurrency) but does not reduce per-invocation execution time.
Key Point: Lambda's CPU scales with memory. For CPU-intensive tasks like video processing, increasing memory (and thus CPU) optimizes performance.
Answer
The correct answer is: C