Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save billykong/456165065b647e330da8a2099fc66f91 to your computer and use it in GitHub Desktop.
Save billykong/456165065b647e330da8a2099fc66f91 to your computer and use it in GitHub Desktop.
Uses `aws ecr get-login-password` after `aws ecr get-login` depreciation

aws ecr get-login depreciated

$ aws ecr get-login --region ap-southeast-1
usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:

  aws help
  aws <command> help
  aws <command> <subcommand> help
aws: error: argument operation: Invalid choice, valid choices are:
...

Simplest Solution

$ aws ecr get-login-password --region ap-southeast-1 | docker login --username AWS --password-stdin ACCOUNT_ID.dkr.ecr.ap-southeast-1.amazonaws.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment