SAP-C02 第 251 题
题目
A company is creating a REST API to share information with six of its partners based in the United States. The company has created an Amazon API Gateway Regional endpoint. Each of the six partners will access the API once per day to post daily sales figures. After initial deployment, the company observes 1,000 requests per second originating from 500 different IP addresses around the world. The company believes this traffic is originating from a botnet and wants to secure its API while minimizing cost. Which approach should the company take to secure its API?
中文翻译:
一家公司正在创建 REST API,以便与位于美国的六个合作伙伴共享信息。该公司创建了一个 Amazon API Gateway 区域终端节点。六个合作伙伴中的每一个每天都会访问 API 一次,以发布每日销售数据。初始部署后,该公司观察到每秒来自全球 500 个不同 IP 地址的 1,000 个请求。该公司认为此流量源自僵尸网络,并希望保护其 API,同时最大限度地降低成本。公司应采取哪种方法来保护其 API 安全?
选项
A. Create an Amazon CloudFront distribution with the API as the origin. Create an AWS WAF web ACL with a rule to block clients that submit more than five requests per day. Associate the web ACL with the CloudFront distribution. Configure CloudFront with an origin access identity (OAI) and associate it with the distribution. Configure API Gateway to ensure only the OAI can run the POST method.
中文翻译:
以 API 作为源创建 Amazon CloudFront 分配。创建一个 AWS WAF Web ACL,其中包含阻止每天提交超过 5 个请求的客户端的规则。将 Web ACL 与 CloudFront 分配关联。使用源访问身份 (OAI) 配置 CloudFront 并将其与分配关联。配置 API Gateway 以确保只有 OAI 可以运行 POST 方法。
B. Create an Amazon CloudFront distribution with the API as the origin. Create an AWS WAF web ACL with a rule to block clients that submit more than five requests per day. Associate the web ACL with the CloudFront distribution. Add a custom header to the CloudFront distribution populated with an API key. Configure the API to require an API key on the POST method.
中文翻译:
以 API 作为源创建 Amazon CloudFront 分配。创建一个 AWS WAF Web ACL,其中包含阻止每天提交超过 5 个请求的客户端的规则。将 Web ACL 与 CloudFront 分配关联。将自定义标头添加到填充有 API 密钥的 CloudFront 分配。将 API 配置为在 POST 方法上需要 API 密钥。
C. Create an AWS WAF web ACL with a rule to allow access to the IP addresses used by the six partners. Associate the web ACL with the API. Create a resource policy with a request limit and associate it with the API. Configure the API to require an API key on the POST method.
中文翻译:
创建一个 AWS WAF Web ACL,其中包含允许访问六个合作伙伴使用的 IP 地址的规则。将 Web ACL 与 API 关联。创建具有请求限制的资源策略并将其与 API 关联。将 API 配置为在 POST 方法上需要 API 密钥。
D. Create an AWS WAF web ACL with a rule to allow access to the IP addresses used by the six partners. Associate the web ACL with the API. Create a usage plan with a request limit and associate it with the API. Create an API key and add it to the usage plan.
中文翻译:
创建一个 AWS WAF Web ACL,其中包含允许访问六个合作伙伴使用的 IP 地址的规则。将 Web ACL 与 API 关联。创建具有请求限制的使用计划并将其与 API 关联。创建 API 密钥并将其添加到使用计划中。
答案
D
解析
正确答案:D 解析: 本题应选择 D。 正确选项: D. 创建一个 AWS WAF Web ACL,其中包含允许访问六个合作伙伴使用的 IP 地址的规则。将 Web ACL 与 API 关联。创建具有请求限制的使用计划并将其与 API 关联。创建 API 密钥并将其添加到使用计划中。 选择理由: 该选项最直接地满足题干中的关键约束。做 SAP-C02 题目时,需要同时对照题干里的限定词,例如最高性能、最低运维开销、成本效益、可靠性、可扩...