What should a DevOps engineer do to meet these requirements?
Create one AWS CodeCommit repository for all applications. Put each application’s code in 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 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:
Storing all application code in a single CodeCommit repository and using branches is not ideal for managing multiple applications, as it creates complexity in managing different deployment processes and dependencies. A centralized application server for all deployments also adds maintenance overhead and doesn’t align with AWS best practices for scalability and modularity.
While using separate CodeCommit repositories for each application is a better approach, deploying all applications to a single centralized server does not scale well and may increase maintenance tasks. This option also does not fully align with AWS’s recommended approach for decoupling applications and automating deployments in a scalable manner.
Using AWS CodeCommit repositories for each application and CodeBuild for building AMIs may be useful for some scenarios but is not the best fit for this use case. Managing AMIs for each application and provisioning EC2 fleets with CloudFormation StackSets adds unnecessary complexity and overhead, especially when using AWS Fargate or ECS would be more efficient.
This option follows AWS best practices by using separate CodeCommit repositories for each application, creating Docker images via CodeBuild, storing them in Amazon ECR, and deploying them to Amazon ECS using AWS Fargate. This approach provides centralized control, automates delivery, reduces infrastructure management, and scales well for multiple applications.