nerdexam
Amazon

DOP-C02 · Question #278

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 app

The correct answer is B. The config.txt file will be deployed to /usr/local/src/config.txt and to. 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.

Submitted by andres_qro· Mar 6, 2026SDLC Automation

Question

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?

Options

  • AThe config.txt file will be deployed to only /var/www/html/config/config.txt.
  • BThe config.txt file will be deployed to /usr/local/src/config.txt and to
  • CThe config.txt file will be deployed to only /usr/local/src/config.txt.
  • DThe config.txt file will be deployed to /usr/local/src/config.txt and to

How the community answered

(28 responses)
  • A
    7% (2)
  • B
    89% (25)
  • C
    4% (1)

Explanation

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.

Topics

#CodeDeploy#appspec.yml#deployment configuration#file management

Community Discussion

No community discussion yet for this question.

Full DOP-C02 Practice