Skip to content

AWS CLI ecr get-login throwing error Invalid choice #231

Open
@checker21

Description

@checker21

In the Step “C: Push the Docker Image to Amazon ECR” you have to execute the following command:
$(aws ecr get-login --no-include-email)

But this command is only working in AWS CLI 1.x. Since AWS CLI 2.x, the command get-login no longer exists and you will get invalid choice error message. The following command is doing the trick:

aws ecr get-login-password --region region | docker login --username AWS --password-stdin aws_account_id.dkr.ecr.region.amazonaws.com

It would be great seeing a hint in this tutorial. It would save the user a lot of research time.
Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions