A company deploys an application to Amazon EC2 instances running Amazon Linux 2 and using AWS CodeDeploy. The repository has the shown file layout and the appspec.yml files section contains the indicated entries. What will happen to the config.txt file during deployment?
Choose an answer
Tap an option to check your answer.
Correct answer: The config.txt file will be deployed to /usr/local/src/config.txt and to /var/www/html/config/config.txt..
Why this is the answer
The appspec.yml file defines how CodeDeploy handles files. The files section specifies source and destination mappings. In this case, the source: / entry maps the entire root of the application revision to the destination /usr/local/src/. This means config.txt will be copied to /usr/local/src/config.txt. Additionally, there's a specific entry source: /config.txt with destination: /var/www/html/config/. This explicitly copies config.txt to /var/www/html/config/config.txt. Therefore, the file will be deployed to both locations. The other options are incorrect because they either miss one of the destinations or incorrectly specify a destination path.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed