SAP-C02 学习助手

SAP-C02 第 5 题

API Gateway Lambda CloudFront Config

题目

A company uses a service to collect metadata from applications that the company hosts on premises. Consumer devices such as TVs and internet radios access the applications. Many older devices do not support certain HTTP headers and exhibit errors when these headers are present in responses. The company has configured an on-premises load balancer to remove the unsupported headers from responses sent to older devices, which the company identified by the User-Agent headers. The company wants to migrate the service to AWS, adopt serverless technologies, and retain the ability to support the older devices. The company has already migrated the applications into a set of AWS Lambda functions. Which solution will meet these requirements?

中文翻译:
公司使用服务从公司本地托管的应用程序收集元数据。电视和网络收音机等消费设备可以访问这些应用程序。许多旧设备不支持某些 HTTP 标头,并且当这些标头出现在响应中时会出现错误。该公司已配置本地负载均衡器,以从发送到旧设备的响应中删除不受支持的标头,该公司通过用户代理标头识别这些标头。该公司希望将服务迁移到 AWS,采用无服务器技术,并保留支持旧设备的能力。该公司已经将应用程序迁移到一组 AWS Lambda 函数中。哪种解决方案可以满足这些要求?

选项

A. Create an Amazon CloudFront distribution for the metadata service. Create an Application Load Balancer (ALB). Configure the CloudFront distribution to forward requests to the ALB. Configure the ALB to invoke the correct Lambda function for each type of request. Create a CloudFront function to remove the problematic headers based on the value of the User-Agent header.

中文翻译:
为元数据服务创建 Amazon CloudFront 分配。创建应用程序负载均衡器 (ALB)。配置 CloudFront 分配以将请求转发到 ALB。配置 ALB 以针对每种类型的请求调用正确的 Lambda 函数。创建一个 CloudFront 函数,以根据 User-Agent 标头的值删除有问题的标头。

B. Create an Amazon API Gateway REST API for the metadata service. Configure API Gateway to invoke the correct Lambda function for each type of request. Modify the default gateway responses to remove the problematic headers based on the value of the User-Agent header.

中文翻译:
为元数据服务创建 Amazon API Gateway REST API。配置 API Gateway 为每种类型的请求调用正确的 Lambda 函数。修改默认网关响应以根据 User-Agent 标头的值删除有问题的标头。

C. Create an Amazon API Gateway HTTP API for the metadata service. Configure API Gateway to invoke the correct Lambda function for each type of request. Create a response mapping template to remove the problematic headers based on the value of the User-Agent. Associate the response data mapping with the HTTP API.

中文翻译:
为元数据服务创建 Amazon API Gateway HTTP API。配置 API Gateway 为每种类型的请求调用正确的 Lambda 函数。创建响应映射模板以根据用户代理的值删除有问题的标头。将响应数据映射与 HTTP API 关联。

D. Create an Amazon CloudFront distribution for the metadata service. Create an Application Load Balancer (ALB). Configure the CloudFront distribution to forward requests to the ALB. Configure the ALB to invoke the correct Lambda function for each type of request. Create a Lambda@Edge function that will remove the problematic headers in response to viewer requests based on the value of the User-Agent header.

中文翻译:
为元数据服务创建 Amazon CloudFront 分配。创建应用程序负载均衡器 (ALB)。配置 CloudFront 分配以将请求转发到 ALB。配置 ALB 以针对每种类型的请求调用正确的 Lambda 函数。创建一个 Lambda@Edge 函数,该函数将根据 User-Agent 标头的值删除有问题的标头,以响应查看器请求。

答案

A

解析

正确答案:A 解析: 本题应选择 A。 正确选项: A. 为元数据服务创建 Amazon CloudFront 分配。创建应用程序负载均衡器 (ALB)。配置 CloudFront 分配以将请求转发到 ALB。配置 ALB 以针对每种类型的请求调用正确的 Lambda 函数。创建一个 CloudFront 函数,以根据 User-Agent 标头的值删除有问题的标头。 选择理由: 该选项最直接地满足题干中的关键约束。做 SAP-C02 ...

登录后查看完整解析