Cloud Experts Documentation

ECR Secret Operator

This guide has been validated on OpenShift 4.20. Operator CRD names, API versions, and console paths may differ on other versions.

Amazon Elastic Container Registry Private Registry Authenticationexternal link (opens in new tab) provides a temporary authorization token valid only for 12 hours. This operator refreshes automatically the Amazon ECR authorization token before it expires, reducing the overhead in managing the authentication flow.

This operator contains two Custom Resources which direct the operator to generate/refresh Amazon ECR authorization token in a timely manner:

How to use this operator

Prerequisites

Install the operator

  • Install the operator from operator hub community
Installed Operator

Create the ECR Secret CRD

A docker registry secret is created by the operator momentally and the token is patched every 10 hours

A sample build process with generated secret

Link the secret to builder

Configure build config to point to your ECR Container repository

Build should succeed and push the image to the the private ECR Container repository

Success Build

Create the ECR Secret Argo CD Helm Repo CRD

  • Create a sample GitOps application

The ArgoCD application should sync with ECR helm chart successfully

Create IAM user and Policy

Notes: These are sample commands. Please fill in your own resource parameters E.g. ARN

Notes: Save access key id and key for later usage

Create STS Assume Role

About AWS STS and Assume Roleexternal link (opens in new tab)

Notes: These are sample commands. Please fill in your own resource parameters E.g. ARN

Back to top

Interested in contributing to these docs?

Collaboration drives progress. Help improve our documentation The Red Hat Way.

Red Hat logo LinkedIn YouTube Facebook Twitter

Products

Tools

Try, buy & sell

Communicate

About Red Hat

We’re the world’s leading provider of enterprise open source solutions—including Linux, cloud, container, and Kubernetes. We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Subscribe to our newsletter, Red Hat Shares

Sign up now
© 2026 Red Hat