Skip to content

Commit bf8a8cc

Browse files
committed
fix: add aws-eusc partition support, remove original_template_dict from Stack.__eq__
- Add eusc- region prefix handling to derive_partition (aws-eusc) and derive_url_suffix (amazonaws.eu) for the AWS European Sovereign Cloud - Revert us-iso-/us-isob- ADC partition branches — not supported elsewhere in the SAM CLI codebase - Remove original_template_dict from Stack.__eq__ — it is operational metadata for deployment, not part of the stack's semantic identity. Including it caused stacks created via different code paths to compare as unequal even when semantically identical
1 parent f002236 commit bf8a8cc

2 files changed

Lines changed: 4 additions & 9 deletions

File tree

samcli/lib/cfn_language_extensions/utils.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,8 @@ def derive_partition(region: str) -> str:
3131
return "aws-cn"
3232
elif region.startswith("us-gov-"):
3333
return "aws-us-gov"
34-
elif region.startswith("us-isob-"):
35-
return "aws-iso-b"
36-
elif region.startswith("us-iso-"):
37-
return "aws-iso"
34+
elif region.startswith("eusc-"):
35+
return "aws-eusc"
3836
else:
3937
return "aws"
4038

@@ -43,10 +41,8 @@ def derive_url_suffix(region: str) -> str:
4341
"""Derive the AWS URL suffix from the region."""
4442
if region.startswith("cn-"):
4543
return "amazonaws.com.cn"
46-
elif region.startswith("us-isob-"):
47-
return "sc2s.sgov.gov"
48-
elif region.startswith("us-iso-"):
49-
return "c2s.ic.gov"
44+
elif region.startswith("eusc-"):
45+
return "amazonaws.eu"
5046
else:
5147
return "amazonaws.com"
5248

samcli/lib/providers/provider.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -728,7 +728,6 @@ def __eq__(self, other: Any) -> bool:
728728
and self.stack_id == other.stack_id
729729
and self.stack_path == other.stack_path
730730
and self.template_dict == other.template_dict
731-
and self.original_template_dict == other.original_template_dict
732731
)
733732
return False
734733

0 commit comments

Comments
 (0)