From 9d5c9d0482b24f737ee68d1eedb3b6f444ff766b Mon Sep 17 00:00:00 2001 From: "Bala.FA" Date: Sat, 13 Jan 2024 07:24:47 +0530 Subject: [PATCH] Ignore Amazon EC2 public domain as AWS S3 domain Fixes #1390 Signed-off-by: Bala.FA --- minio/helpers.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/minio/helpers.py b/minio/helpers.py index af7f4120c..c7f6c9010 100644 --- a/minio/helpers.py +++ b/minio/helpers.py @@ -443,6 +443,9 @@ def _get_aws_info( if not _AWS_ENDPOINT_REGEX.match(host): return (None, None) + if host.startswith("ec2-"): + return (None, None) + if not _AWS_S3_ENDPOINT_REGEX.match(host): raise ValueError(f"invalid Amazon AWS host {host}")