Migrating Source Code to AWS CodeCommit - Step-by-Step Guide

Migrating Source Code to AWS CodeCommit

Prev Question Next Question

Question

Your team is currently working on source code that's defined in a Subversion repository.

The company has just started using AWS tools for their CI/CD process and has now mandated that source code be migrated to AWS CodeCommit.

Which of the following steps would you perform to fulfill this requirement? Choose 2 answers from the options given below.

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

Answer - B and C.

The AWS Documentation mentions the following.

Migrate to AWS CodeCommit.

You can migrate a Git repository to an AWS CodeCommit repository in many ways: by cloning it, mirroring it, migrating all or just some of the branches, and so on.

You can also migrate local, unversioned content on your computer to AWS CodeCommit.

The following topics demonstrate some of the ways you can choose to migrate a repository.

Your steps may vary, depending on your repository type, style, or complexity and the decisions you make about what and how you want to migrate.

For very large repositories, you might want to consider migrating incrementally.

Note.

You can migrate to AWS CodeCommit from other version control systems, such as Perforce, Subversion, or TFS, but you will have to migrate to Git first.

Options A and D are incorrect since you need to migrate the repository to Git first.

For more information on migrating a repository, please refer to the below URL-

https://docs.aws.amazon.com/codecommit/latest/userguide/how-to-migrate-repository.html

In order to migrate source code from Subversion to AWS CodeCommit for the company's CI/CD process, the following steps can be performed:

  1. Migrate the code to a Git Repository first: As CodeCommit is a managed Git repository service, the first step is to migrate the code from Subversion to a Git repository. This can be done using a tool like git-svn, which allows for the migration of the complete Subversion repository history to Git.

  2. Migrate Git code to AWS CodeCommit: Once the code has been migrated to a Git repository, it can be migrated to AWS CodeCommit. This can be done by creating a new CodeCommit repository and pushing the Git code to the new repository.

Therefore, the correct answers are B and C.

Option A is not a recommended approach as it suggests directly migrating the Subversion repository to CodeCommit, which can cause issues as CodeCommit only supports Git repositories.

Option D is not necessary as cloning the current repository from Subversion before committing it directly to CodeCommit is not a requirement. The migration process involves creating a new Git repository and pushing the migrated code to it.