exam questions

Exam AWS Certified DevOps Engineer - Professional DOP-C02 All Questions

View all questions & answers for the AWS Certified DevOps Engineer - Professional DOP-C02 exam

Exam AWS Certified DevOps Engineer - Professional DOP-C02 topic 1 question 135 discussion

A company is examining its disaster recovery capability and wants the ability to switch over its daily operations to a secondary AWS Region. The company uses AWS CodeCommit as a source control tool in the primary Region.

A DevOps engineer must provide the capability for the company to develop code in the secondary Region. If the company needs to use the secondary Region, developers can add an additional remote URL to their local Git configuration.

Which solution will meet these requirements?

  • A. Create a CodeCommit repository in the secondary Region. Create an AWS CodeBuild project to perform a Git mirror operation of the primary Region's CodeCommit repository to the secondary Region's CodeCommit repository. Create an AWS Lambda function that invokes the CodeBuild project. Create an Amazon EventBridge rule that reacts to merge events in the primary Region's CodeCommit repository. Configure the EventBridge rule to invoke the Lambda function.
  • B. Create an Amazon S3 bucket in the secondary Region. Create an AWS Fargate task to perform a Git mirror operation of the primary Region's CodeCommit repository and copy the result to the S3 bucket. Create an AWS Lambda function that initiates the Fargate task. Create an Amazon EventBridge rule that reacts to merge events in the CodeCommit repository. Configure the EventBridge rule to invoke the Lambda function.
  • C. Create an AWS CodeArtifact repository in the secondary Region. Create an AWS CodePipeline pipeline that uses the primary Region’s CodeCommit repository for the source action. Create a cross-Region stage in the pipeline that packages the CodeCommit repository contents and stores the contents in the CodeArtifact repository when a pull request is merged into the CodeCommit repository.
  • D. Create an AWS Cloud9 environment and a CodeCommit repository in the secondary Region. Configure the primary Region's CodeCommit repository as a remote repository in the AWS Cloud9 environment. Connect the secondary Region's CodeCommit repository to the AWS Cloud9 environment.
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
GripZA
1 week, 6 days ago
Selected Answer: A
the goal is to enable code development in a secondary Region in case of a failover. [A] provides: - a mirrored CodeCommit repo in the secondary Region. - automated sync via Git mirroring (a Git feature that fully syncs repositories). - automation through CodeBuild, Lambda, and EventBridge to keep the secondary repo up to date. Developers can simply add the secondary repo as a remote (git remote add backup URL) and push/pull as needed problem with D: - cloud9 is a development env (IDE), not a repository mirroring solution - having both repos in the Cloud9 env doesn’t keep them synchronized automatically. This doesn’t scale or allow other devs to use the secondary repo unless they also set up custom workflows
upvoted 1 times
...
zijo
10 months ago
Why is not D a solution? If the developers in the secondary region can configure primary region's codecommit repository as a remote repository in the AWS Cloud9 environment they can do development and do all git functions remote.
upvoted 1 times
...
Gomer
10 months, 2 weeks ago
A: (NO) "Create an AWS CodeBuild project to perform a Git mirror operation of the primary Region's CodeCommit repository to the secondary Region's CodeCommit repository." CodeBuild doesn't have the ability to do a "git mirror" operation itself. All online examples have CodeCommit actions calling Lambda (directly or through EventWatch) which calls fargate (or EC2) which does the actual git mirror A: (NO) "Create an AWS Lambda function that invokes the CodeBuild project. The is exactly the reverse from online examples B: (NO) "Create an AWS Fargate task to perform a Git mirror operation of the primary Region's CodeCommit repository and copy the result to the S3 bucket." Does it really make sense to use a "git" mirror operations copy from a CodeCommit repo to an S3 bucket? All online examples using "git" "mirror" have CodeCommit repo as remote target.
upvoted 1 times
Gomer
10 months, 2 weeks ago
The specific requirement here isn't "disaster recovery capability" and "ability to switch over its daily operations to a secondary AWS Region." That is just being investigated. The specific requirement is to "provide the capability for the company to develop code in the secondary Region." "If the company needs to use the secondary Region, developers can add an additional remote URL to their local Git configuration." To me this sounds to like the specific requirement here is only to provide developers with a complete remote development environment (not to provide a DR solution) If that is true, then using Cloud9 web development environment (includes git, etc.) with same local CodeCommit repo is acceptiable I'm not a developer, but the specific criteria wording and logic make me lean towards "C"
upvoted 1 times
Gomer
10 months, 2 weeks ago
Actually, I meant to say I lean towards "D" (using Cloud9 as remote development environment)
upvoted 2 times
Gomer
10 months, 2 weeks ago
Also want to add that "D" would would work fine if you presume that the "git" "mirror" is also being done (though additional undefined step in the solution). Nothing says "D" is the complete solution. The ONLY requirement here is to provide developers a remote environment to develop in.
upvoted 1 times
...
...
...
Gomer
10 months, 2 weeks ago
Flow: AWS Example: CodeCommit(action) ----------------> Lambda -> Fargate task ("git clone --mirror" local repo, "git remote set-url --push origin" destination repo) -> CodeCommit(remote repo) Solution "B": CodeCommit(action) -> EventBridge -> Lambda -> Fargate task ("git clone --mirror" local repo, "git remote set-url --push origin" destination repo) -> S3(remote bucket) References: https://aws.amazon.com/blogs/devops/replicate-aws-codecommit-repository-between-regions-using-aws-fargate/ https://aws.amazon.com/cloud9/
upvoted 2 times
...
...
thanhnv142
1 year, 2 months ago
A is correct: <A DevOps engineer must provide the capability for the company to develop code in the secondary Region> means code commit
upvoted 3 times
thanhnv142
1 year, 2 months ago
A is correct: < develop code in the secondary Region>: code commit cannot automatically clone cross-region.Must use a tool to do this duplication task B: Using S3 as a secondary repo is incorrect C and D: no mention of using codecommit as the secondary repo
upvoted 2 times
...
...
yuliaqwerty
1 year, 3 months ago
Selected Answer: A
Agree answer is A
upvoted 2 times
...
svjl
1 year, 4 months ago
B- It does the replication out of the box and meets the requirements https://aws.amazon.com/blogs/devops/replicate-aws-codecommit-repository-between-regions-using-aws-fargate/
upvoted 2 times
bnagaraja9099
1 year, 4 months ago
This part of B is incorrect. - It should use Code commit instead of S3. "Create an AWS Fargate task to perform a Git mirror operation of the primary Region's CodeCommit repository and copy the result to the S3 bucket. "
upvoted 1 times
...
...
vandergun
1 year, 5 months ago
Selected Answer: A
A is at least operation and cost
upvoted 2 times
...
Dushank
1 year, 7 months ago
Selected Answer: A
This solution meets all of the company's requirements: It allows developers to add an additional remote URL to their local Git configuration to develop code in the secondary Region. It is automated: the EventBridge rule will automatically invoke the Lambda function whenever a merge event occurs in the primary Region's CodeCommit repository. It is reliable: the CodeBuild project will use Git to ensure that a perfect copy of the primary Region's CodeCommit repository is created in the secondary Region.
upvoted 4 times
...
RVivek
1 year, 7 months ago
Selected Answer: A
https://dev.to/apatil88/replicate-aws-codecommit-repositories-between-regions-using-codebuild-and-codepipeline-5fh1
upvoted 4 times
...
ixdb
1 year, 8 months ago
Selected Answer: B
B is right. https://aws.amazon.com/cn/blogs/devops/replicate-aws-codecommit-repository-between-regions-using-aws-fargate/
upvoted 2 times
zendevloper
1 year, 7 months ago
B is wrong because it uses S3. Developers need a valid git remote URL. Correct answer is A
upvoted 3 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago