AWS for DevOps
Getting Started Guide

Step 2.4: Explore the Cloned AWS CodeCommit Repository

In this step, you will log in to the newly launched instance and confirm that you successfully cloned the repository onto it.

To explore the cloned AWS CodeCommit repository on the Amazon Linux instance

  1. To log in to the instance, follow the instructions in Connect to Your Linux Instance in the Amazon EC2 User Guide for Linux Instances. (To quickly get the public DNS for the instance, in the AWS CloudFormation console, choose the Resources tab for the stack you created in Step 2.3: Launch an Instance. For CodeCommitInstance, choose the Physical ID link. Then, in the Amazon EC2 console for the instance, find the Public DNS value.)

  2. From the instance's command prompt, run the cd /home/ec2-user/my-demo-repo command or the cd ~/my-demo-repo command (or simply cd my-demo-repo because on login the command prompt defaults to the /home/ec2-user directory).

  3. From the my-demo-repo directory, run the ls -a command. This lists the directory's contents, which should include the following:

    . .. .git
  4. From the my-demo-repo directory, you can run the ls .git command, which will produce the following output. These are Git-specific folders and files for the repository that should not be edited directly:

    branches config descripton HEAD hooks info objects refs

    There is not much more to explore yet, because you have not yet pushed any source code into it. You will do that in the next step.

  5. Go to Step 3: Download and Push the Source Code.