Which solution will meet these requirements?
Use AWS CodeBuild to test the application. Use bash scripts invoked by AWS CodeDeploy’s appspec.yml file to restart services, and deregister and register instances with the ALB. Use the appspec.yml file to update file permissions without a custom script.
Use AWS CodePipeline to move the application from the AWS CodeCommit repository to AWS CodeDeploy. Use CodeDeploy’s deployment group to test the application, unregister and re-register instances with the ALand restart services. Use the appspec.yml file to update file permissions without a custom script.
Use AWS CodePipeline to move the application source code from the AWS CodeCommit repository to AWS CodeDeploy. Use CodeDeploy to test the application. Use CodeDeploy’s appspec.yml file to restart services and update permissions without a custom script. Use AWS CodeBuild to unregister and re-register instances with the ALB.
Use AWS CodePipeline to trigger AWS CodeBuild to test the application. Use bash scripts invoked by AWS CodeDeploy’s appspec.yml file to restart services. Unregister and re-register the instances in the AWS CodeDeploy deployment group with the ALB. Update the appspec.yml file to update file permissions without a custom script.
Explanations:
This option correctly uses AWS CodeBuild for testing and bash scripts within CodeDeploy’s appspec.yml file for service management and updating file permissions. However, it lacks a clear approach for unregistering and re-registering instances with the ALB, which is critical for the deployment process.
This option suggests using CodePipeline to move the application to CodeDeploy and uses the deployment group for testing and service management. However, CodeDeploy does not inherently support unit testing or deregistering/re-registering instances with the ALB. Additionally, using the appspec.yml file alone to update file permissions without scripts is insufficient for managing service restarts effectively.
This option involves using CodePipeline and CodeDeploy but incorrectly states that CodeDeploy can test the application directly and manage the unregistering/re-registering of instances with the ALB. CodeDeploy does not natively perform testing or manage ALB registrations; this would typically require custom scripting or integration with other services like Lambda.
This option utilizes AWS CodePipeline to trigger CodeBuild for application testing, followed by AWS CodeDeploy to handle deployment. It also employs bash scripts within the appspec.yml file to manage service restarts and correctly specifies the use of the appspec.yml file for updating file permissions. Unregistering and re-registering instances with the ALB is acknowledged as part of the CodeDeploy process, which aligns well with maintaining existing functionality.