다른 부분만 기록
기본적으로 Seoul Region을 ap-northeast-2
라고 부름
Code deploy, EC2 CodeDeploy Role를 생성
Inline Policies로 Custom Policy도 적용
참고 github
User에 Permission으로 새로운 유저 생성
Access Key, Secret Key Download
Role를 EC2 CodeDeploy로 지정 standalone SSH client 접속 EC2 만들고 상위에 Connect 입력 순서대로 입력
sudo su
yum -y update
cd /home/ec2-user
aws configure
aws configure
하고 나서 마지막에 Region 입력하라고 하면 ap-northeast-2
입력
아래로 쭉 진행
s3를 만든다.
aws s3 cp s3://aws-codedeploy-<region>/latest/install . --region <region>
aws s3 cp s3://aws-codedeploy-ap-northeast-2/latest/install . --region ap-northeast-2
Download
가 되어야 다음 install이 됨
chmod +x ./install
sed -i "s/sleep(.*)/sleep(10)/" install
./install auto
service codedeploy-agent status
여기까지 하면 아래와 같은 메세지가 출력 되어야 함
The AWS CodeDeploy agent is running as PID <ID>