1. Which AWS service provides cloud-hosted source control with branching, merging, and enhanced security?
An organization wants a managed AWS repository for source control. Choose the best option: A. AWS Snapshots; B. AWS CodeCommit; C. Amazon EFS; D. Amazon S3 with versioning enabled.
At a high level, the organization needs managed source control inside AWS. The key requirement is real Git support for branches, merges, pull requests, and version history. I would explain the answer through developer access, the repository workflow, and optional CI/CD integration. The best choice is B, AWS CodeCommit. IAM controls who can access repositories, KMS protects stored data, and AWS developer tools can use the repositories. The main downside is that IAM permissions still need careful management.
The organization needs a managed place in AWS where developers can safely keep and change source code. The main challenge is that normal file storage is not enough. The service must understand Git work such as branches, merges, pull requests, and version history. The diagram answers this with AWS CodeCommit. Developers connect using normal Git operations. IAM controls access before requests reach CodeCommit. KMS protects stored repository data. CodeCommit can also connect to AWS CodePipeline, AWS CodeBuild, and AWS CodeDeploy for later delivery work.
- Do developers need both HTTPS and SSH Git access?
- Should different teams have different repository permissions?
- Do we also need the AWS CI/CD tools shown in the diagram?
I would start by saying that this problem needs source control, not just file storage. AWS CodeCommit is shown as the managed Git-based source-control service. It provides private Git repositories and the Git features required by the question.
The important capabilities are branching, merging, pull requests, and version history. Those features let teams work on separate changes, review them, combine approved work, and keep a history of earlier versions. That is why the best answer is B, AWS CodeCommit.
For the main access path, developers use Git over HTTPS or SSH. The diagram shows common actions such as clone, pull, fetch, push, branch, and merge.
AWS Identity and Access Management, or IAM, sits on this path. IAM authenticates a user or system, which means it checks who is making the request. IAM also authorizes the request, which means it controls what that identity may do. After access is allowed, the Git request reaches CodeCommit.
CodeCommit manages the private repositories shown as Repo A, Repo B, and Repo C. Developers can create branches for separate work and later merge approved changes.
Pull requests support review before changes are merged. Version history keeps the sequence of Git changes. These features are part of the repository workflow rather than separate storage services.
The diagram combines IAM access control with AWS KMS encryption. KMS manages encryption keys used to protect repository data at rest. This adds protection beyond simply keeping files in a shared location.
The important idea is that IAM controls access while KMS protects stored data. The repository still remains the CodeCommit service shown in the center of the design.
The right side shows how CodeCommit can connect to AWS developer tools. AWS CodePipeline can use CodeCommit as a source stage. AWS CodeBuild can build, test, and package the code. AWS CodeDeploy or other services can then deploy the application to staging, production, or another target.
These integrations are useful, but they are not required to identify the correct answer. CodeCommit is the key service because it provides the managed Git repository itself.
The benefit is that AWS CodeCommit provides managed Git repositories without the team running its own source-control servers. IAM controls who may access repositories and which actions they may perform. KMS protects stored repository data with encryption. The service can also connect to CodePipeline, CodeBuild, and CodeDeploy. The downside is that access rules still need careful management. Permissions that are too broad weaken security. Permissions that are too strict can block normal developer work. We accept that extra permission-management work because it gives the team stronger control over repository access.
The interviewer wants to see whether you can match a cloud requirement to the correct service instead of choosing any storage product. A strong answer recognizes that source control needs Git features such as branches, merges, pull requests, and version history. It also shows that you understand IAM access control, encryption with KMS, and how source repositories can connect to CI/CD tools.









