There was an error while loading. Please reload this page.
1 parent 4eaf5d9 commit 1b034eaCopy full SHA for 1b034ea
1 file changed
modules/sagemaker/sagemaker-templates/templates/model_deploy/seed_code/deploy_app/app.py
@@ -5,6 +5,18 @@
5
from deploy_app.pipeline_stack import PipelineStack
6
7
app = cdk.App()
8
+
9
+# All deployment regions must match - cross-region endpoint deployment is not supported
10
+# because model packages contain region-specific container image URIs
11
+regions = {
12
+ "dev": constants.DEV_REGION,
13
+ "pre-prod": constants.PRE_PROD_REGION,
14
+ "prod": constants.PROD_REGION,
15
+}
16
+mismatched = {k: v for k, v in regions.items() if v != constants.DEV_REGION}
17
+if mismatched:
18
+ raise ValueError(f"All deployment regions must match dev region ({constants.DEV_REGION}). Mismatched: {mismatched}")
19
20
PipelineStack(
21
app,
22
f"{constants.PROJECT_NAME}-pipeline",
0 commit comments