What should a DevOps engineer do to meet these requirements?
Create one AWS CodeCommit repository for all applications. Put each application’s code in a different branch. Merge the branches, and use AWS CodeBuild to build the applications. Use AWS CodeDeploy to deploy the applications to one centralized application server.
Create one AWS CodeCommit repository for each of the applications. Use AWS CodeBuild to build the applications one at a time. Use AWS CodeDeploy to deploy the applications to one centralized application server.
Create one AWS CodeCommit repository for each of the applications. Use AWS CodeBuild to build the applications one at a time and to create one AMI for each server. Use AWS CloudFormation StackSets to automatically provision and decommission Amazon EC2 fleets by using these AMIs.
Create one AWS CodeCommit repository for each of the applications. Use AWS CodeBuild to build one Docker image for each application in Amazon Elastic Container Registry (Amazon ECR). Use AWS CodeDeploy to deploy the applications to Amazon Elastic Container Service (Amazon ECS) on infrastructure that AWS Fargate manages.
Explanations:
Using one repository with multiple branches for different applications complicates management and merges. This setup does not leverage best practices for CI/CD, as deploying to a single server creates a single point of failure and doesn’t scale well for multiple applications.
Although creating separate repositories for each application is a better approach, building and deploying them one at a time could lead to inefficiencies and longer deployment times. Centralizing deployment to a single server is also not ideal for scalability and reliability.
While this option suggests separate repositories and building AMIs, it still relies on Amazon EC2 fleets, which require significant management overhead. It does not leverage modern containerization or orchestration practices that reduce infrastructure maintenance.
This option correctly separates applications into individual repositories, utilizes Docker for consistent builds, and leverages Amazon ECS with AWS Fargate for deployment, minimizing infrastructure management. This approach supports microservices architecture, enabling scalability and efficiency.