AWS Certified Solutions Architect – Professional — Question 805
A company would like to implement a serverless application by using Amazon API Gateway, AWS Lambda, and Amazon DynamoDB. They deployed a proof of concept and stated that the average response time is greater than what their upstream services can accept. Amazon CloudWatch metrics did not indicate any issues with DynamoDB but showed that some Lambda functions were hitting their timeout.
Which of the following actions should the Solutions Architect consider to improve performance? (Choose two.)
Answer options
- A. Configure the AWS Lambda function to reuse containers to avoid unnecessary startup time.
- B. Increase the amount of memory and adjust the timeout on the Lambda function. Complete performance testing to identify the ideal memory and timeout configuration for the Lambda function.
- C. Create an Amazon ElastiCache cluster running Memcached, and configure the Lambda function for VPC integration with access to the Amazon ElastiCache cluster.
- D. Enable API cache on the appropriate stage in Amazon API Gateway, and override the TTL for individual methods that require a lower TTL than the entire stage.
- E. Increase the amount of CPU, and adjust the timeout on the Lambda function. Complete performance testing to identify the ideal CPU and timeout configuration for the Lambda function.
Correct answer: B, D
Explanation
Increasing the memory allocation for AWS Lambda proportionally scales the CPU power available, which helps resolve execution timeouts and reduces overall execution latency. Implementing API Gateway caching reduces the overall latency and the number of invocations to Lambda by serving cached responses for repeated requests. Note that CPU cannot be configured independently of memory in Lambda, and container reuse is managed automatically by AWS rather than via user configuration.