Establishing a Container Repository in Amazon Web Services (AWS): An In-depth Procedural Manual

Dr Priyanka Gupta Research
4 min readJul 13, 2023
Image by Author

Introduction:
Containerization has emerged as a widely adopted approach in the contemporary technology domain, enabling efficient application development, deployment, and management in the face of rapid technological advancements. Amazon Web Services (AWS) offers a comprehensive platform for the management of containers, facilitated by its Elastic Container Service (ECS) and Elastic Kubernetes Service (EKS). This blog post aims to provide a comprehensive guide on the procedure of establishing a container repository within the Amazon Web Services (AWS) platform. By following the steps outlined, users will be able to securely store and effectively manage their container images. Let’s start with the step-by-step process.

Container Repository creation & Container Image uploading Process in AWS

The steps required to perform to create a container repository in AWS are as follows:

  1. Log in to the AWS Management Console by visiting the URL “https://console.aws.amazon.com”. Once you’re there, please log in to your AWS account with the right passwords to verify your identity.

2. Search ECR in the AWS Management Console search bar after you have logged in correctly. Then access this service by clicking on it.

Searching ECR in AWS Management Console — ECR Creation Step 1

3. Create a new Repository by clicking on “Get Started”.

Accessing ECR — ECR Creation Step 2

4. Select the Image’s visibility setting as “Public” if you want the image to be publicly available or “Private” if you want the image to be used by only those people who have access to your account. Also, give the repository name (its image name in reality) that you want to keep.

Enable/Disable Tag Immutability depending on your requirement. (Explanation of the concept is mentioned in the image)

ECR Creation Step 3

5. Enable/Disable Image on Scan based on your requirement. If enabled, it will automatically scan the image after push for the software vulnerabilities.

Also, Enable/Disable Encryption settings based on your requirement. If enabled, it will use AWS KMS for the encryption of the images. Then click on “Create Repository”.

ECR Creation Step 4
ECR Creation Step 5

In the above image, it can be seen that the ECR Repository is created with the name of “myapplication”.

6. Click on the ECR Repo created, you will see an option of “View push commands”, just click on that. You need to follow the commands (based on your OS) to create/tag & upload your container image to this ECR Repository.

ECR Creation Step 6
ECR Creation Step 7

7. Once the Image is pushed, it will be reflected in the ECR Dashboard created.

ECR Creation Step 8 — Image uploaded to ECR

After the successful upload of your container image, you will be able to oversee and supervise your repository through the ECR dashboard. Users have the ability to access image details, & examine scan reports. In addition, it is possible to establish CloudWatch Events and AWS Lambda functions in order to initiate actions in response to repository events such as image push, pull, or vulnerability scan results.

Optional Steps (based on your requirement)

You can configure the permissions as required by integrating AWS ECR and AWS Identity and Access Management (IAM), this enables users to manage and regulate access to their container repository. Users have the ability to generate IAM policies and roles in order to allocate precise authorizations to users, groups, or AWS services. As an illustration, it is possible to authorize a team with read-only privileges to retrieve images, or alternatively, grant them full access to the CI/CD pipeline for both pushing and pulling images.

Also, it is imperative to effectively manage and monitor the repository.

We can also integrate AWS ECR with AWS ECS and AWS EKS as
AWS ECR platform provides a seamless integration with AWS container services which are Amazon Elastic Container Service (ECS) and Elastic Kubernetes Service (EKS). Containerized applications can be readily deployed by utilizing these services, which involve referencing the images stored within the ECR repository.

In conclusion, the process of establishing a container repository in AWS through the utilization of Elastic Container Registry (ECR) is a simple and uncomplicated procedure that empowers users to effectively store, manage, and safeguard their container images. The utilization of Elastic Container Registry (ECR) enables users to leverage the resilient infrastructure provided by Amazon Web Services (AWS) and effortlessly incorporate container services such as Elastic Container Service (ECS) and Elastic Kubernetes Service (EKS). By adhering to the sequential instructions provided in this blog post, one can effortlessly establish their container repository and commence capitalizing on the advantages of containerization within their Amazon Web Services (AWS) ecosystem.

--

--