Menu
AWS for DevOps
Getting Started Guide

Step 3.4: Push the Source Code

In this step, you will push the source code to the AWS CodeCommit repository. (This source code will be deployed to the deployment target later, as part of Step 7: Create and Run the Pipeline.)

To push the source code to the AWS CodeCommit repository

  1. You should already be logged in to the instance that you launched in Step 2.3: Launch an Amazon EC2 Instance to Access the AWS CodeCommit Repository. If not, then follow the instructions in Connect to Your Linux Instance in the Amazon EC2 User Guide for Linux Instances.

  2. From the command prompt on the instance, run the pwd command to confirm that you are in the ~/my-demo-repo directory. If a path other than /home/ec2-user/my-demo-repo appears in the output, run the cd ~/my-demo-repo command.

  3. Run the following Git commands, one at a time, to add, commit, and then push the source code files to the AWS CodeCommit repository.

    Copy
    git add .
    Copy
    git commit -m "Added source code files"
    Copy
    git push
  4. After the push is successful, go to one of the following: