Skip to content

Conversation

@sarayev
Copy link
Contributor

@sarayev sarayev commented Jan 21, 2026

Problem

AWS Bedrock introduced global cross-region inference profiles that enable automatic cross-region routing for improved availability and performance. The current implementation only supports regular foundation models and doesn't handle the special IAM permission requirements for global inference profiles.

Issue number, if available: N/A

Changes

Added comprehensive support for AWS Bedrock global cross-region inference profiles in the conversation handler construct:

  1. Detection Logic: Identify global inference profiles by the global. prefix in modelId
  2. Three-Part IAM Policy: Implement the required permission structure as per AWS Bedrock documentation:
    • Access to the inference profile in the requesting region
    • Access to the foundation model in the requesting region
    • Access to the global foundation model (enables cross-region routing with triple-colon ARN)
  3. Code Refactoring:
    • Extracted permission logic into categorizeModelResources() method
    • Added helper methods: isGlobalInferenceProfile(), extractFoundationModelId(), buildInferenceProfileArn(), buildFoundationModelArn(), buildGlobalFoundationModelArn()
  4. Comprehensive Documentation: Added JSDoc comments explaining the three-part policy requirement with link to AWS documentation

Corresponding docs PR, if applicable: N/A

Validation

  • Unit Tests: Added comprehensive test coverage (all tests passing):
    • Single global inference profile with three-part IAM policy verification
    • Multiple global inference profiles
    • Mix of regular models and global inference profiles
    • Stack region handling for inference profiles
    • All existing tests continue to pass
  • Manual Testing: Verified deployment with Claude Sonnet 4.5 global inference profile in test application
  • AWS Documentation: Implementation follows official AWS Bedrock documentation: https://docs.aws.amazon.com/bedrock/latest/userguide/global-cross-region-inference.html

Checklist

  • If this PR includes a functional change to the runtime behavior of the code, I have added or updated automated test coverage for this change.
  • If this PR requires a change to the Project Architecture README, I have included that update in this PR.
  • If this PR requires a docs update, I have linked to that docs PR above.
  • If this PR modifies E2E tests, makes changes to resource provisioning, or makes SDK calls, I have run the PR checks with the run-e2e label set.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

…ofiles Add comprehensive support for AWS Bedrock global inference profiles in the conversation handler construct. Global inference profiles (modelIds starting with 'global.') enable cross-region routing for improved availability and performance. Implementation: - Detect global inference profiles by 'global.' prefix in modelId - Create three-part IAM policy as required by AWS Bedrock: 1. Access to inference profile in requesting region 2. Access to foundation model in requesting region 3. Access to global foundation model (enables cross-region routing) - Refactor permission logic into categorizeModelResources method - Add helper methods for ARN construction and model type detection Tests: - Add comprehensive test coverage for global inference profiles - Test single and multiple global inference profiles - Test mix of regular models and global inference profiles - Test region handling for inference profiles - All tests passing Follows AWS Bedrock documentation: https://docs.aws.amazon.com/bedrock/latest/userguide/global-cross-region-inference.html
@sarayev sarayev requested a review from a team as a code owner January 21, 2026 13:26
@changeset-bot
Copy link

changeset-bot bot commented Jan 21, 2026

🦋 Changeset detected

Latest commit: 89f8826

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@aws-amplify/ai-constructs Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

@ShadowCat567 ShadowCat567 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Excited to have this feature available :D

@sarayev sarayev merged commit b3f0e35 into aws-amplify:main Jan 23, 2026
52 checks passed
@sarayev sarayev deleted the feat/claude-4.5-global-inference-profiles branch January 23, 2026 12:33
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.

3 participants