We will install CodeDeploy Agent
You have 2 ways to configure the CodeDeploy Agent for your EC2:
Access to EC2
REGION=$(curl 169.254.169.254/latest/meta-data/placement/availability-zone/ | sed 's/[a-z]$//') &&
sudo yum update -y &&
sudo yum install -y python-pip &&
sudo yum install -y ruby &&
sudo yum install -y wget &&
cd /home/ec2-user
wget https://aws-codedeploy-$REGION.s3.amazonaws.com/latest/install &&
chmod +x ./install &&
sudo ./install auto &&
sudo yum remove -y wget &&
sudo service codedeploy-agent start
#!/bin/bash
yum -y update
yum install -y ruby
yum install -y aws-cli
cd /home/ec2-user
https://aws-codedeploy-us-east-1.s3.us-east-1.amazonaws.com/latest/install
wget chmod +x ./scripts/*
./install auto