diff --git a/samtranslator/region_configuration.py b/samtranslator/region_configuration.py index 6dfc5121c..c2a210b9c 100644 --- a/samtranslator/region_configuration.py +++ b/samtranslator/region_configuration.py @@ -18,12 +18,7 @@ def is_apigw_edge_configuration_supported(cls) -> bool: :return: True, if API Gateway does not support Edge configuration """ - return ArnGenerator.get_partition_name() not in [ - "aws-us-gov", - "aws-iso", - "aws-iso-b", - "aws-cn", - ] + return ArnGenerator.get_partition_name() not in ["aws-us-gov", "aws-iso", "aws-iso-b", "aws-cn", "aws-iso-e"] @classmethod def is_service_supported(cls, service, region=None): # type: ignore[no-untyped-def] diff --git a/samtranslator/translator/arn_generator.py b/samtranslator/translator/arn_generator.py index 50c180604..a9f6e0325 100644 --- a/samtranslator/translator/arn_generator.py +++ b/samtranslator/translator/arn_generator.py @@ -25,6 +25,8 @@ def _region_to_partition(region: str) -> str: return "aws-iso-b" if region_string.startswith("us-gov"): return "aws-us-gov" + if region_string.startswith("eu-isoe"): + return "aws-iso-e" return "aws" diff --git a/tests/unit/test_region_configuration.py b/tests/unit/test_region_configuration.py index fd00b608d..e9bcf50b3 100644 --- a/tests/unit/test_region_configuration.py +++ b/tests/unit/test_region_configuration.py @@ -26,6 +26,7 @@ def test_when_apigw_edge_configuration_supported(self, partition): ["aws-us-gov"], ["aws-iso"], ["aws-iso-b"], + ["aws-iso-e"], ] ) def test_when_apigw_edge_configuration_is_not_supported(self, partition): diff --git a/tests/unit/translator/test_arn_generator.py b/tests/unit/translator/test_arn_generator.py index b91bb3143..f31cb7f26 100644 --- a/tests/unit/translator/test_arn_generator.py +++ b/tests/unit/translator/test_arn_generator.py @@ -14,6 +14,7 @@ class TestArnGenerator(TestCase): ["us-gov-west-1", "aws-us-gov"], ["us-iso-east-1", "aws-iso"], ["us-isob-east-1", "aws-iso-b"], + ["eu-isoe-west-1", "aws-iso-e"], ] ) def test_get_partition_name(self, region, expected_partition): @@ -27,6 +28,7 @@ def test_get_partition_name(self, region, expected_partition): ["us-gov-west-1", "aws-us-gov"], ["us-iso-east-1", "aws-iso"], ["us-isob-east-1", "aws-iso-b"], + ["eu-isoe-west-1", "aws-iso-e"], ] ) def test_get_partition_name_when_region_not_provided(self, region, expected_partition):