AWS Certified Developer – Associate — Question 418
Where should the appspec.yml file be placed in order for AWS CodeDeploy to work?
Answer options
- A. In the root of the application source code directory structure
- B. In the bin folder along with all the complied code
- C. In an S3 bucket
- D. In the same folder as the application configuration files
Correct answer: A
Explanation
AWS CodeDeploy specifically looks for the appspec.yml file at the root level of the application's source code directory structure to execute deployment lifecycle event hooks. Placing it in other subdirectories like bin or configuration folders will cause the deployment to fail because CodeDeploy cannot locate it. Although the entire application revision bundle may be stored in an S3 bucket, the file itself must reside at the root of the source directory within that bundle.