What should the Solution Architect do to meet these requirements?
Use AWS CodePipeline to create a change set from the CloudFormation templates stored in the private GitHub repository. Execute the change set using AWS CodeDeploy. Include a CodePipeline action to test the deployment with testing scripts run by AWS CodeBuild.
Mirror the GitHub repository to AWS CodeCommit using AWS Lambda. Use AWS CodeDeploy to create a change set from the CloudFormation templates and execute it. Have CodeDeploy test the deployment with testing scripts run by AWS CodeBuild.
Use AWS CodePipeline to create and execute a change set from the CloudFormation templates stored in the GitHub repository. Configure a CodePipeline action to be deployment with testing scripts run by AWS CodeBuild.
Mirror the GitHub repository to AWS CodeCommit using AWS Lambda. Use AWS CodeBuild to create a change set from the CloudFormation templates and execute it. Have CodeBuild test the deployment with testing scripts.
Explanations:
AWS CodePipeline can be used to automate deployments, but using AWS CodeDeploy to execute a CloudFormation change set is not the best choice. CodeDeploy is for application deployment, not for managing CloudFormation templates directly. The testing scripts should be executed by AWS CodeBuild, but the overall approach is not ideal.
While mirroring the GitHub repository to AWS CodeCommit is possible using AWS Lambda, using AWS CodeDeploy to manage CloudFormation change sets and testing is incorrect. CodeDeploy is not designed to directly manage CloudFormation stacks or to run change set tests.
AWS CodePipeline is designed for continuous integration and delivery (CI/CD). It can create and execute a CloudFormation change set directly from the templates in GitHub. Additionally, CodePipeline can integrate with AWS CodeBuild to run testing scripts as part of the deployment process. This option follows best practices.
Mirroring the GitHub repository to AWS CodeCommit using AWS Lambda is unnecessary and adds complexity. While AWS CodeBuild can create and execute a change set, it’s more efficient to use CodePipeline for automating the entire process (including testing). Additionally, CodeBuild alone is not sufficient for orchestrating the end-to-end deployment pipeline.