exam questions

Exam AWS Certified DevOps Engineer - Professional DOP-C02 All Questions

View all questions & answers for the AWS Certified DevOps Engineer - Professional DOP-C02 exam

Exam AWS Certified DevOps Engineer - Professional DOP-C02 topic 1 question 263 discussion

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.
  • 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.
  • D. The config.txt file will be deployed to /usr/local/src/config.txt and to /var/www/html/application/web/config.txt.
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Moumita
Highly Voted 9 months, 2 weeks ago
Selected Answer: B
First Entry: source: config/config.txt destination: /usr/local/src/config.txt This rule specifically copies the config/config.txt file from the source repository to /usr/local/src/config.txt on the EC2 instance. Second Entry: source: / destination: /var/www/html This rule copies the entire contents of the root directory of the repository to /var/www/html on the EC2 instance. This includes the config/config.txt file, so it will be copied to /var/www/html/config/config.txt. Given these two rules: The config/config.txt file will be copied to /usr/local/src/config.txt by the first rule. The same file will also be copied to /var/www/html/config/config.txt due to the second rule. So, the correct answer is indeed B. The config.txt file will be deployed to /usr/local/src/config.txt and to /var/www/html/config/config.txt.
upvoted 5 times
...
jamesf
Most Recent 9 months ago
Selected Answer: B
The config/config.txt file will be copied to /usr/local/src/config.txt based on the first mapping. Since the entire source directory (/) is also mapped to /var/www/html, config/config.txt will also be copied to /var/www/html/config/config.txt.
upvoted 4 times
...
tgv
9 months, 2 weeks ago
Selected Answer: B
---> B
upvoted 4 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago