Migrate from Amazon ECR to Harbor

Moving from Amazon ECR to self-hosted Harbor is mostly a replication, credential and cutover exercise, with lifecycle rules and IAM-based access that must be rebuilt by hand. This page explains what moves cleanly, the sequence, and what drives effort.

On this page

How migrating from Amazon ECR to Harbor usually goes

Teams that already lean toward Harbor, usually because they run a hybrid or on-premises estate and want one registry for every cluster, can copy images out of Amazon ECR with Harbor's pull-based replication from an ECR endpoint. The image copy is the easy part. Access design, lifecycle rules and the cutover of Kubernetes image references and CI push targets are manual work that the replication job does not do for you. Platform engineering usually owns the move, with security engineering signing off on the access model. The platform team creates the Harbor endpoint for ECR, sets up replication rules that filter by repository name and tag, and tests a small set of images first. Security engineering reviews how IAM roles map to Harbor projects, role-based access control and OIDC single sign-on, and confirms how scanning results and audit logs will be retained. Ask your AWS team which IAM principal will read the source repositories and confirm the minimum permissions it needs before any rule runs.

The effort and risk sit mostly in what replication leaves behind. Lifecycle policies in ECR do not move with the images, so you need to re-create retention rules in Harbor's garbage collection and tag retention settings before the old repositories are retired. Image digests should match after copy, but verify that signatures and SBOM referrers survive the transfer for the artifacts you care about, and check that Helm charts are stored as OCI artifacts in the new registry. Cutover should be staged: update one namespace or pipeline, watch pulls and push failures for a full release cycle, then move the rest. Keep ECR read access in place until rollback is no longer needed, and confirm Harbor's version, backup procedure and upgrade path with the vendor's current release notes before go-live.

Which ECR capabilities map to Harbor and which need rework

This table maps the Amazon ECR features that a migration touches to their Harbor equivalents and marks each as clean, needs rework or gap. Read the status column first, then the notes, and confirm every ECR feature not covered by the supplied facts with AWS and your own configuration before you plan cutover.

ECR capabilityHarbor equivalent and statusWhat the team must do
Repositories and imagesClean: Harbor stores images as OCI artifacts in projectsCreate one Harbor project per ECR namespace or team, then map repository names so Kubernetes references can be rewritten predictably.
Helm chartsClean: Harbor serves Helm charts as OCI artifacts (ChartMuseum removed in v2.8.0)Push charts with oci:// references. Charts previously stored in a separate chart repository in ECR need to be re-pushed to Harbor as OCI artifacts.
IAM-based pull and pushNeeds rework: Harbor uses project RBAC with LDAP/AD or OIDC single sign-onIAM policies and roles do not transfer as code. Rebuild access as Harbor roles, robot accounts for CI and node pull credentials, then test each pipeline.
Cross-account and resource accessNeeds rework: no direct equivalent to ECR repository policies in the supplied factsConfirm how your ECR repository policies are used. Model the same access with Harbor projects and robot accounts, and verify each consumer account.
Image scanningClean for static analysis: Trivy enabled with the --with-trivy install optionConfirm whether you depend on ECR enhanced scanning features. Set Harbor scan policies and compare findings on a sample set before relying on them.
ReplicationClean: Harbor replication pulls from an AWS ECR endpoint with filters by name, tag, label and resource typeCreate a pull-based rule per source namespace, set a schedule or manual trigger, and apply a bandwidth limit if the link is shared.
Pull-through cachingClean: Harbor proxy cache projects can cache AWS ECR, with a default 7-day retention policyDecide which upstream registries need caching and whether the 7-day default retention suits your pull patterns.
Lifecycle policiesGap: Harbor retention and tag rules are not covered by the supplied factsRe-create lifecycle intent as Harbor retention rules, then confirm the exact rule types and behavior in the Harbor documentation for your version.
Storage cleanupNeeds rework: Harbor uses garbage collection, which must be scheduledSchedule garbage collection after deletes and retention runs, and monitor free space on the backing storage.

What data and integrations to move and rebuild

A registry migration moves content, but the access model and every place that points at an ECR address must move too. The cards below separate what replication copies from what you must rebuild by hand, so cutover does not break pulls in production.

Images, tags and Helm charts

Harbor's pull-based replication from an AWS ECR endpoint can copy container images and their tags, and Helm charts stored as OCI artifacts in ECR. Filter by repository name and tag so you copy only what production pulls, not every legacy tag. Confirm that the chart versions you rely on are stored as OCI artifacts in ECR, and check the manifests and any referrer artifacts such as signatures or SBOMs, which may need a separate copy step.

ECR authentication for replication

Harbor must authenticate to the ECR endpoint to list and pull repositories. ECR issues short-lived tokens, so a static credential is not the usual model. Confirm with your platform team how those tokens are obtained and refreshed in your setup, which IAM role the Harbor host or service uses, and whether that role is limited to read actions on the repositories in scope.

IAM principals as Harbor identities

ECR access is controlled by IAM roles and policies. Harbor uses projects, role-based access control, robot accounts and users, and can federate through LDAP, AD or OIDC. Map each IAM principal that pushes or pulls to a Harbor robot account for machines or an OIDC group for people, and grant the narrowest project role. Keep robot account names and secrets in your secrets manager so they can be rotated without redeploying clusters.

Kubernetes image references

Deployments, StatefulSets, CronJobs, Helm values and Kustomize overlays hold full ECR image addresses, usually including the account ID and region. Search every manifest repository and live cluster for the ECR hostname. Change references in a planned rollout, and keep the image digest pinned where possible so the same bytes run after cutover. Check that each cluster can pull from the Harbor hostname and trusts its certificate.

CI pipelines and push targets

Build pipelines push to ECR with an AWS login step, and deploy jobs often pull the same address. Update the registry variable, the login step and any cached credentials in each pipeline, and point builds at Harbor only after a test image has been pushed and pulled successfully. Keep the ECR push path open until the last pipeline has moved, so a missed job fails loudly rather than shipping stale images.

Webhooks and lifecycle rules

Anything subscribed to ECR events, such as image scan findings, EventBridge rules or deployment triggers, stops receiving signals when pushes move to Harbor. ECR lifecycle policies that expire old images have no automatic equivalent, so write Harbor retention rules and garbage collection schedules to match. Harbor's webhooks to internal addresses are blocked by default in v2.15.3 and later, so confirm each receiver is allowed before cutover.

The migration sequence from inventory to decommissioning

The sequence moves image content from ECR to Harbor in stages, so each stage produces a checkpoint the team can verify before the next one starts. ECR stays in service as the fallback until the cutover has been proven and rollback is no longer needed.

  1. Inventory repositories, tags and consumers

    List every ECR repository in each account and region, with its tag count, image sizes, immutable tag settings, and any repository policies or lifecycle rules. Then trace the consumers: Kubernetes namespaces and workloads that reference each image, CI pipelines that push to it, and any external systems that pull from it. The output is a repository inventory with an owner and a target Harbor project name for each repository, plus a consumer map that shows which manifests and pipelines must change. The step is done when the platform team and the application owners have signed off on that map.

  2. Stand up a pilot Harbor project

    Install Harbor in the target environment following the installation prerequisites, then create a pilot project with access controls matched to the ECR permissions the inventory identified. Connect identity through LDAP, AD or OIDC if that is the plan, and confirm that scanning is enabled. Create one pull-based replication rule from the ECR endpoint that filters on a single low-risk repository and a small set of tags. The output is a running Harbor instance, a documented project model and a replication rule that has completed at least one successful run. Confirm the ECR credentials and endpoint settings against the current Harbor replication endpoint documentation before the first run.

  3. Expand the replication rule set

    Widen the replication rules one group of repositories at a time, using name, tag and label filters that match the inventory. Set a bandwidth limit if the link between the two environments is shared, and choose a trigger that fits the release process, such as a schedule or event-based runs. Compare the repository and tag counts in Harbor with those in ECR after each run, and check a sample of digests to confirm the copies match. The output is a versioned replication rule set and a reconciliation report that shows any gaps or failed copies, with the cause recorded for each.

  4. Run both registries in parallel

    Keep ECR as the source of truth for pushes while Harbor serves pulls from a non-production cluster or a canary namespace. Point a subset of workloads at Harbor image references, and watch pull errors, authentication failures and image pull latency in the cluster events. Confirm that the image signatures, SBOMs and other referrers that matter to your policies survive replication, because the OCI referrers API is part of what needs verifying. The output is a parallel-run log with pull success rates by workload and a list of any policy or admission controller changes the migration requires. The step ends when the canary has run through a full release cycle without registry-caused incidents.

  5. Build the cutover checklist

    Write a checklist that lists each Kubernetes manifest, Helm values file, and image reference that changes, along with the CI push target in every pipeline. Include pull secrets, node or cluster-level registry mirror configuration, and any allowlists in admission policies. Add a rollback path that keeps ECR images and references available, and name the person who decides to roll back. Test the checklist against a non-production cluster. The output is an approved cutover checklist, a change calendar agreed with each application owner, and a rollback runbook. Review it with the security team so that scanning and access rules apply to the new push targets before any production change.

  6. Cut over image references and push targets

    Apply the checklist in batches, starting with the least critical workloads, and update the image references in manifests and charts through the normal deployment pipeline. Switch CI push targets to Harbor only after the matching workloads pull successfully from Harbor. Monitor pull errors, scan results and deployment health after each batch. The output is a record of every changed reference and pipeline, with the date and approver for each batch. The step is done when no production workload or pipeline still points to ECR for pushes or pulls, and the monitoring has stayed clean for the period the team agreed in advance.

  7. Re-create lifecycle policies and decommission ECR

    Recreate the ECR lifecycle and retention behavior in Harbor, using Harbor's retention and garbage collection settings to match the rules the team relied on in ECR. Schedule garbage collection and confirm backups of the Harbor database and storage are in place. Once rollback is no longer needed, stop replication from ECR, archive a final inventory and digest list, and remove the repositories and any ECR-specific IAM policies. Confirm that the ECR charges for storage and data transfer have stopped in the billing data. The output is a decommissioning record, a retained digest list for audit purposes and a closed replication rule set.

Running ECR and Harbor side by side during cutover

Pull-based replication is the mechanism that keeps Harbor filled with images that still originate in ECR. A replication rule in Harbor pulls from an AWS ECR endpoint into a local Harbor project, so the Harbor copy stays current while Kubernetes clusters and pipelines keep working against ECR. Rules can filter by repository name, tag, label and resource type, which lets you start with one team or one application instead of the whole account.

  • Trigger choice: Rules can run manually, on a cron schedule, or on push and retag events. Scheduled runs suit the early phase, while event triggers help once new images are flowing.
  • Bandwidth limit: Each task can carry an optional bandwidth limit, which keeps large initial copies from saturating links that production traffic uses.
  • Scope by filter: Start with a narrow repository filter, verify digests on the Harbor side, then widen the filter in steps.
  • Credentials: Give the replication endpoint an IAM identity limited to pulling from the repositories in scope.
  • Initial backfill: Plan a first full run before enabling event triggers, so older tags exist in Harbor before anything depends on them.

Confirm with your Harbor version's documentation how the replication endpoint handles ECR authorization tokens, since token refresh behavior determines whether long-running rules need attention.

What drives the cost and duration of the move

This table lists the factors that change how long the move takes and what it costs, along with how to keep each one under control. Read the one-time rows as the migration project and the recurring rows as the work that continues after cutover. The main takeaway is that repository and tag scope, the number of hardcoded ECR references and IAM complexity usually matter more than raw image volume.

DriverWhy it changes cost or effortHow to keep it down
Number of repositories and tagsEach repository needs a replication or proxy rule, a Harbor project decision and a check that tags resolved correctly; large tag histories multiply verification work.Filter by repository name and tag before the first run, and migrate only the tags that deployments still reference.
Total image volume transferredInitial replication pulls every selected layer over the network, so bandwidth and time scale with volume, and cross-region or internet data transfer may be billed by AWS.Set a per-task bandwidth limit, schedule large copies off-peak, and ask your AWS account team to confirm the transfer charges that apply to your region.
Clusters and CI pipelines with hardcoded ECR referencesEvery Kubernetes manifest, Helm values file, Kustomize overlay and pipeline variable that names an ECR host must change, and each cluster must be tested before cutover.Inventory references with a search across manifests and pipelines first, then change them through shared templates rather than one file at a time.
IAM complexity across AWS accountsPull and push permissions are granted through IAM roles, cross-account policies and node or IRSA roles, and each one must be mapped to a Harbor robot account or project role.List every principal that pulls or pushes, group them by workload, and create one robot account per workload with the narrowest project role.
Lifecycle rule countECR lifecycle policies must be re-created as Harbor retention and tag rules, and each rule needs review so that images still in use are not pruned.Consolidate overlapping rules, document which tags each rule keeps, and test the retention result on a copy before enabling it.
One-time work: migration, testing and cutoverCovers replication design, a pilot run, validation of digests and signatures, staged cutover and rollback planning. Effort rises with the number of clusters and pipelines.Pilot one non-critical namespace first, compare digests between ECR and Harbor, and agree the cutover window and rollback steps in writing before work starts.
Recurring work: Harbor upgrades, backups and operationsHarbor needs regular upgrades, backups of its database and storage, vulnerability scanner updates and monitoring. Some upgrades change internal components, so each release needs a test window.Check release notes before each upgrade, back up before upgrading, and ask for an itemized quote that separates one-time migration fees from ongoing support.
Quote basisPricing follows from the written scope, not from a list price. ECR and AWS charges are not included in any DeployOpen figure.Ask for an itemized quote that lists repository counts, cluster and pipeline counts, IAM principals, lifecycle rules and recurring support terms.

What usually goes wrong and how to prevent it

Most failed ECR-to-Harbor migrations fail in the same few places: the copied content does not match what was tested, workloads still point at the old registry, and the storage and access controls that ECR handled quietly are not rebuilt. The cards below pair each risk with a check to run before and after cutover.

Tags or digests drift after replication

A replicated tag can point at a different digest than the one CI tested, especially when a source repository retags images after the rule has run. Kubernetes manifests that pin by tag will then deploy content nobody reviewed. Before cutover, compare the digest of a sample of images in ECR and Harbor, and deploy by digest wherever your tooling allows it. Pin the digest, not the tag, in every production manifest.

ECR URLs left in workload manifests

Deployments, Helm values, Kustomize overlays and Argo CD applications often hard-code the ECR host name. If a cluster keeps pulling from ECR after the switch, the migration looks complete while cost and dependency on AWS continue. Search every cluster and repository for the ECR host, update the references in a single reviewed change, and keep ECR read access in place until pull logs show no traffic.

Lifecycle rules not re-created

ECR lifecycle policies that expire untagged images or old builds do not move with a replication rule. Without an equivalent retention rule in Harbor, the registry grows with every build and garbage collection never reclaims space that nobody marked for removal. Write the retention and cleanup rules down from the ECR policy, apply them to each project in Harbor, and schedule garbage collection with a named owner.

Credentials that expire or are over-scoped

Replication from ECR uses AWS credentials that can expire, and robot accounts in Harbor can be granted more project rights than CI needs. Either problem stops pushes or pulls silently in one environment only. Use a dedicated replication identity with read-only ECR permissions, rotate it on a schedule, and give CI a Harbor robot account limited to the projects it writes to. Test a forced token expiry before go-live.

Upgrades without a fresh backup

Recent Harbor releases carry database and cache changes. The v2.15.2 release moved the bundled internal database from PostgreSQL 15 to PostgreSQL 18 on container startup and replaced Redis with Valkey, and its notes recommend a backup before upgrading. A registry upgraded without a verified backup can be hard to roll back, so take a database and storage backup, restore it to a test host, and only then upgrade. Keep the rollback path documented.

Webhook and content trust changes block workflows

Harbor v2.15.3 blocks webhooks to internal network addresses by default and makes signing of unsigned images fail in projects that enforce content trust. Notifications to in-cluster CI or chat endpoints can stop, and a signing step in a pipeline can fail on images that were previously accepted. Review each webhook target and each content-trust project against the release notes before upgrading, and confirm that pipelines handle the new failure cases.

How the move differs by estate and starting point

A single account with a handful of repositories is the simplest starting point. Most of the work is in the replication rule and the cutover of image references, and the repository count keeps the filter list short. Harbor pulls from the ECR endpoint with a pull-based replication rule, so you can set the rule up, run it once manually and compare results before you touch any workload.

  • Filter narrowly first: Start with one or two repository name filters and a tag filter, then widen the rule once the copies match.
  • Use short-lived ECR credentials: Ask who will rotate the token used by the replication endpoint, because ECR authorization tokens expire and need a refresh mechanism.
  • Cut over by workload: Update image references one deployment at a time, so a bad copy affects a single service.
  • Recreate lifecycle rules: ECR lifecycle policies do not move with the images, so write the equivalent retention rules in Harbor's garbage collection and tag retention settings.
  • Keep ECR running: Leave the source repositories in place until every consumer has pulled from Harbor at least once.

Confirm the replication endpoint configuration and token refresh method with your own AWS administrator before scheduling the first run.

Questions teams ask before moving from ECR to Harbor

What drives the cost of moving from Amazon ECR to Harbor?

The cost is mostly people time and the infrastructure Harbor needs, not the migration tooling itself, which is open source. Harbor's replication can pull from an AWS ECR endpoint, so the copy job is cheap to run. The main drivers are the number of repositories and tags, the total image volume, how many clusters and CI pipelines must be re-pointed, and how much of your ECR setup (IAM policies, lifecycle rules, scanning) must be re-created by hand. One-time costs cover planning, testing and cutover. Recurring costs cover servers, object storage, database, backups and the staff who patch and upgrade Harbor. Ask any provider for a quote that lists each of these as a separate line, with the assumptions behind them.

How long does an ECR to Harbor migration usually take?

The duration depends on the size and number of consuming systems more than on the image copy itself. Replicating images is usually the quick part; the slower work is inventorying which Kubernetes manifests, Helm values, build pipelines and deployment tools reference ECR addresses, testing pulls from the new registry, and agreeing a cutover window with cluster and CI owners. Harbor's own documentation describes replication rules that run manually, on a schedule or on push events, so you can run an initial bulk copy well before cutover and then sync changes. Ask for a timeline in a written, fixed-scope plan that names the environments in scope.

What does our internal team need to provide for the migration?

Your team needs to supply access and decision-makers, not only effort. Plan for read access to the AWS accounts and ECR repositories being copied, plus credentials that let Harbor pull from them. You also need the owners of each Kubernetes cluster who will change image references, the CI owners who will change push targets, and someone who can approve a cutover window. Security or platform staff should confirm where Harbor will run, how users will sign in (LDAP/AD or OIDC are supported by Harbor), and who owns scanning results and retention. Missing any of these owners is the most common cause of delay.

Can our own engineers migrate from ECR to Harbor without a partner?

Yes, a capable platform team can do this in-house, and the core steps are documented. Harbor is open source under Apache-2.0, its installer and replication features are documented, and tools like Skopeo can copy images between registries without special privileges. The harder parts are running Harbor reliably afterward and making sure nothing in your estate still points at ECR. Consider a partner if your team lacks Kubernetes, storage or database operations experience, or if you need evidence for an audit. DeployOpen plans and implements self-hosted open-source platforms in your own infrastructure under a written scope, and offers ongoing support as a retainer.

Which Amazon ECR features do not carry over to Harbor automatically?

Several ECR behaviors must be re-created in Harbor rather than copied. IAM-based access control becomes Harbor projects, roles and OIDC or LDAP/AD sign-in, so policies need to be mapped by hand. ECR lifecycle policies have no automatic equivalent; Harbor's garbage collection and retention settings must be configured separately. Image scanning uses Trivy in Harbor, which is enabled at install time with the --with-trivy option, so results will differ from ECR's scanner. Resource-based repository policies, EventBridge notifications and AWS-specific encryption settings also need a deliberate replacement. Confirm each feature your teams rely on against the Harbor documentation before cutover.

How does rollback work if Harbor fails after cutover?

Rollback is straightforward if you keep ECR running until Harbor is proven, because images are copied rather than moved. Keep the ECR repositories intact, and keep the previous image references in Git so a manifest or Helm value change can be reverted. If a cluster or pipeline breaks, point the affected workload back to the ECR address and redeploy. Plan the cutover in stages, one cluster or pipeline at a time, and define the conditions for rollback before starting. Harbor's proxy cache can also serve cached copies when an upstream is unreachable, which helps for pulls from other registries but does not replace a tested rollback path. Document the steps and test them in a non-production environment first.

Does Harbor support the OCI artifacts and Helm charts we store in ECR?

Harbor stores container images and Helm charts as OCI artifacts, and it no longer bundles ChartMuseum. Since Harbor v2.8.0, Helm charts are served as OCI artifacts, which matches how Helm now pushes and pulls charts from OCI registries using oci:// references. Check each chart and artifact type in your ECR repositories, including any referrers such as signatures or SBOMs, and confirm that the copy job carries them over as expected. Test a Helm pull from Harbor in staging before changing production chart references. The OCI Distribution Specification also defines a referrers API, so confirm that your signing and SBOM tools query Harbor correctly.

Which Harbor release should we install for a new ECR replacement?

Install the latest stable release that your support policy allows, and read the release notes before upgrading. Harbor v2.15.4 was the latest stable release at the time of writing, published on October 9, 2026, and it bundles Trivy 0.75.0. Earlier releases in v2.15 changed the internal database to PostgreSQL 18 and replaced Redis with Valkey, and v2.15.3 introduced breaking changes around webhooks to internal addresses and content trust signing. Confirm the release that matches your plan against the GitHub releases page, take a backup before any upgrade, and test the version in a non-production environment first.

How DeployOpen scopes and runs the migration

DeployOpen plans and implements the move from Amazon ECR to a self-hosted Harbor registry inside your own cloud accounts, data centers or air-gapped network. Each engagement starts from a written scope that names the repositories, tags, clusters and CI pipelines in play before any replication rule is created.

How we scope

  • Inventory every ECR repository, its tags, and which clusters and CI jobs pull or push to it
  • Agree in writing which repositories, tags and Helm charts replicate and which are retired
  • Define the Harbor target layout, project structure and access model before any build starts
  • Record which cutover steps, lifecycle policies and handover documents the fixed scope includes

How we build

  • Install and harden Harbor in your environment, including its bundled database and cache components
  • Configure pull-based replication from the ECR endpoint with filters for repository name, tag and resource type
  • Re-create ECR lifecycle rules as Harbor retention and garbage collection schedules, tested on a copy first
  • Test pulls from each cluster and push from each CI pipeline against the new Harbor endpoint before cutover

How we hand over

  • Document the Kubernetes image reference changes, CI push targets and credential rotation steps for your teams
  • Provide runbooks for replication failures, backups and Harbor upgrades, with the rollback path written out
  • Deliver evidence of configuration, access controls and scan settings for your internal or external assessors
  • Walk your platform and security staff through operations so the handover is complete before we close the scope

How we support

  • Support after handover is available as a retainer covering upgrades, patches and monitoring of replication jobs
  • Retainers can also cover continuous security testing of the registry and the pipelines that feed it
  • Ask any provider for a written scope that states what happens when a Harbor upgrade changes a default
  • DeployOpen prepares systems and evidence for compliance assessments but does not issue audit reports or certifications

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.