0

I want to push my docker images to my ECR on aws.

According to the documentation, I need to run aws ecr get-login.

This is what I get:

> aws ecr get-login                                                       
usage: aws [options] <command> <subcommand> [parameters]
aws: error: argument command: Invalid choice, valid choices are:

It is my version of aws cli

> aws --version
aws-cli/1.9.0 Python/2.7.10 Darwin/16.5.0 botocore/1.3.0
Anthony Kong
  • 3,288
  • 11
  • 57
  • 96

2 Answers2

1

Upgrading awscli is helpful, however if your version is >= 2.0, you will get the same error. Use get-login-password instead:

aws ecr get-login-password
mommi84
  • 111
  • 3
1

I need to upgrade awscli to above version 1.9.15

brew upgrade awscli

And unique to my environment, my version of aws was previously installed via pip into my python installation. I need to run pip uninstall awscli to remove it.

Anthony Kong
  • 3,288
  • 11
  • 57
  • 96