Bird
0
0

Which of the following is a valid way to authenticate Docker to AWS ECR?

easy📝 Conceptual Q2 of 15
AWS - ECS and Fargate
Which of the following is a valid way to authenticate Docker to AWS ECR?
ALogging in with AWS IAM user password directly in Docker
BUsing AWS CLI to get a login password and piping it to Docker login
CUsing a username and password stored in environment variables
DUsing SSH keys directly with Docker login
Step-by-Step Solution
Solution:
  1. Step 1: Identify AWS recommended authentication

    AWS CLI provides a command to get a temporary password for Docker login to ECR.
  2. Step 2: Eliminate incorrect methods

    SSH keys and IAM user passwords are not used directly for Docker login to ECR. Environment variables with username/password are not standard.
  3. Final Answer:

    Using AWS CLI to get a login password and piping it to Docker login -> Option B
  4. Quick Check:

    Docker ECR auth = AWS CLI login command [OK]
Quick Trick: Use AWS CLI get-login-password for Docker auth [OK]
Common Mistakes:
  • Trying to use SSH keys for Docker login
  • Using static passwords instead of temporary tokens
  • Assuming IAM user password works directly

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes