On the EC2 Instance:
sudo apt-get update
sudo apt-get install wget
sudo apt-get install ruby
cd /home/ubuntu
wget https://{bucket-name}.s3.{region-identifier}.amazonaws.com/latest/install
chmod +x ./install
sudo ./install auto
sudo service codedeploy-agent status
bucket-name
is the name of the Amazon S3 bucket that contains the CodeDeploy Resource Kit files for your region.region-identifier
is the identifier for your region. For example, for the US East (Ohio) Region, replace bucket-name with aws-codedeploy-us-east-2 and replace region-identifier with us-east-2. For a list of bucket names and region identifiers, see Resource Kit Bucket Names by Region.