SAP-C02 学习助手

SAP-C02 第 489 题

API Gateway Lambda RDS IAM Secrets Manager

题目

A company is running a serverless ecommerce application on AWS. The application uses Amazon API Gateway to invoke AWS Lambda Java functions. The Lambda functions connect to an Amazon RDS for MySQL database to store data. During a recent sale event, a sudden increase in web traffic resulted in poor API performance and database connection failures. The company needs to implement a solution to minimize the latency for the Lambda functions and to support bursts in traffic. Which solution will meet these requirements with the LEAST amount of change to the application?

中文翻译:
一家公司正在 AWS 上运行无服务器电子商务应用程序。该应用程序使用 Amazon API Gateway 调用 AWS Lambda Java 函数。 Lambda 函数连接到 Amazon RDS for MySQL 数据库来存储数据。在最近的一次促销活动中,网络流量突然增加导致 API 性能不佳和数据库连接失败。该公司需要实施一种解决方案来最大程度地减少 Lambda 函数的延迟并支持流量突发。哪种解决方案能够以最少的应用程序更改来满足这些要求?

选项

A. Update the code of the Lambda functions so that the Lambda functions open the database connection outside of the function handler. Increase the provisioned concurrency for the Lambda functions.

中文翻译:
更新 Lambda 函数的代码,以便 Lambda 函数在函数处理程序外部打开数据库连接。增加 Lambda 函数的预配置并发性。

B. Create an RDS Proxy endpoint for the database. Store database secrets in AWS Secrets Manager. Set up the required IAM permissions. Update the Lambda functions to connect to the RDS Proxy endpoint. Increase the provisioned concurrency for the Lambda functions.

中文翻译:
为数据库创建 RDS 代理终端节点。将数据库密钥存储在 AWS Secrets Manager 中。设置所需的 IAM 权限。更新 Lambda 函数以连接到 RDS 代理终端节点。增加 Lambda 函数的预配置并发性。

C. Create a custom parameter group. Increase the value of the max_connections parameter. Associate the custom parameter group with the RDS DB instance and schedule a reboot. Increase the reserved concurrency for the Lambda functions.

中文翻译:
创建自定义参数组。增加 max_connections 参数的值。将自定义参数组与 RDS 数据库实例关联并安排重新启动。增加 Lambda 函数的保留并发度。

D. Create an RDS Proxy endpoint for the database. Store database secrets in AWS Secrets Manager. Set up the required IAM permissions. Update the Lambda functions to connect to the RDS Proxy endpoint. Increase the reserved concurrency for the Lambda functions.

中文翻译:
为数据库创建 RDS 代理终端节点。将数据库密钥存储在 AWS Secrets Manager 中。设置所需的 IAM 权限。更新 Lambda 函数以连接到 RDS 代理终端节点。增加 Lambda 函数的保留并发度。

答案

B

解析

正确答案:B 解析: 本题应选择 B。 正确选项: B. 为数据库创建 RDS 代理终端节点。将数据库密钥存储在 AWS Secrets Manager 中。设置所需的 IAM 权限。更新 Lambda 函数以连接到 RDS 代理终端节点。增加 Lambda 函数的预配置并发性。 选择理由: 该选项最直接地满足题干中的关键约束。做 SAP-C02 题目时,需要同时对照题干里的限定词,例如最高性能、最低运维开销、成本效益、可靠性、可扩展性...

登录后查看完整解析