SAP-C02 第 218 题
题目
A company is running an application in the AWS Cloud. The application consists of microservices that run on a fleet of Amazon EC2 instances in multiple Availability Zones behind an Application Load Balancer. The company recently added a new REST API that was implemented in Amazon API Gateway. Some of the older microservices that run on EC2 instances need to call this new API. The company does not want the API to be accessible from the public internet and does not want proprietary data to traverse the public internet. What should a solutions architect do to meet these requirements?
中文翻译:
一家公司正在 AWS 云中运行应用程序。该应用程序由微服务组成,这些微服务在应用程序负载均衡器后面的多个可用区中的一组 Amazon EC2 实例上运行。该公司最近添加了一个在 Amazon API Gateway 中实施的新 REST API。一些在 EC2 实例上运行的旧微服务需要调用这个新 API。该公司不希望可以从公共互联网访问 API,也不希望专有数据遍历公共互联网。解决方案架构师应该怎样做才能满足这些要求?
选项
A. Create an AWS Site-to-Site VPN connection between the VPC and the API Gateway. Use API Gateway to generate a unique API Key for each microservice. Configure the API methods to require the key.
中文翻译:
在 VPC 和 API 网关之间创建 AWS 站点到站点 VPN 连接。使用 API Gateway 为每个微服务生成唯一的 API Key。配置 API 方法以需要密钥。
B. Create an interface VPC endpoint for API Gateway, and set an endpoint policy to only allow access to the specific API. Add a resource policy to API Gateway to only allow access from the VPC endpoint. Change the API Gateway endpoint type to private.
中文翻译:
为 API Gateway 创建接口 VPC 终端节点,并设置终端节点策略仅允许访问特定 API。向 API Gateway 添加资源策略,仅允许来自 VPC 终端节点的访问。将 API 网关端点类型更改为私有。
C. Modify the API Gateway to use IAM authentication. Update the IAM policy for the IAM role that is assigned to the EC2 instances to allow access to the API Gateway. Move the API Gateway into a new VPDeploy a transit gateway and connect the VPCs.
中文翻译:
修改 API 网关以使用 IAM 身份验证。更新分配给 EC2 实例的 IAM 角色的 IAM 策略以允许访问 API Gateway。将 API 网关移至新的 VP 部署中转网关并连接 VPC。
D. Create an accelerator in AWS Global Accelerator, and connect the accelerator to the API Gateway. Update the route table for all VPC subnets with a route to the created Global Accelerator endpoint IP address. Add an API key for each service to use for authentication.
中文翻译:
在 AWS Global Accelerator 中创建加速器,并将加速器连接到 API Gateway。使用到创建的 Global Accelerator 终端节点 IP 地址的路由更新所有 VPC 子网的路由表。为每个服务添加一个 API 密钥以用于身份验证。
答案
B
解析
正确答案:B 解析: 本题应选择 B。 正确选项: B. 为 API Gateway 创建接口 VPC 终端节点,并设置终端节点策略仅允许访问特定 API。向 API Gateway 添加资源策略,仅允许来自 VPC 终端节点的访问。将 API 网关端点类型更改为私有。 选择理由: 该选项最直接地满足题干中的关键约束。做 SAP-C02 题目时,需要同时对照题干里的限定词,例如最高性能、最低运维开销、成本效益、可靠性、可扩展性、安全性、...