Skip to content

Commit 3856796

Browse files
authored
fix: add new partition to arn generation (#3574)
1 parent c612d4d commit 3856796

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

samtranslator/translator/arn_generator.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,12 @@ def _region_to_partition(region: str) -> str:
2323
"us-isob": "aws-iso-b",
2424
"us-gov": "aws-us-gov",
2525
"eu-isoe": "aws-iso-e",
26+
"us-isof": "aws-iso-f",
2627
}
2728
for key, value in region_to_partition_map.items():
2829
if region_string.startswith(key):
2930
return value
3031

31-
# Using the ${AWS::Partition} placeholder so that we don't have to add new regions to the static list above
32-
if "iso" in region_string:
33-
return "${AWS::Partition}"
34-
3532
return "aws"
3633

3734

tests/translator/test_arn_generator.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def setUp(self):
1717
("us-isob-east-1", "aws-iso-b"),
1818
("eu-isoe-west-1", "aws-iso-e"),
1919
("US-EAST-1", "aws"),
20-
("us-isof-east-1", "${AWS::Partition}"),
20+
("us-isof-east-1", "aws-iso-f"),
2121
]
2222
)
2323
def test_get_partition_name(self, region, expected):

0 commit comments

Comments
 (0)