Select Language:
If you’re getting the error message “because no identity-based policy allows the bedrock:InvokeModel action,” it usually means that the IAM role you’re using doesn’t have permission to perform that action. To fix this, you need to update your IAM policies to grant the necessary permission.
Here’s a simple way to do that:
1. Find the IAM role you’re using—look for one named something like “amplify-recipeai-fvisc-sa-amplifyDataL2GraphqlApibe-VbOwpQeNWefz” or similar.
2. Go into your AWS Management Console and navigate to the IAM service.
3. Inside the roles section, select the role you’re working with.
4. Attach a new policy that explicitly allows the “bedrock:InvokeModel” action.
You can create a custom policy with the following JSON code:
json
{
“Version”: “2012-10-17”,
“Statement”: [
{
“Sid”: “AllowBedrockInvokeModel”,
“Effect”: “Allow”,
“Action”: [
“bedrock:InvokeModel”
],
“Resource”: “*”
}
]
}
This policy grants permission for the role to invoke the Bedrock model. After attaching this policy, try your operation again. You should now have the proper access to perform the action without errors.





