Skip to content

bedrock llama-4-scout converse request hitting with diff modelid/ARN

0

ARN loading from .env file is: arn:aws:bedrock:us-east-2:<Account-ID>:inference-profile/us.meta.llama4-scout-17b-instruct-v1:0 but getting error for diff ARN with diff zone & model-id arn:aws:bedrock:us-east-1::foundation-model/meta.llama4-scout-17b-instruct-v1:0

  • ARN loded from .env is 'arn:aws:bedrock:us-east-1:<acc-id>:inference-profile/us.meta.llama4-scout-17b-instruct-v1:0' but converse request is throwing error with a diff ARN: arn:aws:bedrock:us-east-1::foundation-model/meta.llama4-scout-17b-instruct-v1:0

    Error: An error occurred (AccessDeniedException) when calling the Converse operation: User: arn:aws:iam::<acc-id>:user/gen-ai-lab-user is not authorized to perform: bedrock:InvokeModel on resource: arn:aws:bedrock:us-east-1::foundation-model/meta.llama4-scout-17b-instruct-v1:0 because no identity-based policy allows the bedrock:InvokeModel action

1 Answer
0

Solution steps:

  • added permission entries the 3 supported regions in the "model-inference-profile" config page in AWS-console, as listed in the snippet below, the converse API call started to working fine
"arn:aws:bedrock:us-east-1::foundation-model/meta.llama4-maverick-17b-instruct-v1:0",
                "arn:aws:bedrock:us-east-2::foundation-model/meta.llama4-maverick-17b-instruct-v1:0",
                "arn:aws:bedrock:us-west-2::foundation-model/meta.llama4-maverick-17b-instruct-v1:0",
                "arn:aws:bedrock:us-east-1::foundation-model/meta.llama4-scout-17b-instruct-v1:0",
                "arn:aws:bedrock:us-east-2::foundation-model/meta.llama4-scout-17b-instruct-v1:0",
                "arn:aws:bedrock:us-west-2::foundation-model/meta.llama4-scout-17b-instruct-v1:0",
                "arn:aws:bedrock:us-east-1:518282333572:inference-profile/us.meta.llama4-scout-17b-instruct-v1:0",
                "arn:aws:bedrock:us-east-2:518282333572:inference-profile/us.meta.llama4-scout-17b-instruct-v1:0",
                "arn:aws:bedrock:us-west-2:518282333572:inference-profile/us.meta.llama4-scout-17b-instruct-v1:0",
                "arn:aws:bedrock:us-east-1:518282333572:inference-profile/us.meta.llama4-maverick-17b-instruct-v1:0",
                "arn:aws:bedrock:us-east-2:518282333572:inference-profile/us.meta.llama4-maverick-17b-instruct-v1:0",
                "arn:aws:bedrock:us-west-2:518282333572:inference-profile/us.meta.llama4-maverick-17b-instruct-v1:0",
  • called converse API with model-profile-arn: arn:aws:bedrock:us-east-1:<aws-account-id>:inference-profile/us.meta.llama4-scout-17b-instruct-v1:0 (as shown in aws-console model-permissions config page)

The earlier errors that were occurring on converse call, did not occur after making the above entries:

  • "AccessDeniedException"
  • "(ValidationException) when calling the Converse operation: Invocation of model ID meta.llama4-scout-17b-instruct-v1:0 with on-demand throughput isn’t supported."

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.