I Tried Out the Global Authentication Token Now Supported by Amazon ECR Private Registries

I Tried Out the Global Authentication Token Now Supported by Amazon ECR Private Registries

A single token issued in us-east-1 let me docker login, push and pull on private registries in ap-northeast-1 and eu-west-1. Here are the steps to issue it and how to use it across regions.
2026.11.20

This page has been translated by machine translation. View original

Introduction

On 2026-11-17, global authentication tokens became available for Amazon ECR private registries.

https://aws.amazon.com/jp/about-aws/whats-new/2026/11/global-authentication-amazon-ecr/

In this article, I used a token issued in us-east-1 with registries in ap-northeast-1 and eu-west-1.

Issuing the Token

I tested with AWS CLI 2.41.0 and Docker 29.9.3. Use aws signin create-bearer-token to issue the token.

aws signin create-bearer-token \
  --grant-type client_credentials \
  --resource ecr.amazonaws.com \
  --region us-east-1 \
  --output json > /tmp/ecr-verify/token-default.json

This is the saved response. The accessToken is masked, with only its length left visible.

{
  "accessToken": "<REDACTED len=3419>",
  "tokenType": "Bearer",
  "expiresIn": 43199
}

For --region, specify the Region in which to issue the token. Here, I used us-east-1, which is different from the Regions of the two registries. expiresIn was 43199, which is one second less than 12 hours.

The IAM policy required for issuing is described in the User Guide. To perform push or pull, you also need separate ECR permissions.

https://docs.aws.amazon.com/AmazonECR/latest/userguide/registry_auth.html

IAM policy that allows issuing
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "CreateECRGlobalToken",
      "Effect": "Allow",
      "Action": "signin:CreateBearerToken",
      "Resource": "arn:aws:signin:*:*:service-principal/ecr.amazonaws.com"
    }
  ]
}

Using It with Registries in Multiple Regions

Using the same token, I ran docker login to the two registries in ap-northeast-1 and eu-west-1.

jq -r .accessToken /tmp/ecr-verify/token-default.json | docker login --username AWS --password-stdin <ACCOUNT_ID>.dkr.ecr.ap-northeast-1.amazonaws.com
jq -r .accessToken /tmp/ecr-verify/token-default.json | docker login --username AWS --password-stdin <ACCOUNT_ID>.dkr.ecr.eu-west-1.amazonaws.com

Both registries returned Login Succeeded, and pushing and pulling the v1 tag also succeeded.

For the pull from the eu-west-1 registry, I first deleted the already-pushed v1 image locally with docker rmi, and then ran the pull.

docker rmi <ACCOUNT_ID>.dkr.ecr.ap-northeast-1.amazonaws.com/ecr-global-token-test-a:v1 <ACCOUNT_ID>.dkr.ecr.eu-west-1.amazonaws.com/ecr-global-token-test-b:v1
docker pull <ACCOUNT_ID>.dkr.ecr.eu-west-1.amazonaws.com/ecr-global-token-test-b:v1
Untagged: <ACCOUNT_ID>.dkr.ecr.ap-northeast-1.amazonaws.com/ecr-global-token-test-a:v1
Untagged: <ACCOUNT_ID>.dkr.ecr.eu-west-1.amazonaws.com/ecr-global-token-test-b:v1
Deleted: sha256:5099b89d7666cc2186cad769ddc262ddc7c335b33f5fe79f9ffe50a01282b23e
v1: Pulling from ecr-global-token-test-b
58dee6a49ef1: Pulling fs layer
58dee6a49ef1: Download complete
58dee6a49ef1: Pull complete
Digest: sha256:5099b89d7666cc2186cad769ddc262ddc7c335b33f5fe79f9ffe50a01282b23e
Status: Downloaded newer image for <ACCOUNT_ID>.dkr.ecr.eu-west-1.amazonaws.com/ecr-global-token-test-b:v1
<ACCOUNT_ID>.dkr.ecr.eu-west-1.amazonaws.com/ecr-global-token-test-b:v1

Summary

I tried global authentication tokens with Amazon ECR private registries. According to the announcement, a single token issued with AWS Sign-In's CreateBearerToken can be used against multiple ECR private registries in the same partition.

For services deployed across multiple Regions, separate authentication was previously required for each Region's registry. With global authentication tokens, you can operate on registries in multiple Regions with a single authentication.

Share this article

AWSのお困り事はクラスメソッドへ