feat: add support for AWS European Sovereign Cloud ECR registries

- Update ECR registry regex to match `.amazonaws.eu` domain suffix
- Add test cases for `eusc-de-east-1.amazonaws.eu` region format

Fixes: #908

Signed-off-by: Philipp Dreimann <pdreiman@amazon.de>
Tested-by: Lukas Valentin Buchmeier-Probst <lvbp@amazon.de>
This commit is contained in:
Philipp Dreimann
2026-01-13 16:53:08 +01:00
parent 916386b000
commit f6ef577545
4 changed files with 7 additions and 3 deletions

View File

@@ -5,7 +5,7 @@ import {NodeHttpHandler} from '@smithy/node-http-handler';
import {HttpProxyAgent} from 'http-proxy-agent';
import {HttpsProxyAgent} from 'https-proxy-agent';
const ecrRegistryRegex = /^(([0-9]{12})\.(dkr\.ecr|dkr-ecr)\.(.+)\.(on\.aws|amazonaws\.com(.cn)?))(\/([^:]+)(:.+)?)?$/;
const ecrRegistryRegex = /^(([0-9]{12})\.(dkr\.ecr|dkr-ecr)\.(.+)\.(on\.aws|amazonaws\.(com(.cn)?|eu)))(\/([^:]+)(:.+)?)?$/;
const ecrPublicRegistryRegex = /public\.ecr\.aws|ecr-public\.aws\.com/;
export const isECR = (registry: string): boolean => {