I am getting error: Redirecting to /bin/systemctl status codedeploy-agent.service Unit codedeploy-agent.service could not be found when trying to install code-deploy agent in my EC2 instance.
User Data:
sudo yum update -y
sudo yum install -y ruby wget
cd /home/ec2-user
wget https://aws-codedeploy-ap-south-1.s3.ap-south-1.amazonaws.com/latest/install
chmod +x ./install
sleep 30 # Add a delay of 30 seconds
sudo ./install auto
Using Amazon Linux 2 machine.I have assigned S3 access to my EC2. I have checked /var/log/aws/codedeploy-agent/install.log which says: No such file or directory
I am able to manually install code-deploy agent in EC2 by giving commands in CLI. But I want it to be installed during EC2 initialization to set up my code pipeline.