0
0
AWScloud~10 mins

ECR for container image registry in AWS - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to create an Amazon ECR repository named 'my-repo'.

AWS
aws ecr create-repository --repository-name [1]
Drag options to blanks, or click blank then click option'
Atest-repo
Bdocker-images
Ccontainer-registry
Dmy-repo
Attempts:
3 left
💡 Hint
Common Mistakes
Using a different repository name than 'my-repo'.
Leaving the repository name blank.
2fill in blank
medium

Complete the command to authenticate Docker to your Amazon ECR registry.

AWS
aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin [1].dkr.ecr.us-east-1.amazonaws.com
Drag options to blanks, or click blank then click option'
A123456789012
B111111111111
C999999999999
D000000000000
Attempts:
3 left
💡 Hint
Common Mistakes
Using an incorrect or incomplete account ID.
Omitting the account ID.
3fill in blank
hard

Fix the error in the command to tag a Docker image before pushing it to ECR.

AWS
docker tag my-image:latest [1].dkr.ecr.us-east-1.amazonaws.com/my-repo:latest
Drag options to blanks, or click blank then click option'
Alatest
Bmy-image
C123456789012
Dmy-repo
Attempts:
3 left
💡 Hint
Common Mistakes
Using the image name or tag instead of the account ID.
Omitting the account ID in the tag.
4fill in blank
hard

Fill both blanks to push a Docker image to the ECR repository.

AWS
docker push [1].dkr.ecr.us-east-1.amazonaws.com/[2]:latest
Drag options to blanks, or click blank then click option'
A123456789012
Bmy-repo
Clatest
Dmy-image
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping the repository name and account ID.
Using image tag or name in place of repository name.
5fill in blank
hard

Fill all three blanks to create a lifecycle policy JSON that expires images older than 30 days.

AWS
{
  "rules": [
    {
      "rulePriority": [1],
      "description": "Expire images older than 30 days",
      "selection": {
        "tagStatus": "[2]",
        "countType": "[3]",
        "countUnit": "days",
        "countNumber": 30
      },
      "action": {
        "type": "expire"
      }
    }
  ]
}
Drag options to blanks, or click blank then click option'
A1
Btagged
CsinceImagePushed
Duntagged
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'untagged' instead of 'tagged' for tagStatus.
Using 'countType' values other than 'sinceImagePushed'.
Setting rulePriority to 0 or a non-integer.