Understanding AWS ECR | Day 20

Introduction

ECR (Elastic Container Registry) is a fully managed container registry service provided by Amazon Web Services (AWS) that makes it easy for developers to store, manage, and deploy Docker container images. We can say ECR does the same work as that of Docker Hub, where it stores the docker image.

ECR vs DockerHub

The main question that comes to mind is that, when we have Docker Hub why do we need the ECR? Both perform the same work but both have some fundamental differences that make the ECR more suitable to use for the AWS ecosystem. Docker Hub by default creates the Public Repository while ECR creates the private repository. If we have our infrastructure in aws it is better to use ECR as it integrates with the service better than DockerHub and it will also become easier to manage the ECR account rather than the Docker hub account.

Creating a Repository and Pushing an Image.

We will create a repository in which we will upload the docker image we build.

We have created a Private Repo in which access can be managed by IAM and repository policy permissions.

When we create the Repository we will upload our docker images following the command below provided by the ECR itself.

After following the above command using aws cli we are able to upload our docker image in the ECR.

This is the Image we have pushed in our Repository using the AWS CLI.

Conclusion

To conclude ECR is an AWS-specific container registry service designed for private container image storage and management within the AWS ecosystem. Its integration with AWS services, security features, and network optimization for AWS environments make it a valuable choice for organizations deploying containerized applications on AWS.