Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add bedrock system cross-region inference profiles #537

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

atierian
Copy link
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.

Copy link

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

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"
        }
    ]
}

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