SAP-C02 第 267 题
题目
A company has an application that runs on Amazon EC2 instances in an Amazon EC2 Auto Scaling group. The company uses AWS CodePipeline to deploy the application. The instances that run in the Auto Scaling group are constantly changing because of scaling events. When the company deploys new application code versions, the company installs the AWS CodeDeploy agent on any new target EC2 instances and associates the instances with the CodeDeploy deployment group. The application is set to go live within the next 24 hours. What should a solutions architect recommend to automate the application deployment process with the LEAST amount of operational overhead?
中文翻译:
一家公司有一个在 Amazon EC2 Auto Scaling 组中的 Amazon EC2 实例上运行的应用程序。该公司使用 AWS CodePipeline 来部署应用程序。 Auto Scaling 组中运行的实例会因伸缩事件而不断变化。当公司部署新的应用程序代码版本时,公司会在任何新的目标 EC2 实例上安装 AWS CodeDeploy 代理,并将这些实例与 CodeDeploy 部署组关联。该应用程序将在未来 24 小时内上线。解决方案架构师应该建议什么来以最少的运营开销实现应用程序部署过程的自动化?
选项
A. Configure Amazon EventBridge to invoke an AWS Lambda function when a new EC2 instance is launched into the Auto Scaling group. Code the Lambda function to associate the EC2 instances with the CodeDeploy deployment group.
中文翻译:
配置 Amazon EventBridge 以在 Auto Scaling 组中启动新的 EC2 实例时调用 AWS Lambda 函数。对 Lambda 函数进行编码以将 EC2 实例与 CodeDeploy 部署组关联。
B. Write a script to suspend Amazon EC2 Auto Scaling operations before the deployment of new code. When the deployment is complete, create a new AMI and configure the Auto Scaling group's launch template to use the new AMI for new launches. Resume Amazon EC2 Auto Scaling operations.
中文翻译:
编写一个脚本以在部署新代码之前暂停 Amazon EC2 Auto Scaling 操作。部署完成后,创建新的 AMI 并配置 Auto Scaling 组的启动模板以使用新的 AMI 进行新启动。恢复 Amazon EC2 Auto Scaling 操作。
C. Create a new AWS CodeBuild project that creates a new AMI that contains the new code. Configure CodeBuild to update the Auto Scaling group’s launch template to the new AMI. Run an Amazon EC2 Auto Scaling instance refresh operation.
中文翻译:
创建一个新的 AWS CodeBuild 项目,该项目将创建包含新代码的新 AMI。配置 CodeBuild 以将 Auto Scaling 组的启动模板更新为新的 AMI。运行 Amazon EC2 Auto Scaling 实例刷新操作。
D. Create a new AMI that has the CodeDeploy agent installed. Configure the Auto Scaling group’s launch template to use the new AMI. Associate the CodeDeploy deployment group with the Auto Scaling group instead of the EC2 instances.
中文翻译:
创建安装了 CodeDeploy 代理的新 AMI。配置 Auto Scaling 组的启动模板以使用新的 AMI。将 CodeDeploy 部署组与 Auto Scaling 组(而不是 EC2 实例)关联。
答案
D
解析
正确答案:D 解析: 本题应选择 D。 正确选项: D. 创建安装了 CodeDeploy 代理的新 AMI。配置 Auto Scaling 组的启动模板以使用新的 AMI。将 CodeDeploy 部署组与 Auto Scaling 组(而不是 EC2 实例)关联。 选择理由: 该选项最直接地满足题干中的关键约束。做 SAP-C02 题目时,需要同时对照题干里的限定词,例如最高性能、最低运维开销、成本效益、可靠性、可扩展性、安全性、R...