1. A developer is configuring an AWS CodeBuild project for a large application that has many dependencies. The build process frequently downloads the same dependencies from external repositories, leading to long build times. The developer wants to optimize build times by reusing previously downloaded dependencies. Which CodeBuild feature should be used to achieve this efficiently?
Deployment
- A. Use a custom Docker image for CodeBuild with pre-installed dependencies.
- B. Increase the compute capacity of the CodeBuild project.
- C. Configure CodeBuild caching to an Amazon S3 bucket.
- D. Implement a custom script in the buildspec.yml to download dependencies only if they are missing.
Show answerAnswer
C. Configure CodeBuild caching to an Amazon S3 bucket.
CodeBuild caching to an Amazon S3 bucket is the most effective and managed solution for reusing dependencies. It allows CodeBuild to store and retrieve build artifacts and dependencies, significantly reducing build times for subsequent builds by avoiding redundant downloads.