- First of all, we have to create an IAM role for the EC2 instance and attach AWS CodeDeploy and AWS S3 access. We have named the role CodeDeploy-Instance-Profile:
- Once the role gets created, we have to launch an EC2 instance in the public subnet with the IAM role. So, we named the EC2 instance AWS-CodeDeploy-Instance:
- Now, we have to install the CodeDeploy agent on the servers and dependencies of the application that is NodeJS:
# yum update # yum install ruby # yum install wget # wget https://BUCKET-NAME.s3.amazonaws.com/latest/install ...