AWS ECR: Basics Explained

Eli Front
2 min readMay 2, 2023

--

elastic container registry logo

Overview of ECR Basics

  • What is a Docker Image?
  • What does ECR do?
  • How is ECR priced?

What is a Docker Image?

To understand ECR, you first have to understand what a Docker image is. To keep things simple, you can think of an image as a box filled with all of the necessary ingredients for a computer program to run. That includes the code, settings, and more. If I was building a website, I may want to make a docker image for my web server. One of the advantages of this is that it allows you to be confident that your web server image will run the same on your computer as it will on any computer (or server). So if you’re developing an app with a team, you need to be certain everything is working the same for everyone, and that it functions the same in the cloud.

What Does ECR Do?

As we previously discussed, a developer will oftentimes create an image or “containerize” their application. Often times it is valuable to save those images somewhere so other developers and cloud services can easily access them without building the image themselves. One of the products that does just that is ECR (Elastic Container Registry). ECR uses repositories, which are like buckets to store images. Your team can choose what images each bucket is supposed to hold and then publish images to their corresponding repository. An example of this would be one repository for a web server and another for an API. Each image can be tagged for identification purposes, and eventually, you will end up with a growing repository of images. This can get a little cluttered and full, so ECR has a helpful feature called lifecycle policies that will allow you to clean up your repositories based on certain rules. An example would be to only keep the 10 newest images.

How Is ECR Priced?

Sending images to ECR is free. A fancy way to say this is there are no ingress fees. Getting the images back from ECR is determined by region, but is usually in the realm of single-digit cents per gigabyte.

--

--