Nov 8, 2022
Lab Guide:Amazon Elastic Container Registry (Amazon ECR)
Let's take you through AWS managed container image registry.
Author


Book a call
Table of Contents
Container Management
AWS managed container image registry is secure, scalable, and reliable. The Amazon ECR supports private repositories with resource-based permissions using AWS IAM. This ensures that specified users or Amazon EC2 instances can access your container repositories and images. You can use your preferred CLI to push, pull, and manage Docker images, Open Container Initiative (OCI) images, and OCI-compatible artifacts.
Follow the above steps:
Step 1: Create an Ubuntu Server/Instance and SSH into it.

Step 2: Select the instance and click on Actions.

Step 3: Click on Security and then click on Modify IAM role.

Step 4: Click on create new IAM role.

Step 5:Click on Create Role.

Step 6: Choose EC2 and click on next.

Step 7: Attach ECR and EKS policies to the role and press next : same way attach ECR and EKS full access to IAM User also.

Step 8: Provide the role name.

Step 9: Click on create role.

Step 10: Come back to the instance and attach the IAM role to the instance and click on “Update IAM role”.

Step 11: SSH into the server/Instance.

Step 12: Become Root User.

Step 13: Install AWS CLI(Command line Interface).

Step 14: Configure the AWS CLI.
Note: Use the following command.
Note: Provide environment variables such as (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_DEFAULT_REGION).

Step 15: Install Docker.

Step 16: Create a Container Repository.

Step 17: Go to AWS Container Registry service, their one repository will be created by the name hello world.

Step 18: Login to the repo using below command.

Step 19: Pull an image from docker hub.

Step 20: Tag the image to push to your repository.
Note: replace underlined words region and aws_account_id with your region and account ID.
Step 21: Push the image.
Note: replace underlined words region and aws_account_id with your region and account ID.

Step 22: Go to container registory service in AWS and check “the hello-world image would be pushed” with the tag name “latest”.

The above diagram shows the image has been pushed to the registry [Amazon ECR] which makes easier for us to create a container anytime using above image in the registry.
You can further read: Reference for ECR using CLI
Related Articles.
More from the engineering frontline.
Dive deep into our research and insights on design, development, and the impact of various trends to businesses.

May 22, 2026
AI in Insurance: Building Production-Ready Products for Claims, Underwriting, and Customer Experience
This blog breaks down what it takes to build production-ready AI in insurance across claims, underwriting, and customer experience. It covers the gap between AI pilots and live deployments, the architecture and governance requirements that determine whether a system holds up at scale, and what insurers need to get right across data infrastructure, compliance, and human oversight before going live.

May 22, 2026
Building AI Investment Platforms: From Predictive Analytics to Personalized Portfolio Insights
A technical and strategic guide for product and engineering leaders on building AI investment platforms, from data infrastructure and compliance to personalization and development costs.

May 21, 2026
Cursor vs. Lovable vs. Replit: Which Vibe Coding Tool Builds the Most Production-Ready Code?
This guide breaks down Cursor, Lovable, and Replit across the criteria that matter most to CTOs, founders, and engineering leaders, making platform decisions with real operational consequences.