‹ All DOP-C02 questions

DOP-C02 Practice Question 42: CodeArtifact External Connection

AWS Certified DevOps Engineer – Professional (DOP-C02) · Test 5 · question 2 of 10

SDLC Automationmedium

Builds run in private subnets and pull open-source npm packages from the public npm registry through a NAT gateway. Two problems have surfaced: a transient outage at the public registry failed every build for an hour, and after a supply-chain advisory the security team could not tell which external package versions the organization had consumed, nor stop builds from pulling a specific bad version. The company does not want to operate a package registry of its own.

What should the team implement?

Select one answer
Show answer and explanation

Answer:

  • D. Create an AWS CodeArtifact domain and a repository with an external connection to the public npm registry, and point the builds at the CodeArtifact repository

An external connection makes CodeArtifact a managed pull-through registry: "when you request a package from the CodeArtifact repository that's not already present in the repository, the package can be fetched from the external connection." Once a package version has been fetched it is stored in the repository, so later builds are served from CodeArtifact rather than from the public registry, which is why a transient public-registry outage stops breaking builds. Because every external package the organization consumes lands in the repository, the security team gets the inventory it was missing and can remove or restrict a specific package version. AWS runs the registry, so nothing new is operated.

Option A is a build cache, not a registry. A cache miss (a new dependency, a new build image, a cache eviction) goes straight back to the public registry, and a cache gives no inventory of consumed packages and no way to block a version.

Option B misuses S3. A bucket is not an npm registry and does not speak the registry protocol for metadata and version resolution, and a nightly full mirror of a public registry is enormous and always stale.

Option C is exactly the self-managed registry the stem rules out. It also means owning the availability, storage, patching, and access control of that registry, the operational burden CodeArtifact exists to remove.

Reference: Connect a CodeArtifact repository to a public repository

Practice Test 5 ›

Study guides for DOP-C02

AWS Service Control Policies Explained: SCPs and DenialsAWS service control policies explained: how SCPs cap permissions, why admins still get access denied, inheritance, deny vs allow lists and the exam traps.
How AI Is Changing Software Jobs: Where to PrepareHow AI is changing software jobs: what history shows, the evidence on junior developers, what Klarna learned, new AI roles and five domains to prepare for.
How AWS Certification Exams Work: Scoring and RenewalHow AWS certification exams work: levels, booking, question types, unscored questions, scaled scores, pass marks, validity and how recertification works.
What Is Amazon RDS? Multi-AZ, Read Replicas and BackupsWhat is Amazon RDS? Engines, Multi-AZ, read replicas, backups, RDS Proxy, Aurora and pricing explained, with the traps that AWS exams set around each one.
Best DevOps certification: AWS, Azure, Google or CKAThe best DevOps certification for your stack: AWS DOP-C02, Azure AZ-400, Google Cloud DevOps Engineer and CKA compared on cost, level and prerequisites.
What Is AWS Lambda? Triggers, Concurrency and Cold StartsWhat is AWS Lambda? How functions run, cold starts, triggers vs event source mappings, concurrency, layers, aliases, pricing and the exam traps.
AWS CloudOps Engineer Associate (SOA-C03) exam guideAWS Certified CloudOps Engineer – Associate (SOA-C03) replaced SysOps Administrator. Format, cost, the five domains, what changed and how to prepare.
Which AWS certification should you get? 2026 roadmapWhich AWS certification to get first, by role and experience, with each exam's status in October 2026, what is changing, and prices in USD and INR.
What Is Amazon EC2? Instances, AMIs, EBS and Auto ScalingAmazon EC2 explained: instances, AMIs, instance types, security groups, EBS, Auto Scaling groups and pricing options, with the traps AWS exams set.
SQS vs SNS vs EventBridge on AWSWhen to use an SQS queue, an SNS topic or an EventBridge bus, plus fan-out, FIFO ordering, visibility timeouts and dead-letter queues for AWS exams.