
Answer-first summary for fast verification
Answer: Define an appspec.yml file in the root directory
Define an appspec.yml file in the root directory: 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. The AppSpec file is used to: Map the source files in your application revision to their destinations on the instance. Specify custom permissions for deployed files. Specify scripts to be run on each instance at various stages of the deployment process. During deployment, the CodeDeploy agent looks up the name of the current event in the hooks section of the AppSpec file. If the event is not found, the CodeDeploy agent moves on to the next step. If the event is found, the CodeDeploy agent retrieves the list of scripts to execute. The scripts are run sequentially, in the order in which they appear in the file. The status of each script is logged in the CodeDeploy agent log file on the instance. If a script runs successfully, it returns an exit code of 0 (zero). If the CodeDeploy agent installed on the operating system doesn't match what's listed in the AppSpec file, the deployment fails. Incorrect options: Define a buildspec.yml file in the root directory - This is a file used by AWS CodeBuild to run a build. This is not relevant to the given use case. Define a buildspec.yml file in the codebuild/ directory - This is a file used by AWS CodeBuild to run a build. This is not relevant to the given use case. Define an appspec.yml file in the codebuild/ directory - This file is for AWS CodeDeploy and must be placed in the root of the directory structure of an application's source code.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
A developer in your company has been newly promoted to the position of Team Lead. This role will involve overseeing the code deployment process on EC2 instances using AWS CodeCommit and AWS CodeDeploy. The new deployment process must meet two specific requirements: it should be capable of altering file permissions for the deployed files, and it must include a mechanism to verify the success of the deployment.
Which of the following actions should the new Developer take?
A
Define a buildspec.yml file in the root directory
B
Define an appspec.yml file in the root directory
C
Define an appspec.yml file in the codebuild/ directory
D
Define a buildspec.yml file in the codebuild/ directory
No comments yet.