Answer – A
The AWS Documentation mentions the below
The application specification file (AppSpec file) is a YAML-formatted file used by AWS CodeDeploy to determine:
what it should install onto your instances from your application revision in Amazon S3 or GitHub.
which lifecycle event hooks to run in response to deployment lifecycle events.
An AppSpec file must be named appspec.yml and it must be placed in the root of an application`s source code`s directory structure. Otherwise, deployments will fail.
For more information on the appspec file , please visit the below URL:
http://docs.aws.amazon.com/codedeploy/latest/userguide/reference-appspec-file.html
Note: If you deploying your code on AWS Lambda compute platform, An AppSpec file can be YAML-formatted or JSON-formatted. You can also enter the contents of an AppSpec file directly into AWS CodeDeploy console when you create a deployment.
However, this question is about along with your source code binaries on an EC2/On-Premises Compute Platform. So, an AppSpec file must be a YAML-formatted file named appspec.yml and it must be placed in the root of the directory structure of an application`s source code. Otherwise, deployments fail.