BM: Baca dalam Bahasa Melayu
World A4: Containers in the Cloud
ECR: your image shelf
You will learn: to keep Kedai Kancil's images in a private shelf inside AWS, and push to it safely.
Checked with AWS 2026-11 on 1 Nov 2026
The problem
Kedai Kancil’s image sits in a public freezer far away. Now the shop moves into the AWS mall. Where should the image live?
Pick one answer.
Watch
ECR: Elastic Container Registry: your private image shelf in the mall's storeroom. You pay for what you store. is that private shelf: a registry: The shop freezer where image packs are stored and shared, like Docker Hub., like in Docker World D5. Its image names are long addresses. Put the parts in order.
Left to right. Put these in order. Use the arrows, or drag.
- .amazonaws.com
- /kedai-kancil
- 111122223333
- :1.0
- .dkr.ecr
- .ap-southeast-5
Try it
Docker needs a login before it can push. The AWS CLI hands over a short-lived password. Build the safe login.
Tap the pieces in the right order.
Hint
Same pipe as Docker World D5: the password comes in through--password-stdin.Predict
That ECR password is a token. How long does it work?
Pick one answer.
Check
The CI role tries to push a new image. Read its key. Will AWS allow it?
Read the request and its policies. Will AWS say Allow or Deny?
The request
- Who
- ci-deployer (role session)
arn:aws:sts::111122223333:assumed-role/ci-deployer/run-42 - Wants to
ecr:PutImage- On
arn:aws:ecr:ap-southeast-5:111122223333:repository/kedai-kancil
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": ["ecr:BatchGetImage", "ecr:GetDownloadUrlForLayer"], "Resource": "arn:aws:ecr:ap-southeast-5:111122223333:repository/kedai-kancil" } ]}Check
Good shelf habits, or risky? Swipe right for good.
Swipe right for good, left for needs work. Or use the buttons.
Scan each image when it is pushed
You did it!
You can now keep images on a private ECR shelf, and push to it safely.
Go deeper (optional)
Making a shelf is one command. Here is the official example. Deleting one with --force deletes every image inside, so check the name twice.
Bahasa Melayu
Image Kedai Kancil duduk dalam peti sejuk awam yang jauh. Kini kedai pindah ke pusat beli-belah AWS. Di mana image itu patut tinggal?
ECR (rak image) ialah rak peribadi itu: satu registry, seperti dalam Dunia Docker D5. Nama imagenya ialah alamat panjang. Susun bahagiannya.
Docker perlu log masuk sebelum boleh push. AWS CLI beri kata laluan jangka pendek. Bina log masuk yang selamat.
--password-stdin.Kata laluan ECR itu ialah token. Berapa lama ia berfungsi?
Role CI cuba push image baru. Baca kuncinya. Adakah AWS benarkan?
Tabiat rak yang baik, atau berisiko? Leret ke kanan untuk baik.
Kini anda boleh simpan image dalam rak ECR peribadi, dan push ke situ dengan selamat.
You finished this before. Practice is always welcome!
Official docs: Amazon ECR: What is it? · Amazon ECR: Private registry authentication · Amazon ECR: Push a Docker image · Amazon ECR: Lifecycle policies · AWS CLI: aws ecr get-login-password
You've learned for 25 minutes. A short break helps your brain.
Sprint done! Great focus. Stretch for a minute?