Skip to content

Conversation

@liuyuelintop
Copy link

Problem

Students deploying to regions other than us-east-1 may encounter a cross-region ECR error during the SageMaker deployment step.
This happens because the sagemaker_image_uri variable in terraform/2_sagemaker/variables.tf has a hardcoded us-east-1 in its default value.

Error message:

ValidationException: Region of "763104351884.dkr.ecr.us-east-1.amazonaws.com/..."
does not match expected region of ap-southeast-2.
Cross region ECR image pulls are not allowed.

Solution

Added a clear note and warning in Guide 2 (Step 1), right after the terraform.tfvars configuration section, to help students update the region in variables.tf before running terraform apply.

The note includes:

  • ⚠️ Warning icon for better visibility
  • File and line reference (variables.tf, line 9)
  • Simple, step-by-step instructions
  • Example using another region (ap-southeast-2)
  • A short explanation of why this update is necessary

Testing

Verified in the ap-southeast-2 region — following these new instructions successfully prevents the deployment error.


Impact

  • 🧩 Non-breaking change — documentation only
  • Reduces confusion and failed deployments for students outside us-east-1
  • Improves learning flow in Guide 2
  • Can be complemented later with a code-level fix for full region-agnostic support

Add warning and instructions for students deploying to non-us-east-1 regions
to update the SageMaker image URI in variables.tf to match their region.

This prevents the "Cross region ECR image pulls are not allowed" error that
occurs when the hardcoded us-east-1 ECR URI conflicts with the user's chosen
AWS region in terraform.tfvars.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant