In this recipe, we will be creating a CodeDeploy application, which will deploy the application in Auto Scaling Group. Here, CodeDeploy will be triggered via Jenkins, so before mentioning the details of CodeDeploy, we need to set up CodeDeploy.
Creating AWS CodeDeploy application using the Auto Scaling group
Getting ready
First of all, we should have an Auto Scaling group, in which the instance should have a proper role attached, which we had already created in the previous section.
We also need to create CodeDeploy Service Role, which should have the policy to access the files from S3 and deploy it to the EC2 instance.