A CI/CD pipeline uses AWS CodeArtifact and AWS CodeBuild. Build artifacts are 0.5–1.5 GB, builds run often, and each build downloads many dependencies from CodeArtifact, slowing the builds. How can the developer reduce the number of dependencies downloaded for each build to improve performance?
Choose an answer
Tap an option to check your answer.
Correct answer: Configure a local cache in CodeBuild and add the local cache folder path to the project's buildspec.yaml..
Why this is the answer
The correct solution is to configure a local cache in CodeBuild and specify the cache folder path in the buildspec.yaml. CodeBuild's local caching feature allows it to store frequently used dependencies from CodeArtifact directly on the build host. This significantly reduces download times for subsequent builds by reusing previously downloaded artifacts, which is crucial given the large artifact sizes and frequent builds. Incorrect options: An Amazon S3 cache is not the most efficient for frequently downloaded, large dependencies within CodeBuild as it still involves network calls to S3. Local caching provides faster access. Adding the CodeArtifact repository name to the buildspec.yaml for a local cache is insufficient; you need to specify the actual local path where the cache should reside. Retrieving the buildspec.yaml from CodeArtifact is irrelevant to caching dependencies and does not address the performance issue.
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