SAP-C02 第 344 题
题目
A company is using AWS CodePipeline for the CI/CD of an application to an Amazon EC2 Auto Scaling group. All AWS resources are defined in AWS CloudFormation templates. The application artifacts are stored in an Amazon S3 bucket and deployed to the Auto Scaling group using instance user data scripts. As the application has become more complex, recent resource changes in the CloudFormation templates have caused unplanned downtime. How should a solutions architect improve the CI/CD pipeline to reduce the likelihood that changes in the templates will cause downtime?
中文翻译:
一家公司正在使用 AWS CodePipeline 将应用程序 CI/CD 发送到 Amazon EC2 Auto Scaling 组。所有 AWS 资源均在 AWS CloudFormation 模板中定义。应用程序项目存储在 Amazon S3 存储桶中,并使用实例用户数据脚本部署到 Auto Scaling 组。随着应用程序变得更加复杂,CloudFormation 模板中最近的资源更改导致了计划外停机。解决方案架构师应如何改进 CI/CD 管道,以减少模板更改导致停机的可能性?
选项
A. Adapt the deployment scripts to detect and report CloudFormation error conditions when performing deployments. Write test plans for a testing team to run in a non-production environment before approving the change for production.
中文翻译:
调整部署脚本以在执行部署时检测并报告 CloudFormation 错误情况。在批准生产更改之前,为测试团队编写测试计划以在非生产环境中运行。
B. Implement automated testing using AWS CodeBuild in a test environment. Use CloudFormation change sets to evaluate changes before deployment. Use AWS CodeDeploy to leverage blue/green deployment patterns to allow evaluations and the ability to revert changes, if needed.
中文翻译:
在测试环境中使用 AWS CodeBuild 实施自动化测试。在部署之前使用 CloudFormation 更改集评估更改。使用 AWS CodeDeploy 来利用蓝/绿部署模式来进行评估并能够在需要时恢复更改。
C. Use plugins for the integrated development environment (IDE) to check the templates for errors, and use the AWS CLI to validate that the templates are correct. Adapt the deployment code to check for error conditions and generate notifications on errors. Deploy to a test environment and run a manual test plan before approving the change for production.
中文翻译:
使用集成开发环境 (IDE) 的插件检查模板是否有错误,并使用 AWS CLI 验证模板是否正确。调整部署代码以检查错误情况并生成错误通知。在批准生产更改之前,部署到测试环境并运行手动测试计划。
D. Use AWS CodeDeploy and a blue/green deployment pattern with CloudFormation to replace the user data deployment scripts. Have the operators log in to running instances and go through a manual test plan to verify the application is running as expected.
中文翻译:
将 AWS CodeDeploy 和蓝/绿部署模式与 CloudFormation 结合使用来替换用户数据部署脚本。让操作员登录到正在运行的实例并执行手动测试计划以验证应用程序是否按预期运行。
答案
B
解析
正确答案:B 解析: 本题应选择 B。 正确选项: B. 在测试环境中使用 AWS CodeBuild 实施自动化测试。在部署之前使用 CloudFormation 更改集评估更改。使用 AWS CodeDeploy 来利用蓝/绿部署模式来进行评估并能够在需要时恢复更改。 选择理由: 该选项最直接地满足题干中的关键约束。做 SAP-C02 题目时,需要同时对照题干里的限定词,例如最高性能、最低运维开销、成本效益、可靠性、可扩展性、安全性...