AWS Certified Developer Associate DVA-C01 – Question285

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?

A.
Download the package files from the internet. Upload the package files into an Amazon S3 bucket. Change the buildspec's install section to use the S3 bucket as the download location.
B. Define a VPC endpoint for CodeBuild. Install the package files on an Amazon EC2 instance in the VPC. Change the buildspec's install section to use the EC2 instance as the download location.
C. Run the build on Jenkins by using the Jenkins plugin for CodeBuild. Pre-install the packages on the Jenkins server once. Remove the install commands from the buildspec.
D. Create a custom CodeBuild image with the package files already downloaded and installed. Alter the CodeBuild project to use the custom image. Remove the install commands from the buildspec.

Correct Answer: A