SAP-C02 学习助手

SAP-C02 第 156 题

API Gateway Lambda S3 Config ECS Fargate

题目

A company is developing a new serverless API by using Amazon API Gateway and AWS Lambda. The company integrated the Lambda functions with API Gateway to use several shared libraries and custom classes. A solutions architect needs to simplify the deployment of the solution and optimize for code reuse. Which solution will meet these requirements?

中文翻译:
一家公司正在使用 Amazon API Gateway 和 AWS Lambda 开发新的无服务器 API。该公司将 Lambda 函数与 API Gateway 集成,以使用多个共享库和自定义类。解决方案架构师需要简化解决方案的部署并优化代码重用。哪种解决方案可以满足这些要求?

选项

A. Deploy the shared libraries and custom classes into a Docker image. Store the image in an S3 bucket. Create a Lambda layer that uses the Docker image as the source. Deploy the API's Lambda functions as Zip packages. Configure the packages to use the Lambda layer.

中文翻译:
将共享库和自定义类部署到 Docker 映像中。将图像存储在 S3 存储桶中。创建使用 Docker 映像作为源的 Lambda 层。将 API 的 Lambda 函数部署为 Zip 包。配置包以使用 Lambda 层。

B. Deploy the shared libraries and custom classes to a Docker image. Upload the image to Amazon Elastic Container Registry (Amazon ECR). Create a Lambda layer that uses the Docker image as the source. Deploy the API's Lambda functions as Zip packages. Configure the packages to use the Lambda layer.

中文翻译:
将共享库和自定义类部署到 Docker 映像。将映像上传到 Amazon Elastic Container Registry (Amazon ECR)。创建使用 Docker 映像作为源的 Lambda 层。将 API 的 Lambda 函数部署为 Zip 包。配置包以使用 Lambda 层。

C. Deploy the shared libraries and custom classes to a Docker container in Amazon Elastic Container Service (Amazon ECS) by using the AWS Fargate launch type. Deploy the API's Lambda functions as Zip packages. Configure the packages to use the deployed container as a Lambda layer.

中文翻译:
使用 AWS Fargate 启动类型将共享库和自定义类部署到 Amazon Elastic Container Service (Amazon ECS) 中的 Docker 容器。将 API 的 Lambda 函数部署为 Zip 包。配置包以使用已部署的容器作为 Lambda 层。

D. Deploy the shared libraries, custom classes, and code for the API's Lambda functions to a Docker image. Upload the image to Amazon Elastic Container Registry (Amazon ECR). Configure the API's Lambda functions to use the Docker image as the deployment package.

中文翻译:
将 API 的 Lambda 函数的共享库、自定义类和代码部署到 Docker 映像。将映像上传到 Amazon Elastic Container Registry (Amazon ECR)。配置 API 的 Lambda 函数以使用 Docker 映像作为部署包。

答案

D

解析

正确答案:D 解析: 本题应选择 D。 正确选项: D. 将 API 的 Lambda 函数的共享库、自定义类和代码部署到 Docker 映像。将映像上传到 Amazon Elastic Container Registry (Amazon ECR)。配置 API 的 Lambda 函数以使用 Docker 映像作为部署包。 选择理由: 该选项最直接地满足题干中的关键约束。做 SAP-C02 题目时,需要同时对照题干里的限定词,例如最高...

登录后查看完整解析