Creating the appspec file
To create an appspec.yml file in our aws-code-pipeline microservice, perform the following steps:
- Open the Visual Studio (VS) Code integrated development environment (IDE), click File | New File…, and provide
appspec.ymlas the name:
Figure 9.10 – VS Code creates a new appspec.yml file
- Add the following code to the
appspec.ymlfile and click File | Save. In this file, we are specifying the version of the CodeDeployappspecfile as0.0andosas Linux as we plan to deploy our application on a Linux system-based EC2 instances. In thefilessection, we wanted to copy everything from our deployment ZIP file to thehomefolder ofec2-user, and we have specified thatec2-useris the owner of all the files and has the required permissions to execute scripts. In thehookssection, we have specified two deployment lifecycle events that will be used by the CodeDeploy agent to execute thestart.shscript on...