ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 220 - DOP-C02 discussion

Report
Export

A company deploys an application to Amazon EC2 instances. The application runs Amazon Linux 2 and uses AWS CodeDeploy. The application has the following file structure for its code repository:

The appspec.yml file has the following contents in the files section:

What will the result be for the deployment of the config.txt file?

A.
The config.txt file will be deployed to only /var/www/html/config/config txt
Answers
A.
The config.txt file will be deployed to only /var/www/html/config/config txt
B.
The config.txt file will be deployed to /usr/local/src/config.txt and to /var/www/html/config/config txt.
Answers
B.
The config.txt file will be deployed to /usr/local/src/config.txt and to /var/www/html/config/config txt.
C.
The config.txt file will be deployed to only /usr/local/src/config txt
Answers
C.
The config.txt file will be deployed to only /usr/local/src/config txt
D.
The config txt file will be deployed to /usr/local/src/config.txt and to /var/www/html/application/web/config txt
Answers
D.
The config txt file will be deployed to /usr/local/src/config.txt and to /var/www/html/application/web/config txt
Suggested answer: C

Explanation:

Deployment of config.txt file based on the appspec.yml:

The appspec.yml file specifies that config/config.txt should be copied to /usr/local/src/config.txt.

The source: / directive in the appspec.yml indicates that the entire directory structure starting from the root of the application source should be copied to the specified destination, which is /var/www/html.

Result of the Deployment:

The config.txt file will be specifically deployed to /usr/local/src/config.txt as per the explicit file mapping.

The entire directory structure including application/web will be copied to /var/www/html, but this does not include config/config.txt since it has a specific destination defined.

Thus, the config.txt file will be deployed only to /usr/local/src/config.txt.

Therefore, the correct answer is:

C . The config.txt file will be deployed to only /usr/local/src/config.txt.

AWS CodeDeploy AppSpec File Reference

AWS CodeDeploy Deployment Process

asked 16/09/2024
ce temp2
42 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first