SAP-C02 第 506 题
题目
A company creates an Amazon API Gateway API and shares the API with an external development team. The API uses AWS Lambda functions and is deployed to a stage that is named Production. The external development team is the sole consumer of the API. The API experiences sudden increases of usage at specific times, leading to concerns about increased costs. The company needs to limit cost and usage without reworking the Lambda functions. Which solution will meet these requirements MOST cost-effectively?
中文翻译:
一家公司创建 Amazon API Gateway API 并与外部开发团队共享该 API。该 API 使用 AWS Lambda 函数并部署到名为 Production 的阶段。外部开发团队是 API 的唯一使用者。 API 在特定时间的使用量突然增加,导致人们担心成本增加。该公司需要在不重新设计 Lambda 函数的情况下限制成本和使用量。哪种解决方案能够最具成本效益地满足这些要求?
选项
A. Configure the API to send requests to Amazon Simple Queue Service (Amazon SQS) queues instead of directly to the Lambda functions. Update the Lambda functions to consume messages from the queues and to process the requests. Set up the queues to invoke the Lambda functions when new messages arrive.
中文翻译:
配置 API 以将请求发送到 Amazon Simple Queue Service (Amazon SQS) 队列,而不是直接发送到 Lambda 函数。更新 Lambda 函数以使用队列中的消息并处理请求。设置队列以在新消息到达时调用 Lambda 函数。
B. Configure provisioned concurrency for each Lambda function. Use AWS Application Auto Scaling to register the Lambda functions as targets. Set up scaling schedules to increase and decrease capacity to match changes in API usage.
中文翻译:
为每个 Lambda 函数配置预配置并发。使用 AWS Application Auto Scaling 将 Lambda 函数注册为目标。设置扩展计划以增加和减少容量以匹配 API 使用情况的变化。
C. Create an API Gateway API key and an AWS WAF Regional web ACL. Associate the web ACL with the Production stage. Add a rate-based rule to the web ACL. In the rule, specify the rate limit and a custom request aggregation that uses the X-API-Key header. Share the API key with the external development team.
中文翻译:
创建 API Gateway API 密钥和 AWS WAF 区域 Web ACL。将 Web ACL 与生产阶段关联。将基于速率的规则添加到 Web ACL。在规则中,指定速率限制和使用 X-API-Key 标头的自定义请求聚合。与外部开发团队共享 API 密钥。
D. Create an API Gateway API Key and usage plan. Define throttling limits and quotas in the usage plan. Associate the usage plan with the Production stage and the API key. Share the API key with the external development team.
中文翻译:
创建 API 网关 API 密钥和使用计划。在使用计划中定义限制和配额。将使用计划与生产阶段和 API 密钥相关联。与外部开发团队共享 API 密钥。
答案
D
解析
正确答案:D 解析: 本题应选择 D。 正确选项: D. 创建 API 网关 API 密钥和使用计划。在使用计划中定义限制和配额。将使用计划与生产阶段和 API 密钥相关联。与外部开发团队共享 API 密钥。 选择理由: 该选项最直接地满足题干中的关键约束。做 SAP-C02 题目时,需要同时对照题干里的限定词,例如最高性能、最低运维开销、成本效益、可靠性、可扩展性、安全性、RTO/RPO、合规要求等。本题相关考点主要包括:API Ga...