Menu
AWS CodeDeploy
User Guide (API Version 2014-10-06)

Step 3: Upload a Sample Application to Your GitHub Repository

In this step, you will copy a sample revision from a public Amazon S3 bucket to your GitHub repository.

Note

If you use one of your revisions instead of our sample revision, your revision must:

If your revision meets these requirements, skip ahead to Step 5: Deploy the Application to the Instance.

If you're deploying to an Ubuntu Server instance, you'll need to upload to your GitHub repository a revision compatible with an Ubuntu Server instance and AWS CodeDeploy. For more information, see Plan a Revision and Add an AppSpec File.

With your terminal or administrative command prompt still open in, for example, the /tmp/CodeDeployGitHubDemo location (for Linux, macOS, or Unix) or c:\temp\CodeDeployGitHubDemo (for Windows), run the following commands, one at a time:

To push our sample revision to an Amazon EC2 instance running Amazon Linux or RHEL:

Copy
(Amazon S3 copy command)
Copy
unzip SampleApp_Linux.zip
Copy
rm SampleApp_Linux.zip
Copy
git add .
Copy
git commit -m "Added Linux sample app"
Copy
git push

Where (Amazon S3 copy command) is one of the following:

  • aws s3 cp s3://aws-codedeploy-us-east-1/samples/latest/SampleApp_Linux.zip . --region us-east-1 for the US East (N. Virginia) region

  • aws s3 cp s3://aws-codedeploy-us-east-2/samples/latest/SampleApp_Linux.zip . --region us-east-2 for the US East (Ohio) region

  • aws s3 cp s3://aws-codedeploy-us-west-1/samples/latest/SampleApp_Linux.zip . --region us-west-1 for the US West (N. California) Region

  • aws s3 cp s3://aws-codedeploy-us-west-2/samples/latest/SampleApp_Linux.zip . --region us-west-2 for the US West (Oregon) region

  • aws s3 cp s3://aws-codedeploy-ca-central-1/samples/latest/SampleApp_Linux.zip . --region ca-central-1 for the Canada (Central) Region

  • aws s3 cp s3://aws-codedeploy-eu-west-1/samples/latest/SampleApp_Linux.zip . --region eu-west-1 for the EU (Ireland) region

  • aws s3 cp s3://aws-codedeploy-eu-west-2/samples/latest/SampleApp_Linux.zip . --region eu-west-2 for the EU (London) region

  • aws s3 cp s3://aws-codedeploy-eu-central-1/samples/latest/SampleApp_Linux.zip . --region eu-central-1 for the EU (Frankfurt) Region

  • aws s3 cp s3://aws-codedeploy-ap-northeast-1/samples/latest/SampleApp_Linux.zip . --region ap-northeast-1 for the Asia Pacific (Tokyo) region

  • aws s3 cp s3://aws-codedeploy-ap-northeast-2/samples/latest/SampleApp_Linux.zip . --region ap-northeast-2 for the Asia Pacific (Seoul) region

  • aws s3 cp s3://aws-codedeploy-ap-southeast-1/samples/latest/SampleApp_Linux.zip . --region ap-southeast-1 for the Asia Pacific (Singapore) Region

  • aws s3 cp s3://aws-codedeploy-ap-southeast-2/samples/latest/SampleApp_Linux.zip . --region ap-southeast-2 for the Asia Pacific (Sydney) region

  • aws s3 cp s3://aws-codedeploy-ap-south-1/samples/latest/SampleApp_Linux.zip . --region ap-south-1 for the Asia Pacific (Mumbai) region

  • aws s3 cp s3://aws-codedeploy-sa-east-1/samples/latest/SampleApp_Linux.zip . --region sa-east-1 for the South America (São Paulo) Region

  • aws s3 cp s3://aws-codedeploy-cn-north-1/samples/latest/SampleApp_Linux.zip . --region cn-north-1 for the South America (São Paulo) Region

To push our sample revision to a Windows Server instance:

Copy
(Amazon S3 copy command)

Unzip the contents of SampleApp_Windows.zip directly into the local directory (for example c:\temp\CodeDeployGitHubDemo), not into a new subdirectory.

Copy
git add .
Copy
git commit -m "Added Windows sample app"
Copy
git push

Where (Amazon S3 copy command) is one of the following:

  • aws s3 cp s3://aws-codedeploy-us-east-1/samples/latest/SampleApp_Windows.zip . --region us-east-1 for the US East (N. Virginia) region

  • aws s3 cp s3://aws-codedeploy-us-east-2/samples/latest/SampleApp_Windows.zip . --region us-east-2 for the US East (Ohio) region

  • aws s3 cp s3://aws-codedeploy-us-west-1/samples/latest/SampleApp_Windows.zip . --region us-west-1 for the US West (N. California) Region

  • aws s3 cp s3://aws-codedeploy-us-west-2/samples/latest/SampleApp_Windows.zip . --region us-west-2 for the US West (Oregon) region

  • aws s3 cp s3://aws-codedeploy-ca-central-1/samples/latest/SampleApp_Windows.zip . --region ca-central-1 for the Canada (Central) Region

  • aws s3 cp s3://aws-codedeploy-eu-west-1/samples/latest/SampleApp_Windows.zip . --region eu-west-1 for the EU (Ireland) region

  • aws s3 cp s3://aws-codedeploy-eu-west-2/samples/latest/SampleApp_Windows.zip . --region eu-west-2 for the EU (London) region

  • aws s3 cp s3://aws-codedeploy-eu-central-1/samples/latest/SampleApp_Windows.zip . --region eu-central-1 for the EU (Frankfurt) Region

  • aws s3 cp s3://aws-codedeploy-ap-northeast-1/samples/latest/SampleApp_Windows.zip . --region ap-northeast-1 for the Asia Pacific (Tokyo) region

  • aws s3 cp s3://aws-codedeploy-ap-northeast-2/samples/latest/SampleApp_Windows.zip . --region ap-northeast-2 for the Asia Pacific (Seoul) region

  • aws s3 cp s3://aws-codedeploy-ap-southeast-1/samples/latest/SampleApp_Windows.zip . --region ap-southeast-1 for the Asia Pacific (Singapore) Region

  • aws s3 cp s3://aws-codedeploy-ap-southeast-2/samples/latest/SampleApp_Windows.zip . --region ap-southeast-2 for the Asia Pacific (Sydney) region

  • aws s3 cp s3://aws-codedeploy-ap-south-1/samples/latest/SampleApp_Windows.zip . --region ap-south-1 for the Asia Pacific (Mumbai) region

  • aws s3 cp s3://aws-codedeploy-sa-east-1/samples/latest/SampleApp_Windows.zip . --region sa-east-1 for the South America (São Paulo) Region

  • aws s3 cp s3://aws-codedeploy-cn-north-1/samples/latest/SampleApp_Windows.zip . --region cn-north-1 for the South America (São Paulo) Region

To push your own revision to an Ubuntu Server instance, copy your revision into your local repo, and then call the following:

Copy
git add . git commit -m "Added Ubuntu app" git push