- AWS EC2 인스턴스를 Ubuntu 22.04 로 생성할 경우 Ruby 3버전 이상부터 Codedeploy가 호환되지 않아 Codedeploy agent를 인스턴스에 설치할 수 없는 상황이 발생합니다.
- 이경우 다음과 같이 Codedeploy의 특정버전을 설치하여 해결할 수 있습니다.
sudo apt-get update sudo apt-get install ruby-full ruby-webrick wget -y cd /tmp wget https://aws-codedeploy-ap-northeast-2.s3.ap-northeast-2.amazonaws.com/releases/codedeploy-agent_1.3.2-1902_all.deb mkdir codedeploy-agent_1.3.2-1902_ubuntu22 dpkg-deb -R codedeploy-agent_1.3.2-1902_all.deb codedeploy-agent_1.3.2-1902_ubuntu22 sed 's/Depends:.*/Depends:ruby3.0/' -i ./codedeploy-agent_1.3.2-1902_ubuntu22/DEBIAN/control dpkg-deb -b codedeploy-agent_1.3.2-1902_ubuntu22/ sudo dpkg -i codedeploy-agent_1.3.2-1902_ubuntu22.deb systemctl list-units --type=service | grep codedeploy sudo service codedeploy-agent status