skip to Main Content

I’m building an agent using AWS Bedrock, I have created a knowledge base and allowed AWS bedrock to configure access policies.

When I try to invoke the Agent I get the following error: Access denied when calling Bedrock. Check your request permissions and retry the request.

I have tried setting IAM permissions to AdministratorAccess for the service role.

Further, I have added these inline policies in addition to the AWS defined policies + Administrator access

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "Statement1",
            "Effect": "Allow",
            "Action": [
                "bedrock:InvokeModel",
                "bedrock:*",
                "bedrock:QueryKnowledgeBase",
                "bedrock:Retrieve",
                "bedrock:RetrieveAndGenerate"
            ],
            "Resource": [
                "arn:aws:bedrock:us-east-1::foundation-model/anthropic.claude-v2",
                "arn:aws:bedrock:us-east-1::foundation-model/anthropic.claude-instant-v1",
                "arn:aws:bedrock:*:389743002678:knowledge-base/:knowledge-base-id"
            ]
        },
        {
            "Sid": "Statement2",
            "Effect": "Allow",
            "Action": [
                "bedrock:*",
                "s3:*"
            ],
            "Resource": [
                "*",
                "*",
                "*"
            ]
        }
    ]
}

2

Answers


  1. Chosen as BEST ANSWER

    It was an issue with access to the ‘Anthropic’ models. Please make sure that you submit a use case and get access to the models. You will be granted access usually within a few hours.


  2. I have the exact same problem only it’s been weeks since I submitted my use case for the Anthropic models and I’m yet to hear back! Any help to get this sorted out would be greatly appreciated!

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search