15 - Containers on AWS ECS Fargate ECR EKS

Amazon ECR

awscontainersecrsaa-c03

Overview

Amazon ECR (Elastic Container Registry) stores and manages Docker images on AWS. Instead of only an online repository like Docker Hub, you can store your own images on ECR.

Exam Pattern

Anytime you see storing Docker images, think ECR.

Repository Options

Option Details
Private repository Images for your account(s) only
Public repository Publish to the Amazon ECR Public Gallery

Key Points

  • Fully integrated with Amazon ECS.
  • Images are stored behind the scenes by Amazon S3.
  • All access is protected by IAM. On a permission error, check your policies.
  • Features: image vulnerability scanning, versioning, image tags, image lifecycle.

ECS and ECR Together

  1. The ECR repository holds Docker images.
  2. An IAM role is assigned to the EC2 instance of the ECS cluster, allowing it to pull images.
  3. The instance pulls the image, then the container starts on the instance.

See 02-Amazon-ECS.


ECR to ECS

ECR repositoryDocker images stored behind the scenes by S3 pull ECS cluster EC2 instanceIAM role allows pull Containerstarts on the instance All ECR access is protected by IAM. On a permission error, check your policies.
An IAM role on the instance lets it pull the image, then the container starts.

Questions & Answers

Q1: What is ECR?

Answer:

Elastic Container Registry, used to store and manage Docker images on AWS.

Q2: Where does ECR store images?

Answer:

Behind the scenes in Amazon S3.

Q3: How does an ECS EC2 instance pull from ECR?

Answer:

Through an IAM role assigned to the instance.

Q4: What features does ECR add?

Answer:

Vulnerability scanning, versioning, image tags and image lifecycle.

Check yourself

Quiz

Flashcards

Click the card (or focus it), then use ← → to move and Space to flip.