nerdexam
AmazonAmazon

DOP-C02 · Question #171

DOP-C02 Question #171: Real Exam Question with Answer & Explanation

The correct answer is A: Create an AWS CodeCommit repository for each project, use the main branch for production. Explanation Option A is correct because AWS CodeCommit is a fully managed source control service that natively handles multiple developers, branching, and merge conflict resolution - directly addressing the core concerns of code conflicts and lost work. Using the main branch for

Submitted by emma.c· Mar 6, 2026SDLC Automation

Question

A company has a single developer writing code for an automated deployment pipeline. The developer is storing source code in an Amazon S3 bucket for each project. The company wants to add more developers to the team but is concerned about code conflicts and lost work. The company also wants to build a test environment to deploy newer versions of code for testing and allow developers to automatically deploy to both environments when code is changed in the repository. What is the MOST efficient way to meet these requirements?

Options

  • ACreate an AWS CodeCommit repository for each project, use the main branch for production
  • BCreate another S3 bucket for each project for testing code, and use an AWS Lambda function to
  • CCreate an AWS CodeCommit repository for each project, and use the main branch for production
  • DEnable versioning and branching on each S3 bucket, use the main branch for production code,

Explanation

Explanation

Option A is correct because AWS CodeCommit is a fully managed source control service that natively handles multiple developers, branching, and merge conflict resolution - directly addressing the core concerns of code conflicts and lost work. Using the main branch for production and a separate branch for testing, combined with AWS CodePipeline, allows automatic deployments to both environments whenever code changes are committed.

Option B is wrong because using S3 buckets as a source control system is an anti-pattern; S3 has no native branching, merging, or conflict resolution capabilities, and Lambda would add unnecessary complexity without solving the fundamental version control problem.

Option C is a distractor that appears nearly identical to A - the key difference is that C likely omits the automated pipeline integration (CodePipeline/CodeDeploy) needed to satisfy the automatic deployment requirement across both environments.

Option D is wrong because S3 versioning is designed for object-level file versioning, not source code branching or collaboration - it has no concept of "branches" for code, making it unsuitable for multi-developer workflows.

🧠 Memory Tip: Think "Code problems need Code tools" - whenever a question involves source control, developer collaboration, or branching, AWS CodeCommit is the purpose-built answer. S3 is for storage, not source control.

Topics

#Source Control#AWS CodeCommit#Version Control#Developer Collaboration

Community Discussion

No community discussion yet for this question.

Full DOP-C02 PracticeBrowse All DOP-C02 Questions