Skip to content

add bedrock system cross-region inference profiles#537

Closed
atierian wants to merge 1 commit intomainfrom
cross-region-inference
Closed

add bedrock system cross-region inference profiles#537
atierian wants to merge 1 commit intomainfrom
cross-region-inference

Conversation

@atierian
Copy link
Copy Markdown
Contributor

Problem

Issue number, if available:

Changes

Corresponding docs PR, if applicable:

Validation

Checklist

  • If this PR includes a functional change to the runtime or type-level behavior of the code, I have added or updated automated test coverage for this change. (see Testing Strategy README)
  • If this PR requires a docs update, I have linked to that docs PR above.

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

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Feb 26, 2025

🦋 Changeset detected

Latest commit: 26d629a

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/data-schema 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

@su-mskiles
Copy link
Copy Markdown

su-mskiles commented Feb 26, 2025

Hello @atierian,

I came across this PR because I am very interested in support for cross-region inference profiles! Unfortunately, I don't think the changes in this PR will work without also updating the code that generates the IAM policy for the Lambda chat handler. That is because inference profiles have a different ARN prefix than foundational models. When manually providing the model ID or ARN for an inference profile (using the main branch), here is what the resulting chat handler policy looks like it:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Action": [
                "bedrock:InvokeModel",
                "bedrock:InvokeModelWithResponseStream"
            ],
            "Resource": "arn:aws:bedrock:us-west-2::foundation-model/us.anthropic.claude-3-7-sonnet-20250219-v1:0",
            "Effect": "Allow"
        }
    ]
}

When it should actually look like this:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Action": [
                "bedrock:InvokeModel",
                "bedrock:InvokeModelWithResponseStream"
            ],
            "Resource": "arn:aws:bedrock:us-west-2:<acct_id>:inference-profile/us.anthropic.claude-3-7-sonnet-20250219-v1:0",
            "Effect": "Allow"
        }
    ]
}

@atierian atierian closed this Jul 21, 2025
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.

2 participants