Topic 1 Question 361
A company's DevOps team uses Node Package Manager (NPM) open source libraries to build applications. The DevOps team runs its application build process in an AWS CodeBuild project that downloads the NPM libraries from public NPM repositories.
The company wants to host the NPM libraries in private NPM repositories. The company also needs to be able to run checks on new versions of the libraries before the DevOps team uses the libraries.
Which solution will meet these requirements with the LEAST operational effort?
Create an AWS CodeArtifact repository with an upstream repository named npm-store. Configure the application build process to use the CodeArtifact repository as the default source for NPM. Create an AWS CodePipeline pipeline to perform the required checks on package versions in the CodeArtifact repository. Set the package status to unlisted if a failure occurs.
Enable Amazon S3 caching in the CodeBuild project configuration. Add a step in the buildspec.yaml config file to perform the required checks on the package versions in the cache.
Create an AWS CodeCommit repository for each library. Clone the required NPM libraries to the appropriate CodeCommit repository. Modify the CodeBuild appspec.yaml config file to use the private CodeCommit repositories. Add a step to perform the required checks on the package versions.
Create an AWS CodeCommit repository for each library. Clone the required NPM libraries to the appropriate CodeCommit repository. Modify the CodeBuild buildspec.yaml config file so that NPM uses the private CodeCommit repositories. Add an AWS CodePipeline pipeline that performs the required checks on the package versions for each new commit to the repositories. Configure the pipeline to revert to the most recent commit in the event of a failure.
ユーザの投票
コメント(1)
- 正解だと思う選択肢: A
CodeArtifact with Upstream Repository
Proxy Public Packages: The npm-store upstream repository acts as a proxy for npm.org, automatically caching public packages in CodeArtifact13.
Centralized Control: The build process uses CodeArtifact as the default NPM source, ensuring all dependencies are managed privately.
CodePipeline for Version Checks
Automated Validation: The pipeline runs tests or checks on new package versions before they’re approved for use.
Unlisted Status: Failed packages are marked as unlisted, preventing their inclusion in builds until resolved16.
Why Other Options Fail:
B/C/D: Cloning libraries into CodeCommit (C/D) or using S3 caching (B) adds manual effort and complexity compared to CodeArtifact’s native proxying.
No Need for Manual Cloning: CodeArtifact’s upstream eliminates the need to clone public packages into private repositories
👍 1Bwhizzy2025/02/25
シャッフルモード