6
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

AWS cliでECRにpushするときに再認証を求められる&loginが400 bad requestで弾かれる

Posted at

エラー内容

docker push ********.dkr.ecr.region.amazonaws.com/****:TAG

ECRにpushしようとすると

denied: Your authorization token has expired. Reauthenticate and try again.

トークンが期限切れと言われた。再度ログインします。

ログインする

aws ecr get-login-password --region <region> | docker login --username AWS --password-stdin https://<id>.dkr.ecr.<region>.amazonaws.com

ちょっとハマってしまったポイントがあります。

  • get-login-passwordには明示的にregionが必要
  • get-login-passwordとdocker loginのregionが一致していなければいけない

さもないと400 bad requestが返ってきます。

6
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?