AWS Certified Developer – Associate — Question 218

A development team uses AWS CodeBuild for build and test activities in a PHP application. The build process requires the team to download and install three PHP packages from the internet. The install section of the buildspec.yml file includes commands to download and install these three packages. The team wants to reduce build time.

Which solution will reduce build time the MOST?

Answer options

Correct answer: D

Explanation

Creating a custom CodeBuild image with the required packages already installed eliminates the need to download and install them during each build, thus significantly reducing build time. Other options, while beneficial, still require downloads or additional setup that would not match the efficiency of using a pre-built image.