A company runs a CPU-bound data processing workload using an AWS Lambda function. The function is currently configured with 512 MB of memory and is experiencing execution delays, occasionally timing out. A SysOps Administrator reviews AWS Compute Optimizer, which flags the function as under-provisioned and recommends increasing the memory to 1024 MB. The administrator notes that the function's peak memory utilization is only 200 MB. Which action should the administrator take to resolve the performance bottleneck in a cost-effective manner?
- AEnable Amazon CloudWatch detailed monitoring to capture memory utilization metrics at 1-minute intervals before modifying the configuration.
- BUse AWS Cost Explorer to configure a cost anomaly detection alert for the Lambda function to automatically scale the memory when utilization spikes.
- Increase the memory configuration of the Lambda function to 1024 MB to allocate more CPU power and decrease execution time.Cevap
- DConfigure an AWS Config rule to trigger an AWS Systems Manager Automation document that automatically lowers the memory to 256 MB to match the active memory footprint.
Cevap
Increase the memory configuration of the Lambda function to 1024 MB to allocate more CPU power and decrease execution time.
The correct option is to increase the memory configuration to 1024 MB. AWS Lambda allocates CPU power proportionally to the configured memory. Since the workload is CPU-bound, increasing the memory allocation will increase the CPU power available to the function, which significantly speeds up the execution and resolves timeouts. Often, this can also reduce the overall cost because the execution finishes much faster.
Adım Adım Çözüm
Anahtar Kavram
Proportional CPU allocation in AWS Lambda and right-sizing CPU-bound workloads via AWS Compute Optimizer
Tahmini Süre:1m 30s