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.yml
as the name:
Figure 9.10 – VS Code creates a new appspec.yml file
- Add the following code to the
appspec.yml
file and click File | Save. In this file, we are specifying the version of the CodeDeployappspec
file as0.0
andos
as Linux as we plan to deploy our application on a Linux system-based EC2 instances. In thefiles
section, we wanted to copy everything from our deployment ZIP file to thehome
folder ofec2-user
, and we have specified thatec2-user
is the owner of all the files and has the required permissions to execute scripts. In thehooks
section, we have specified two deployment lifecycle events that will be used by the CodeDeploy agent to execute thestart.sh
script on...