Setting up the AppSpec file

As mentioned earlier, the AppSpec, or the application specifications file, is basically a YAML or JSON backed file used to define life cycle hooks for a particular deployment. In this case, with our EC2 instance prepped and ready with the CodeDeploy agent, we still need the AppSpec file to define a set of dependencies that will essentially install the necessary packages on the EC2 instance, start or stop the services, change permissions, and much more.

The AppSpec file comprises the following sections:

  • Version: The version of the AppSpec file. Currently, the version number supported with CodeDeploy is 0.0. Do not change this value.
  • OS: Specifies the operating system of the underlying EC2/on-premise instance.

Get AWS Administration : The AWS Definitive Guide to core AWS service offerings and implementing AWS in your own environment now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.