Course menuDVA-C02

Exams / DVA-C02 / Packaging and application configuration / Question 3

DVA-C02 practice question: Packaging and application configuration (3 of 3)

Deployment A free question from our original DVA-C02 practice exam. Try it, then open the answer to see why each option is right or wrong.

A company's developers publish internal npm packages that several teams use. CodeBuild projects also download public packages from the npm public registry. The company wants one private endpoint where builds get both internal and public packages, with public packages kept once fetched. What should the developer set up?

Choose one answer.

  1. A. An Amazon ECR repository that stores each of the npm packages as an image.
  2. B. An S3 bucket containing package tarballs that builds download by URL.
  3. C. A Git repository that stores the internal packages as source code.
  4. D. A CodeArtifact repository whose upstream has an external connection to npmjs.
Show the answer and explanation

Answer: D

  • A. Wrong: ECR stores container images and OCI artifacts. It is not used as an npm package registry.
  • B. Wrong: This gives no npm registry protocol, no versions or dependency resolution, and no link to the public registry.
  • C. Wrong: Builds would have to build the packages from source, and it does nothing for public packages.
  • D. Right: Correct. Builds use one CodeArtifact endpoint. Internal packages are published there, and public ones are fetched through the external connection and kept.

Explanation

AWS CodeArtifact is a managed artifact repository for package managers such as npm, pip and Maven. Upstream repositories let one repository draw on others, and an external connection links a repository to a public registry, so clients use a single endpoint for internal and public packages.

Study

Keep practising

Answer questions with a score at the end, or practise just this topic with the explanation after each one. No sign-up needed.