fix: decouple BedrockRegion from deploy region#58
Conversation
BedrockRegion has AllowedValues in CFN template. Previously DEPLOY_REGION was passed directly, causing ValidationError in unsupported regions. Fix: Use deploy region if it's a valid Bedrock region, else default to us-east-1 (cross-region inference handles routing).
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5173aae864
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| build_deploy_params() { | ||
| # Bedrock region: use us-east-1 by default (widest model availability, cross-region inference) | ||
| # Only override if the deploy region is itself a supported Bedrock region | ||
| local bedrock_allowed="us-east-1 us-west-2 eu-west-1 eu-central-1 eu-north-1 ap-northeast-1" |
There was a problem hiding this comment.
Include ap-southeast-1 in Bedrock region allowlist
The new bedrock_allowed gate omits ap-southeast-1, even though both deploy targets treat it as a valid Bedrock region (deploy/cloudformation/template.yaml BedrockRegion.AllowedValues and deploy/terraform/variables.tf validation). In that region, build_deploy_params now forces BEDROCK_REGION=us-east-1, which introduces an unintended cross-region override and can cause runtime/model-access failures for accounts that only enabled Bedrock access in ap-southeast-1; this is a regression from the previous BedrockRegion=$DEPLOY_REGION behavior for supported regions.
Useful? React with 👍 / 👎.
Fixes ValidationError when deploying to regions not in BedrockRegion AllowedValues.