---
title: "Comment by Malhar Kauthale on \"AWS CI/CD DevOps Project\" | Hashnode"
description: "Great tutorial but, where is the appspec.yaml file?"
url: "https://hashnode.com/posts/aws-cicd-devops-project/640e2221e3ae4115f4d5b802/comment/669e06bfab144126be7d1137"
---

[Discussion](https://hashnode.com/posts/aws-cicd-devops-project/640e2221e3ae4115f4d5b802)

Comment [AWS CI/CD DevOps Project](https://hashnode.com/posts/aws-cicd-devops-project/640e2221e3ae4115f4d5b802)

[Malhar Kauthale](https://hashnode.com/@Malhark)

[Jul 22, 2024](https://hashnode.com/posts/aws-cicd-devops-project/640e2221e3ae4115f4d5b802/comment/669e06bfab144126be7d1137)

Great tutorial but, where is the appspec.yaml file?

[Rahul wath](https://hashnode.com/@RahulWath)

[Jul 25, 2024](https://hashnode.com/posts/aws-cicd-devops-project/640e2221e3ae4115f4d5b802/comment/669e06bfab144126be7d1137#reply-66a27d31be65c54465689ebb)

If you need an `appspec.yml` file in addition to the `buildspec.yml` file.

`buildspec.yml` defines the build process, while `appspec.yml` defines the deployment process.

`appspec.yml` is used by CodeDeploy to:

1.  Identify the files to deploy
2.  Specify the deployment lifecycle hooks (e.g., BeforeInstall, AfterInstall)
3.  Define the deployment settings (e.g., file permissions, directory structure)

Here's an example `appspec.yml` file:

```
version: 0.0
os: linux
files:
  - source: /
    destination: /var/www/html
hooks:
  BeforeInstall:
    - location: scripts/before_install.sh
      timeout: 300
  AfterInstall:
    - location: scripts/after_install.sh
      timeout: 300
```

This file specifies:

-   The files to deploy (in this case, the entire repository)
-   The deployment destination (`/var/www/html`)
-   Two lifecycle hooks: `BeforeInstall` and `AfterInstall`, which run scripts before and after installation, respectively.

Make sure to create an `appspec.yml` file in the root of your repository and commit it to CodeCommit. CodeDeploy will use this file to deploy your application to the EC2 instance(s).

[Malhar Kauthale](https://hashnode.com/@Malhark)

[Jul 27, 2024](https://hashnode.com/posts/aws-cicd-devops-project/640e2221e3ae4115f4d5b802/comment/669e06bfab144126be7d1137#reply-66a4a7d15d4f9e567bb89cff)

Thank you for the information I'm able to build the code successfully but when I try to deploy it I'm getting this error : Deploy agent was not able to receive the lifecycle event check the code deploy agent logs on your host and make sure agent is running and can connect to the code deploy server After this is i checked my code-deploy agent was running and i also restarted it and also given the necessary permissions but still facing the same issue can you suggest some solution
